Sync with 5.4.0
[deliverable/titan.core.git] / function_test / Semantic_Analyser / import_of_iports / B_CEFR_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 `B_CEFR_SE'://
9// This module
10// 1. provides a module with "public import from A_SE all;" to test import statement located in next modules and this module
11// 2. provides a module which is a friend of A
12// 3. provedes a module which is a friend of C_FR_SE and D_FR_SE;
13module B_CEFR_SE {
14
15friend import from A_SE all;
16
17friend module C_FR_SE, E_FR_SE;
18
19type component MTC {};
20
21//==CONST===
22const integer c_B_i := 0;
23public const integer c_B_i_pu := 0;
24friend const integer c_B_i_fr := 0;
25private const integer c_B_i_pr := 0;
26
27//==TEMPLATES===
28template integer t_B_i := 0;
29public template integer t_B_i_pu := 0;
30friend template integer t_B_i_fr := 0;
31private template integer t_B_i_pr := 0;
32
33//===TYPES===
34type integer B_MyInt;
35public type integer B_MyInt_pu;
36private type integer B_MyInt_pr;
37friend type integer B_MyInt_fr;
38
39//==functions
40/* public */ function f_B() { log("This is f_B") }
41public function f_B_pu() { log("This is f_B_pu") }
42friend function f_B_fr() { log("This is f_B_fr") }
43private function f_B_pr() { log("This is f_B_pr") }
44
45
46//=============Testcases=========================================
47
48testcase 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.029064 seconds and 5 git commands to generate.