conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / 21_configuration_operations / 2101_connection_operations / 210102_disconnect_and_unmap_operations / Sem_210102_unmap_operation_001.ttcn
1 /***************************************************
2 ** @author STF 451, STF 470
3 ** @version 0.0.2
4 ** @purpose 1:21.1.2, Ensure that umnap operation of a system and component port works correctly
5 ** @verdict pass accept, ttcn3verdict:pass
6 ***************************************************/
7
8 // The following requirements are tested:
9 // The ... unmap operations perform ... the unmapping of (previously mapped) ports of
10 // test components and ports in the test system interface.
11
12 module Sem_210102_unmap_operation_001 {
13
14 type port P message {
15 inout integer
16 } with {extension "internal"}
17
18 type component GeneralComp
19 {
20 port P p;
21 }
22
23 function checkMapped(boolean p_stateActive) runs on GeneralComp
24 {
25 if(p.checkstate("Mapped") xor not p_stateActive) {
26 setverdict(pass);
27 } else {
28 setverdict(fail);
29 }
30 }
31
32 testcase TC_Sem_210102_unmap_operation_001() runs on GeneralComp system GeneralComp {
33 var GeneralComp v_ptc1 := GeneralComp.create;
34
35 map(self:p, system:p);
36 map(v_ptc1:p, system:p);
37
38 unmap(system:p, v_ptc1:p);
39
40 // verity that ports are really unmapped
41 checkMapped(true); // still mapped to system:p
42 v_ptc1.start(checkMapped(false)); // no active mapping
43 v_ptc1.done;
44 }
45
46 control{
47 execute(TC_Sem_210102_unmap_operation_001());
48 }
49 }
50
This page took 0.034036 seconds and 5 git commands to generate.