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:B.1.3.3, Ensure that the IUT correctly handles template matching of ? symbols in value elements
13 ** @verdict pass accept, ttcn3verdict:pass
14 ***************************************************/
16 module Sem_B010303_permutation_003 {
19 type record MessageType {
20 record of integer field1,
21 record of integer field2,
22 record of integer field3,
23 record of integer field4
26 type port loopbackPort message {
28 } with {extension "internal"}
31 type component GeneralComp {
32 port loopbackPort messagePort
35 testcase TC_Sem_B010303_permutation_003() runs on GeneralComp {
37 var MessageType v_testMessage;
39 template MessageType mw_matchingTemplate:= {
40 field1 := { permutation ( 1, 2, 3 ), 5 },
41 field2 := { permutation ( 1, 2, ? ), 5 }, //there is an extra element in the sequence
42 field3 := { permutation ( 1, 2, 3 ), * },
43 field4 := { permutation ( (1,2,3), 2, 3 ), 5 }
48 field2 := {2,1,8,8,5},
53 connect(self:messagePort, self:messagePort);
54 messagePort.send(v_testMessage);
57 [] messagePort.receive(mw_matchingTemplate) {
60 [] messagePort.receive {
67 execute(TC_Sem_B010303_permutation_003());