Sync with 5.4.0
[deliverable/titan.core.git] / function_test / Semantic_Analyser / import_of_iports / E_FR_SE.ttcn
1 /******************************************************************************
2 * Copyright (c) 2000-2015 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 `E_FR_SE'\:$//
9 module E_FR_SE{
10
11 public import from D_FR_SE { import all };
12 public import from D_FR_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 // "friend import from A_SE all;" of B_CEFR_SE has been lost in D_FR_SE
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;
65 i:=c_B_i_pu;
66 i:=valueof(t_B_i_pu);
67 i:=valueof(t_B_i);
68 var B_MyInt myInt;
69 var B_MyInt_pu myInt_pu;
70 f_B();
71 f_B_pu();
72
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 testcase tc_D() runs on MTC { //^In testcase definition `tc_D'://
108 var integer i:=c_D_i;
109 i:=valueof(t_D_i_pu);
110 var D_MyInt myInt;
111 var D_MyInt_pu myInt_pu;
112 f_D_pu();
113
114 i:=c_D_i_fr; //^In variable assignment\:$// //^error: There is no local or imported definition with name `c_D_i_fr'//
115 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'//
116 var D_MyInt_fr myInt_fr;//^In variable definition \`myInt_fr\'\:$// //^error: There is no local or imported definition with name `D_MyInt_fr'//
117 f_D_fr();//^In function or altstep instance:// //^error: There is no local or imported definition with name `f_D_fr'//
118
119 i:=c_D_i_pr;//^In variable assignment\:$// //^error: There is no local or imported definition with name `c_D_i_pr'//
120 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'//
121 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'//
122 f_D_pr(); //^In function or altstep instance:// //^error: There is no local or imported definition with name `f_D_pr'//
123
124 setverdict(pass);
125 }
126
127 }
This page took 0.034174 seconds and 5 git commands to generate.