Titan Core Initial Contribution
[deliverable/titan.core.git] / function_test / Semantic_Analyser / import_of_iports / B_APR_SE.ttcn
CommitLineData
114d1c9a
EL
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'://
9
10// This module
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
13module B_APR_SE {
14
15private import from A_SE all;
16
17type component MTC {};
18
19//==CONST===
20const integer c_B_i := 0;
21public const integer c_B_i_pu := 0;
22friend const integer c_B_i_fr := 0;
23private const integer c_B_i_pr := 0;
24
25//==TEMPLATES===
26template integer t_B_i := 0;
27public template integer t_B_i_pu := 0;
28friend template integer t_B_i_fr := 0;
29private template integer t_B_i_pr := 0;
30
31//===TYPES===
32type integer B_MyInt;
33public type integer B_MyInt_pu;
34private type integer B_MyInt_pr;
35friend type integer B_MyInt_fr;
36
37//==functions
38/* public */ function f_B() { log("This is f_C") }
39public function f_B_pu() { log("This is f_B_pu") }
40friend function f_B_fr() { log("This is f_B_fr") }
41private function f_B_pr() { log("This is f_B_pr") }
42
43//=============Testcases=========================================
44
45testcase tc_A() runs on MTC { //^In testcase definition `tc_A'://
46 var integer i:=c_A_i;
47 i:=c_A_i_pu;
48 i:=valueof(t_A_i_pu);
49 i:=valueof(t_A_i);
50 var A_MyInt myInt;
51 var A_MyInt_pu myInt_pu;
52 f_A();
53 f_A_pu();
54
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'//
59
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'//
64 setverdict(pass);
65}
66
67}
This page took 0.026295 seconds and 5 git commands to generate.