Commit | Line | Data |
---|---|---|
114d1c9a | 1 | /****************************************************************************** |
d44e3c4f | 2 | * Copyright (c) 2000-2016 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 | |
d44e3c4f | 7 | * |
8 | * Contributors: | |
9 | * Balasko, Jeno | |
10 | * | |
114d1c9a EL |
11 | ******************************************************************************/ |
12 | //^In TTCN-3 module `B_SE':// | |
13 | // This module | |
14 | // 1. provides a module with "import from A_SE all;" to test import statement located in next modules and this module | |
15 | // 2. provides a module which is NOT a friend of A | |
16 | module B_SE { | |
17 | ||
18 | import from A_SE all; | |
19 | ||
20 | type component MTC {}; | |
21 | ||
22 | //==CONST=== | |
23 | const integer c_B_i := 0; | |
24 | public const integer c_B_i_pu := 0; | |
25 | friend const integer c_B_i_fr := 0; | |
26 | private const integer c_B_i_pr := 0; | |
27 | ||
28 | //==TEMPLATES=== | |
29 | template integer t_B_i := 0; | |
30 | public template integer t_B_i_pu := 0; | |
31 | friend template integer t_B_i_fr := 0; | |
32 | private template integer t_B_i_pr := 0; | |
33 | ||
34 | //===TYPES=== | |
35 | type integer B_MyInt; | |
36 | public type integer B_MyInt_pu; | |
37 | private type integer B_MyInt_pr; | |
38 | friend type integer B_MyInt_fr; | |
39 | ||
40 | //==functions | |
41 | /* public */ function f_B() { log("This is f_B") } | |
42 | public function f_B_pu() { log("This is f_B_pu") } | |
43 | friend function f_B_fr() { log("This is f_B_fr") } | |
44 | private function f_B_pr() { log("This is f_B_pr") } | |
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; //^In variable assignment:// //^error: There is no local or imported definition with name `c_A_i_fr'// | |
58 | 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'// | |
59 | var A_MyInt_fr myInt_fr; //^In variable definition `myInt_fr'// //^error: There is no local or imported definition with name `A_MyInt_fr'// | |
60 | f_A_fr();//^In function or altstep instance:// //^error: There is no local or imported definition with name `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 | ||
67 | setverdict(pass); | |
68 | } | |
69 | ||
70 | } |