Commit | Line | Data |
---|---|---|
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; | |
13 | module B_CEFR_SE { | |
14 | ||
15 | friend import from A_SE all; | |
16 | ||
17 | friend module C_FR_SE, E_FR_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_B") } | |
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 | } |