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, using less indexes than array dimensions on the right hand side of assignments
13 ** @verdict pass accept, ttcn3verdict:pass
14 ***************************************************/
16 // The following requirement is tested:
17 // The use of array slices of multi-dimensional arrays, i.e. when the number of
18 // indexes of the array value is less than the number of dimensions in the
19 // corresponding array definition, is allowed. Indexes of array slices shall
20 // correspond to the dimensions of the array definition from left to right (i.e.
21 // the first index of the slice corresponds to the first dimension of the definition).
22 // Slice indexes shall conform to the related array definition dimensions.
24 module Sem_060207_arrays_022 {
26 type component GeneralComp {
29 testcase TC_Sem_060207_arrays_022() runs on GeneralComp {
30 var integer v_arr[2][2][3] := { { { 1, 2, 3 }, { 4, 5, 6 } }, { { 7, 8, 9 }, { 10, 11, 12 } } };
31 if (v_arr[0][1] == { 4, 5, 6 }) { setverdict(pass); }
32 else { setverdict(fail); }
36 execute(TC_Sem_060207_arrays_022());