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
9 * Adrien Kirjak – initial implementation
12 ** @purpose 1:6.2.7, variable-size record of integer as multidimensional array index
13 ** @verdict pass reject
14 ***************************************************/
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.
20 module NegSem_060207_arrays_021 {
22 type component GeneralComp {
25 type record length(1..2) of integer RI;
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); }
37 execute(TC_NegSem_060207_arrays_021());