Titan Core Initial Contribution
[deliverable/titan.core.git] / function_test / Semantic_Analyser / import_of_iports / D_SE.ttcn
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_SE'\:$//
9 module D_SE {
10
11 import from C_SE all;
12 import from C_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
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;
88 i:=valueof(t_C_i_pu);
89 var C_MyInt myInt;
90 var C_MyInt_pu myInt_pu;
91 f_C_pu();
92
93 i:=c_C_i_fr; //^In variable assignment\:$// //^error: There is no local or imported definition with name `c_C_i_fr'//
94 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'//
95 var C_MyInt_fr myInt_fr;//^In variable definition \`myInt_fr\'\:$// //^error: There is no local or imported definition with name `C_MyInt_fr'//
96 f_C_fr();//^In function or altstep instance:// //^error: There is no local or imported definition with name `f_C_fr'//
97
98 i:=c_C_i_pr;//^In variable assignment\:$// //^error: There is no local or imported definition with name `c_C_i_pr'//
99 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'//
100 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'//
101 f_C_pr(); //^In function or altstep instance:// //^error: There is no local or imported definition with name `f_C_pr'//
102
103 setverdict(pass);
104 }
105
106 }
This page took 0.036886 seconds and 5 git commands to generate.