Sync with 5.4.0
[deliverable/titan.core.git] / function_test / Semantic_Analyser / import_of_iports / D_CPU_SE.ttcn
CommitLineData
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 `D_CPU_SE'://
9module D_CPU_SE {
10
11public import from C_BPU_SE all;
12public import from C_BPU_SE { import all };
13
14type component MTC {};
15
16//==CONST===
17const integer c_D_i := 0;
18public const integer c_D_i_pu := 0;
19friend const integer c_D_i_fr := 0;
20private const integer c_D_i_pr := 0;
21
22//==TEMPLATES===
23template integer t_D_i := 0;
24public template integer t_D_i_pu := 0;
25friend template integer t_D_i_fr := 0;
26private template integer t_D_i_pr := 0;
27
28//===TYPES===
29type integer D_MyInt;
30public type integer D_MyInt_pu;
31private type integer D_MyInt_pr;
32friend type integer D_MyInt_fr;
33
34//==functions
35/* public */ function f_D() { log("This is f_D") }
36public function f_D_pu() { log("This is f_D_pu") }
37friend function f_D_fr() { log("This is f_D_fr") }
38private function f_D_pr() { log("This is f_D_pr") }
39
40//=============Testcases=========================================
41
42testcase tc_A() runs on MTC { //^In testcase definition `tc_A'://
43 var integer i:=c_A_i;
44 i:=c_A_i_pu;
45 i:=valueof(t_A_i);
46 i:=valueof(t_A_i_pu);
47 var A_MyInt myInt;
48 var A_MyInt_pu myInt_pu;
49 f_A();
50 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
64testcase 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
87testcase 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}
This page took 0.036196 seconds and 5 git commands to generate.