Commit | Line | Data |
---|---|---|
114d1c9a | 1 | /****************************************************************************** |
3abe9331 | 2 | * Copyright (c) 2000-2015 Ericsson Telecom AB |
114d1c9a EL |
3 | * All rights reserved. This program and the accompanying materials |
4 | * are made available under the terms of the Eclipse Public License v1.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * http://www.eclipse.org/legal/epl-v10.html | |
7 | ******************************************************************************/ | |
8 | //^In TTCN\-3 module `E_SE'\:$// | |
9 | module E_SE { | |
10 | ||
11 | import from D_SE { import all }; | |
12 | import from D_SE all; | |
13 | ||
14 | type component MTC {}; | |
15 | ||
16 | //==CONST=== | |
17 | const integer c_E_i := 0; | |
18 | public const integer c_E_i_pu := 0; | |
19 | friend const integer c_E_i_fr := 0; | |
20 | private const integer c_E_i_pr := 0; | |
21 | ||
22 | //==TEMPLATES=== | |
23 | template integer t_E_i := 0; | |
24 | public template integer t_E_i_pu := 0; | |
25 | friend template integer t_E_i_fr := 0; | |
26 | private template integer t_E_i_pr := 0; | |
27 | ||
28 | //===TYPES=== | |
29 | type integer E_MyInt; | |
30 | public type integer E_MyInt_pu; | |
31 | private type integer E_MyInt_pr; | |
32 | friend type integer E_MyInt_fr; | |
33 | ||
34 | //==functions | |
35 | /* public */ function f_E() { log("This is f_E") } | |
36 | public function f_E_pu() { log("This is f_E_pu") } | |
37 | friend function f_E_fr() { log("This is f_E_fr") } | |
38 | private function f_E_pr() { log("This is f_E_pr") } | |
39 | ||
40 | //=============Testcases========================================= | |
41 | ||
42 | testcase tc_A() runs on MTC { //^In testcase definition `tc_A':// | |
43 | var integer i:=c_A_i; //^In variable definition `i':// //^error: There is no local or imported definition with name `c_A_i'// | |
44 | i:=valueof(t_A_i); //^In variable assignment:// //In the operand of operation `valueof\(\)'// //^error: There is no local or imported definition with name `t_A_i'// | |
45 | i:=valueof(t_A_i_pu); //^In variable assignment:// //In the operand of operation `valueof\(\)'// //^error: There is no local or imported definition with name `t_A_i_pu'// | |
46 | var A_MyInt myInt; //^In variable definition `myInt'// //^error: There is no local or imported definition with name `A_MyInt'// | |
47 | var A_MyInt_pu myInt_pu; //^In variable definition `myInt_pu'// //^error: There is no local or imported definition with name `A_MyInt_pu'// | |
48 | f_A(); //^In function or altstep instance:// //^error: There is no local or imported definition with name `f_A'// | |
49 | f_A_pu();//^In function or altstep instance:// //^error: There is no local or imported definition with name `f_A_pu'// | |
50 | ||
51 | i:=c_A_i_fr;//^In variable assignment:// //^error: There is no local or imported definition with name `c_A_i_fr'// | |
52 | i:=valueof(t_A_i_fr);//^In variable assignment:// //In the operand of operation `valueof\(\)'// //^error: There is no local or imported definition with name `t_A_i_fr'// | |
53 | var A_MyInt_fr myInt_fr; //^In variable definition `myInt_fr'// //^error: There is no local or imported definition with name `A_MyInt_fr'// | |
54 | f_A_fr();//^In function or altstep instance:// //^error: There is no local or imported definition with name `f_A_fr'// | |
55 | ||
56 | i:=c_A_i_pr;//^In variable assignment:// //^error: There is no local or imported definition with name `c_A_i_pr'// | |
57 | i:=valueof(t_A_i_pr);//^In variable assignment:// //In the operand of operation `valueof\(\)'// //^error: There is no local or imported definition with name `t_A_i_pr'// | |
58 | var A_MyInt_pr a_myInt_pr;//^In variable definition `a_myInt_pr'// //^error: There is no local or imported definition with name `A_MyInt_pr'// | |
59 | f_A_pr();//^In function or altstep instance:// //^error: There is no local or imported definition with name `f_A_pr'// | |
60 | setverdict(pass); | |
61 | } | |
62 | ||
63 | testcase tc_B() runs on MTC {//^In testcase definition `tc_B':// | |
64 | var integer i:=c_B_i; //^In variable definition `i':// //^error: There is no local or imported definition with name `c_B_i'// | |
65 | i:=valueof(t_B_i); //^In variable assignment:// //In the operand of operation `valueof\(\)'// //^error: There is no local or imported definition with name `t_B_i'// | |
66 | i:=valueof(t_B_i_pu); //^In variable assignment:// //In the operand of operation `valueof\(\)'// //^error: There is no local or imported definition with name `t_B_i_pu'// | |
67 | var B_MyInt myInt; //^In variable definition `myInt'// //^error: There is no local or imported definition with name `B_MyInt'// | |
68 | var B_MyInt_pu myInt_pu; //^In variable definition `myInt_pu'// //^error: There is no local or imported definition with name `B_MyInt_pu'// | |
69 | f_B(); //^In function or altstep instance:// //^error: There is no local or imported definition with name `f_B'// | |
70 | f_B_pu();//^In function or altstep instance:// //^error: There is no local or imported definition with name `f_B_pu'// | |
71 | ||
72 | ||
73 | i:=c_B_i_fr; //^In variable assignment\:$// //^error: There is no local or imported definition with name `c_B_i_fr'// | |
74 | i:=valueof(t_B_i_fr); //^In variable assignment:// //In the operand of operation `valueof\(\)'// //^error: There is no local or imported definition with name `t_B_i_fr'// | |
75 | var B_MyInt_fr myInt_fr;//^In variable definition \`myInt_fr\'\:$// //^error: There is no local or imported definition with name `B_MyInt_fr'// | |
76 | f_B_fr();//^In function or altstep instance:// //^error: There is no local or imported definition with name `f_B_fr'// | |
77 | ||
78 | i:=c_B_i_pr;//^In variable assignment\:$// //^error: There is no local or imported definition with name `c_B_i_pr'// | |
79 | i:=valueof(t_B_i_pr);//^In variable assignment:// //In the operand of operation `valueof\(\)'// //^error: There is no local or imported definition with name `t_B_i_pr'// | |
80 | var B_MyInt_pr b_myInt_pr; //^In variable definition `b_myInt_pr'////^error: There is no local or imported definition with name `B_MyInt_pr'// | |
81 | f_B_pr(); //^In function or altstep instance:// //^error: There is no local or imported definition with name `f_B_pr'// | |
82 | setverdict(pass); | |
83 | } | |
84 | ||
85 | ||
86 | testcase tc_C() runs on MTC { //^In testcase definition `tc_C':// | |
87 | var integer i:=c_C_i; //^In variable definition `i':// //^error: There is no local or imported definition with name `c_C_i'// | |
88 | i:=valueof(t_C_i); //^In variable assignment:// //In the operand of operation `valueof\(\)'// //^error: There is no local or imported definition with name `t_C_i'// | |
89 | i:=valueof(t_C_i_pu); //^In variable assignment:// //In the operand of operation `valueof\(\)'// //^error: There is no local or imported definition with name `t_C_i_pu'// | |
90 | var C_MyInt myInt; //^In variable definition `myInt'// //^error: There is no local or imported definition with name `C_MyInt'// | |
91 | var C_MyInt_pu myInt_pu; //^In variable definition `myInt_pu'// //^error: There is no local or imported definition with name `C_MyInt_pu'// | |
92 | f_C(); //^In function or altstep instance:// //^error: There is no local or imported definition with name `f_C'// | |
93 | f_C_pu();//^In function or altstep instance:// //^error: There is no local or imported definition with name `f_C_pu'// | |
94 | ||
95 | i:=c_C_i_fr; //^In variable assignment\:$// //^error: There is no local or imported definition with name `c_C_i_fr'// | |
96 | i:=valueof(t_C_i_fr); //^In variable assignment:// //In the operand of operation `valueof\(\)'// //^error: There is no local or imported definition with name `t_C_i_fr'// | |
97 | var C_MyInt_fr myInt_fr;//^In variable definition \`myInt_fr\'\:$// //^error: There is no local or imported definition with name `C_MyInt_fr'// | |
98 | f_C_fr();//^In function or altstep instance:// //^error: There is no local or imported definition with name `f_C_fr'// | |
99 | ||
100 | i:=c_C_i_pr;//^In variable assignment\:$// //^error: There is no local or imported definition with name `c_C_i_pr'// | |
101 | i:=valueof(t_C_i_pr);//^In variable assignment:// //In the operand of operation `valueof\(\)'// //^error: There is no local or imported definition with name `t_C_i_pr'// | |
102 | var C_MyInt_pr c_myInt_pr; //^In variable definition `c_myInt_pr'////^error: There is no local or imported definition with name `C_MyInt_pr'// | |
103 | f_C_pr(); //^In function or altstep instance:// //^error: There is no local or imported definition with name `f_C_pr'// | |
104 | ||
105 | setverdict(pass); | |
106 | } | |
107 | ||
108 | testcase tc_D() runs on MTC { //^In testcase definition `tc_D':// | |
109 | var integer i:=c_D_i; | |
110 | i:=valueof(t_D_i_pu); | |
111 | var D_MyInt myInt; | |
112 | var D_MyInt_pu myInt_pu; | |
113 | f_D_pu(); | |
114 | ||
115 | i:=c_D_i_fr; //^In variable assignment\:$// //^error: There is no local or imported definition with name `c_D_i_fr'// | |
116 | i:=valueof(t_D_i_fr); //^In variable assignment:// //In the operand of operation `valueof\(\)'// //^error: There is no local or imported definition with name `t_D_i_fr'// | |
117 | var D_MyInt_fr myInt_fr;//^In variable definition \`myInt_fr\'\:$// //^error: There is no local or imported definition with name `D_MyInt_fr'// | |
118 | f_D_fr();//^In function or altstep instance:// //^error: There is no local or imported definition with name `f_D_fr'// | |
119 | ||
120 | i:=c_D_i_pr;//^In variable assignment\:$// //^error: There is no local or imported definition with name `c_D_i_pr'// | |
121 | i:=valueof(t_D_i_pr);//^In variable assignment:// //In the operand of operation `valueof\(\)'// //^error: There is no local or imported definition with name `t_D_i_pr'// | |
122 | var D_MyInt_pr d_myInt_pr; //^In variable definition `d_myInt_pr'////^error: There is no local or imported definition with name `D_MyInt_pr'// | |
123 | f_D_pr(); //^In function or altstep instance:// //^error: There is no local or imported definition with name `f_D_pr'// | |
124 | ||
125 | setverdict(pass); | |
126 | } | |
127 | ||
128 | } |