Commit | Line | Data |
---|---|---|
114d1c9a EL |
1 | /****************************************************************************** |
2 | * Copyright (c) 2000-2014 Ericsson Telecom AB | |
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 `D_FR_SE':// | |
9 | module D_FR_SE { | |
10 | ||
11 | public import from C_FR_SE all; | |
12 | public import from C_FR_SE { import all }; | |
13 | ||
14 | type component MTC {}; | |
15 | ||
16 | //==CONST=== | |
17 | const integer c_D_i := 0; | |
18 | public const integer c_D_i_pu := 0; | |
19 | friend const integer c_D_i_fr := 0; | |
20 | private const integer c_D_i_pr := 0; | |
21 | ||
22 | //==TEMPLATES=== | |
23 | template integer t_D_i := 0; | |
24 | public template integer t_D_i_pu := 0; | |
25 | friend template integer t_D_i_fr := 0; | |
26 | private template integer t_D_i_pr := 0; | |
27 | ||
28 | //===TYPES=== | |
29 | type integer D_MyInt; | |
30 | public type integer D_MyInt_pu; | |
31 | private type integer D_MyInt_pr; | |
32 | friend type integer D_MyInt_fr; | |
33 | ||
34 | //==functions | |
35 | /* public */ function f_D() { log("This is f_D") } | |
36 | public function f_D_pu() { log("This is f_D_pu") } | |
37 | friend function f_D_fr() { log("This is f_D_fr") } | |
38 | private function f_D_pr() { log("This is f_D_pr") } | |
39 | ||
40 | //=============Testcases========================================= | |
41 | // "friend import from A_SE all;" of B_CEFR_SE has been lost now because B_CEFR_SE is not friend of D_FR_SE | |
42 | ||
43 | testcase tc_A() runs on MTC { //^In testcase definition `tc_A':// | |
44 | var integer i:=c_A_i; //^In variable definition \`i\'\:$// //^error: There is no local or imported definition with name `c_A_i'// | |
45 | 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'// | |
46 | 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'// | |
47 | var A_MyInt myInt; //^In variable definition `myInt'// //^error: There is no local or imported definition with name `A_MyInt'// | |
48 | var A_MyInt_pu myInt_pu; //^In variable definition `myInt_pu'// //^error: There is no local or imported definition with name `A_MyInt_pu'// | |
49 | f_A(); //^In function or altstep instance:// //^error: There is no local or imported definition with name `f_A'// | |
50 | f_A_pu();//^In function or altstep instance:// //^error: There is no local or imported definition with name `f_A_pu'// | |
51 | ||
52 | i:=c_A_i_fr;//^In variable assignment:// //^error: There is no local or imported definition with name `c_A_i_fr'// | |
53 | 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'// | |
54 | var A_MyInt_fr myInt_fr; //^In variable definition `myInt_fr'// //^error: There is no local or imported definition with name `A_MyInt_fr'// | |
55 | f_A_fr();//^In function or altstep instance:// //^error: There is no local or imported definition with name `f_A_fr'// | |
56 | ||
57 | i:=c_A_i_pr;//^In variable assignment:// //^error: There is no local or imported definition with name `c_A_i_pr'// | |
58 | 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'// | |
59 | 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'// | |
60 | f_A_pr();//^In function or altstep instance:// //^error: There is no local or imported definition with name `f_A_pr'// | |
61 | setverdict(pass); | |
62 | } | |
63 | ||
64 | testcase tc_B() runs on MTC {//^In testcase definition `tc_B':// | |
65 | var integer i:=c_B_i; | |
66 | i:=c_B_i_pu; | |
67 | i:=valueof(t_B_i_pu); | |
68 | i:=valueof(t_B_i); | |
69 | var B_MyInt myInt; | |
70 | var B_MyInt_pu myInt_pu; | |
71 | f_B(); | |
72 | f_B_pu(); | |
73 | ||
74 | i:=c_B_i_fr; //^In variable assignment\:$// //^error: There is no local or imported definition with name `c_B_i_fr'// | |
75 | 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'// | |
76 | var B_MyInt_fr myInt_fr;//^In variable definition \`myInt_fr\'\:$// //^error: There is no local or imported definition with name `B_MyInt_fr'// | |
77 | f_B_fr();//^In function or altstep instance:// //^error: There is no local or imported definition with name `f_B_fr'// | |
78 | ||
79 | i:=c_B_i_pr;//^In variable assignment\:$// //^error: There is no local or imported definition with name `c_B_i_pr'// | |
80 | 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'// | |
81 | 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'// | |
82 | f_B_pr(); //^In function or altstep instance:// //^error: There is no local or imported definition with name `f_B_pr'// | |
83 | setverdict(pass); | |
84 | } | |
85 | ||
86 | ||
87 | testcase tc_C() runs on MTC { //^In testcase definition `tc_C':// | |
88 | var integer i:=c_C_i; | |
89 | i:=valueof(t_C_i_pu); | |
90 | var C_MyInt myInt; | |
91 | var C_MyInt_pu myInt_pu; | |
92 | f_C_pu(); | |
93 | ||
94 | i:=c_C_i_fr; //^In variable assignment\:$// //^error: There is no local or imported definition with name `c_C_i_fr'// | |
95 | 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'// | |
96 | var C_MyInt_fr myInt_fr;//^In variable definition \`myInt_fr\'\:$// //^error: There is no local or imported definition with name `C_MyInt_fr'// | |
97 | f_C_fr();//^In function or altstep instance:// //^error: There is no local or imported definition with name `f_C_fr'// | |
98 | ||
99 | i:=c_C_i_pr;//^In variable assignment\:$// //^error: There is no local or imported definition with name `c_C_i_pr'// | |
100 | 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'// | |
101 | 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'// | |
102 | f_C_pr(); //^In function or altstep instance:// //^error: There is no local or imported definition with name `f_C_pr'// | |
103 | ||
104 | setverdict(pass); | |
105 | } | |
106 | ||
107 | } |