conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / 06_types_and_values / 0602_structured_types_and_values / 060207_arrays / Sem_060207_arrays_022.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, using less indexes than array dimensions on the right hand side of assignments
13 ** @verdict pass accept, ttcn3verdict:pass
14 ***************************************************/
15
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.
23
24 module Sem_060207_arrays_022 {
25
26 type component GeneralComp {
27 }
28
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); }
33 }
34
35 control {
36 execute(TC_Sem_060207_arrays_022());
37 }
38
39 }
This page took 0.032144 seconds and 5 git commands to generate.