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_019.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, integer array as multidimensional array index (less items than dimension count)
13 ** @verdict pass accept, ttcn3verdict:pass
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 Sem_060207_arrays_019 {
21
22 type component GeneralComp {
23 }
24
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); }
32 }
33
34 control {
35 execute(TC_Sem_060207_arrays_019());
36 }
37
38 }
This page took 0.050568 seconds and 5 git commands to generate.