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