conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / 06_types_and_values / 0602_structured_types_and_values / 060207_arrays / NegSem_060207_arrays_021.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:6.2.7, variable-size record of integer as multidimensional array index
13 ** @verdict pass reject
14 ***************************************************/
15
16 // The following requirement is tested:
17 // An array or record of integer restricted to a single size can be used in the
18 // index notation as a short-hand for the repeated index notation.
19
20 module NegSem_060207_arrays_021 {
21
22 type component GeneralComp {
23 }
24
25 type record length(1..2) of integer RI;
26
27 testcase TC_NegSem_060207_arrays_021() runs on GeneralComp {
28 var RI v_rhindexes := { 0, 1 }, v_lhindexes := { 1, 2 }
29 var integer v_arr[2][3] := { { 1, 2, 3 }, { 4, 5, 6 } };
30 // testing both RH and LH side:
31 v_arr[v_lhindexes] := v_arr[v_rhindexes];
32 if (v_arr == { { 1, 2, 3 }, { 4, 5, 2} }) { setverdict(pass); }
33 else { setverdict(fail); }
34 }
35
36 control {
37 execute(TC_NegSem_060207_arrays_021());
38 }
39
40 }
This page took 0.039558 seconds and 5 git commands to generate.