conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / 08_modules / 0802_module_definitions_part / 080203_importing_from_modules / 08020305_importing_all_definitions_of_a_module / NegSem_08020305_ImportingAllDefinitionsOfAModule_002.ttcn
1 /******************************************************************************
2 * Copyright (c) 2000-2016 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 * Contributors:
9 * Adrien Kirjak – initial implementation
10 *
11 ** @version 0.0.1
12 ** @purpose 1:8.2.3.5, Ensure that the constant is not visible after import with except.
13 ** @verdict pass reject
14 *****************************************************************/
15
16 // The following requirements are tested:
17 // Restriction b
18 // In the set of except statements for an all import, only one except statement per
19 // kind of definition (i.e. for a group, type, etc.) is allowed.
20
21 module NegSem_08020305_ImportingAllDefinitionsOfAModule_002 {
22
23 import from NegSem_08020305_ImportingAllDefinitionsOfAModule_002_import all except {
24 // everything is excluded again
25 group all;
26 type all;
27 template all;
28 const c_test1;
29 testcase all;
30 altstep all;
31 function all;
32 signature all;
33 modulepar all;
34 const c_test2; // error: const present more than once in the except part
35 };
36
37 type component GeneralComp {}
38
39 testcase TC_NegSem_08020305_ImportingAllDefinitionsOfAModule_002() runs on GeneralComp {
40 if (c_myconst == 43532) {
41 setverdict(fail);
42 } else {
43 setverdict(pass);
44 }
45 }
46
47 control{
48 execute(TC_NegSem_08020305_ImportingAllDefinitionsOfAModule_002());
49 }
50 }
51
This page took 0.033254 seconds and 5 git commands to generate.