Sync with 5.4.0
[deliverable/titan.core.git] / function_test / Semantic_Analyser / import_of_iports / B_APU_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 `B_APU_SE'://
9 // This module is
10 // 1. a module with "public import from A_SE all;" to test import statement located in next modules and this module
11 // 2. a module which is a friend of A
12 // 3. a module whose friend is C_BPU_SE.ttcn
13 module B_APU_SE {
14
15 public import from A_SE all;
16
17 friend module C_BPU_SE;
18
19 type component MTC {};
20
21 //==CONST===
22 const integer c_B_i := 0;
23 public const integer c_B_i_pu := 0;
24 friend const integer c_B_i_fr := 0;
25 private const integer c_B_i_pr := 0;
26
27 //==TEMPLATES===
28 template integer t_B_i := 0;
29 public template integer t_B_i_pu := 0;
30 friend template integer t_B_i_fr := 0;
31 private template integer t_B_i_pr := 0;
32
33 //===TYPES===
34 type integer B_MyInt;
35 public type integer B_MyInt_pu;
36 private type integer B_MyInt_pr;
37 friend type integer B_MyInt_fr;
38
39 //==functions
40 /* public */ function f_B() { log("This is f_C") }
41 public function f_B_pu() { log("This is f_B_pu") }
42 friend function f_B_fr() { log("This is f_B_fr") }
43 private function f_B_pr() { log("This is f_B_pr") }
44
45
46 //=============Testcases=========================================
47
48 testcase tc_A() runs on MTC { //^In testcase definition `tc_A'://
49 var integer i:=c_A_i;
50 i:=valueof(t_A_i_pu);
51 i:=valueof(t_A_i);
52 var A_MyInt myInt;
53 var A_MyInt_pu myInt_pu;
54 f_A();
55 f_A_pu();
56
57 i:=c_A_i_fr;
58 i:=valueof(t_A_i_fr);
59 var A_MyInt myInt_fr;
60 f_A_fr();
61
62 i:=c_A_i_pr;//^In variable assignment:// //^error: There is no local or imported definition with name `c_A_i_pr'//
63 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'//
64 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'//
65 f_A_pr();//^In function or altstep instance:// //^error: There is no local or imported definition with name `f_A_pr'//
66 setverdict(pass);
67 }
68
69 }
This page took 0.048118 seconds and 5 git commands to generate.