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, integer array as multidimensional array index (less items than dimension count)
13 ** @verdict pass accept, ttcn3verdict:pass
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 Sem_060207_arrays_019 {
22 type component GeneralComp {
25 testcase TC_Sem_060207_arrays_019() runs on GeneralComp {
26 var integer v_rhindexes[2] := { 0, 1 }, v_lhindexes[2] := { 1, 0 }
27 var integer v_arr[2][2][3] := { { { 1, 2, 3 }, { 4, 5, 6 } }, { { 7, 8, 9 }, { 10, 11, 12 } } };
28 // testing both RH and LH side:
29 v_arr[v_lhindexes] := v_arr[v_rhindexes];
30 if (v_arr == { { { 1, 2, 3 }, { 4, 5, 6 } }, { { 4, 5, 6 }, { 10, 11, 12 } } }) { setverdict(pass); }
31 else { setverdict(fail); }
35 execute(TC_Sem_060207_arrays_019());