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.2.2, Ensure that the IUT correctly handles template matching of complemented value listing
13 ** @verdict pass accept, ttcn3verdict:pass
14 ***************************************************/
16 module Sem_B010202_complemented_value_list_003 {
18 type enumerated EnumeratedType {e_black, e_white, e_green};
20 type record RecordType {
26 type union UnionType {
32 type record MessageType {
35 EnumeratedType field3,
40 type port loopbackPort message {
42 } with {extension "internal"}
45 type component GeneralComp {
46 port loopbackPort messagePort
49 testcase TC_Sem_B010202_complemented_value_list_003() runs on GeneralComp {
51 var MessageType v_testMessage;
53 template MessageType mw_matchingTemplate:=
55 field1 := complement(1,2),
56 field2 := complement("test string","something else"),
57 field3 := complement(e_green,e_black),
58 field4 := complement({a:=1,b:=1,c:=false},{a:=1,b:=2,c:=true}),
59 field5 := complement({a:=1},{b:=e_white})
64 field2 := "test string", //mismatching complement in the template
66 field4 := {a:=1,b:=2,c:=false},
70 connect(self:messagePort, self:messagePort);
71 messagePort.send(v_testMessage);
74 [] messagePort.receive(mw_matchingTemplate) {
77 [] messagePort.receive {
84 execute(TC_Sem_B010202_complemented_value_list_003());