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.0.6, ensure that anytype can comprise set of and record of types
13 ** @verdict pass accept, ttcn3verdict:pass
14 ***************************************************/
15 module Sem_060206_anytype_018 {
17 type record of integer FirstRecordOf; // record of integers
18 type set of boolean FirstSetOf; // set of booleans
21 type component GeneralComp {
23 var anytype x; // Anytype x and y variables
26 var FirstRecordOf MyVar1 := { 0, 5, 2, -, 6 };
27 // MyVar1 follows type FirstRecordOf with values 0,5,2,-,6
28 var FirstSetOf MyVar2 := { true, -,-, false, true};
29 // MyVar2 follows type FirstSetOf with values true,-,-,false,true
33 testcase TC_Sem_060206_anytype_018() runs on GeneralComp {
35 x.FirstRecordOf := MyVar1; // anytype x is now a record of type with values of MyVar1
36 y.FirstSetOf := MyVar2; // anytype x is now a set of type with values of MyVar2
38 if (match(x.FirstRecordOf[0], 0) and match(x.FirstRecordOf[4], 6) and match(y.FirstSetOf[0], true) and match(y.FirstSetOf[3], false) ) {
48 execute(TC_Sem_060206_anytype_018());
53 extension "anytype FirstRecordOf, FirstSetOf"