source: trunk/t3d-examples/t3dtest/module_with_moduleParameters.ttcn3 @ 7

Last change on this file since 7 was 7, checked in by phdmakk, 14 years ago
File size: 2.4 KB
Line 
1module module_with_moduleParameters {
2        modulepar boolean par1 := true;
3        modulepar boolean par2 := true;
4        modulepar boolean par3 := false;
5       
6        modulepar boolean par41, par42, par43 := false;
7       
8        const integer con1 := 1, con2 := 2;
9       
10       
11       
12        testcase t_1() runs on bla system blubb{
13       
14                if(f_1(par2)){
15       
16                }
17       
18                if(f_3()){
19       
20                }
21        }
22       
23        testcase t_2(boolean tpar) runs on bla system blubb{
24       
25        }
26       
27        function f_1( boolean fpar){
28                var boolean var1 := f_2(fpar);
29                return f_5(var1, var1);
30        }
31        function f_2(boolean fpar){
32                return (fpar == false);
33        }
34        function f_3(){
35                var boolean var1 := f_4();
36                t_2(var1);
37                return var1;
38        }
39       
40        function f_4(){
41                return par3;
42        }
43        function f_5(boolean  fpar, boolean  fpar){
44                return (fpar == false);
45        }
46       
47       
48                testcase testcaseAll() runs on MTC system SystemInterface {
49         if (par1==true) {} else {}
50         if (par2==true) {} else {}
51         if (par3==true) {} else {}
52         if (par41==true) {} else {}
53         if (par42==true) {} else {}
54         if (par43==true) {} else {}
55         if (con1==1) {} else {}
56         if (con2==1) {} else {}
57         }
58       
59        testcase testcase1() runs on MTC system SystemInterface {
60         if (par1==true) {} else {}}   
61
62        testcase testcase1_2() runs on MTC system SystemInterface {
63         if (par1==true) {} else {}
64         if (par2==true) {} else {}}
65         
66               
67        testcase testcase2() runs on MTC system SystemInterface {
68         if (par2==true) {} else {}}
69         
70        testcase testcase3() runs on MTC system SystemInterface {
71         if (par3==true) {} else {}}
72         
73        testcase testcase4() runs on MTC system SystemInterface {}
74
75
76        function function1 ()
77        return boolean {
78                return par1;
79        }
80       
81                function function2 ()
82        return boolean {
83                return par2;
84        }
85
86                function function3 ()
87        return boolean {
88                return par3;
89        }
90       
91        altstep altstep1(){
92       
93        }
94       
95       
96        testcase testcaseloop1_1() runs on MTC system SystemInterface {function1();}
97        testcase testcaseloop1_2() runs on MTC system SystemInterface {testcaseloop1_3();testcaseloop1_1()}
98        testcase testcaseloop1_3() runs on MTC system SystemInterface {testcaseloop1_2();}
99       
100testcase testcasef1() runs on MTC system SystemInterface {function1();}
101testcase testcasef2() runs on MTC system SystemInterface {function2();}
102testcase testcasef3() runs on MTC system SystemInterface {function3();}
103
104testcase testcase_test() runs on MTC system SystemInterface{function_indirect1(par2)};
105function function_indirect2(boolean par){};
106
107
108testcase testcasetcf1() runs on MTC system SystemInterface {testcasef1();}
109
110}
Note: See TracBrowser for help on using the repository browser.