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 `B_APR_SE'://
11 // 1. provides a module with "private import from A_SE all;" to test import statement located in next modules and this module
12 // 2. provides a module which is NOT a friend of A
15 private import from A_SE all;
17 type component MTC {};
20 const integer c_B_i := 0;
21 public const integer c_B_i_pu := 0;
22 friend const integer c_B_i_fr := 0;
23 private const integer c_B_i_pr := 0;
26 template integer t_B_i := 0;
27 public template integer t_B_i_pu := 0;
28 friend template integer t_B_i_fr := 0;
29 private template integer t_B_i_pr := 0;
33 public type integer B_MyInt_pu;
34 private type integer B_MyInt_pr;
35 friend type integer B_MyInt_fr;
38 /* public */ function f_B() { log("This is f_C") }
39 public function f_B_pu() { log("This is f_B_pu") }
40 friend function f_B_fr() { log("This is f_B_fr") }
41 private function f_B_pr() { log("This is f_B_pr") }
43 //=============Testcases=========================================
45 testcase tc_A() runs on MTC { //^In testcase definition `tc_A'://
51 var A_MyInt_pu myInt_pu;
55 i:=c_A_i_fr; //^In variable assignment:// //^error: There is no local or imported definition with name `c_A_i_fr'//
56 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'//
57 var A_MyInt_fr myInt_fr; //^In variable definition `myInt_fr'// //^error: There is no local or imported definition with name `A_MyInt_fr'//
58 f_A_fr();//^In function or altstep instance:// //^error: There is no local or imported definition with name `f_A_fr'//
60 i:=c_A_i_pr;//^In variable assignment:// //^error: There is no local or imported definition with name `c_A_i_pr'//
61 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'//
62 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'//
63 f_A_pr();//^In function or altstep instance:// //^error: There is no local or imported definition with name `f_A_pr'//