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_013.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, ensure that the two dimensional array type referencing is correctly handled
13 ** @verdict pass accept, ttcn3verdict:pass
14 ***************************************************/
15 module Sem_060207_arrays_013 {
16
17 // The following requirement is tested:
18 // Individual elements of multi-dimensional arrays can be accessed by repeated use of
19 // the index notation.
20 // For assigning values to multi-dimensional arrays, each dimension that is assigned
21 // shall resolve to a set of values enclosed in curly braces.
22
23 type component GeneralComp {
24 }
25
26
27 type integer MyArrayType1[2][3] (1 .. 10);
28
29
30 testcase TC_Sem_060207_arrays_013() runs on GeneralComp {
31
32 var MyArrayType1 v_array1 := {{8, 10, 9},
33 {2, 3, 4}};
34
35 if (v_array1[1][1]==3) {
36 setverdict(pass);
37 }
38 else {
39 setverdict(fail);
40 }
41
42 }
43
44 control {
45 execute(TC_Sem_060207_arrays_013());
46 }
47
48 }
This page took 0.036138 seconds and 5 git commands to generate.