Debian Codegraph @

regression_test/makefilegen/makefilegen_envvar_test/testA/Test/src/MyExample.ttcn

raw
1 // TTCN-3 version of "Hello, world!"
2 module MyExample
3 {
4 type port PCOType message
5 {
6 inout charstring;
7 }
8
9 type component MTCType
10 {
11 port PCOType MyPCO_PT;
12 }
13
14 testcase tc_HelloW() runs on MTCType system MTCType
15 {
16 map(mtc:MyPCO_PT, system:MyPCO_PT);
17 MyPCO_PT.send("Hello, world!");
18 setverdict(pass);
19 }
20
21 testcase tc_HelloW2() runs on MTCType system MTCType
22 {
23 timer TL_T := 15.0;
24 map(mtc:MyPCO_PT, system:MyPCO_PT);
25 MyPCO_PT.send("Hello, world!");
26 TL_T.start;
27 alt {
28 [] MyPCO_PT.receive("Hello, TTCN-3!") { TL_T.stop; setverdict(pass); }
29 [] TL_T.timeout { setverdict(inconc); }
30 [] MyPCO_PT.receive { TL_T.stop; setverdict(fail); }
31 }
32 }
33
34 control
35 {
36 execute(tc_HelloW());
37 execute(tc_HelloW2());
38 }
39 }