conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / 15_templates / 1506_referencing_elements_of_templates_or_template_fields / 150603_referencing_record_of_and_set_elements / NegSem_150603_ReferencingRecordOfAndSetElements_001.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:15.6.3, Ensure that referencing an element within a value list causes an error in the context of record of.
13 ** @verdict pass reject
14 *****************************************************************/
15
16 module NegSem_150603_ReferencingRecordOfAndSetElements_001 {
17
18 type component GeneralComp { }
19
20 type record of integer RoI;
21 type record of RoI RoRoI;
22
23 testcase TC_NegSem_150603_ReferencingRecordOfAndSetElements_001() runs on GeneralComp {
24 var template RoI m_one;
25 var template RoRoI m_two;
26 template RoRoI constraint_value := {{},{0},{0,0},{0,0,0}};
27
28 m_two := ( constraint_value, constraint_value ); // value list
29 m_one := m_two[0]; // shall cause an error as we access a value list
30
31 setverdict(fail);
32 }
33
34 control{
35 execute(TC_NegSem_150603_ReferencingRecordOfAndSetElements_001());
36 }
37
38 }
This page took 0.032323 seconds and 5 git commands to generate.