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:15.8, Ensure that decoded content match is not allowed for omit template restriction
13 ** @verdict pass reject, noexecution
14 ***************************************************/
16 module NegSem_1508_TemplateRestrictions_051 {
18 type record MessageType {
22 type record Mymessage {
24 bitstring field2 optional
27 type port loopbackPort message
28 {inout MessageType} {extension "internal"};
30 type component GeneralComp {
31 port loopbackPort messagePort
34 testcase TC_NegSem_1508_TemplateRestrictions_051() runs on GeneralComp {
36 var Mymessage v_testMessage;
37 var MessageType Message;
44 Message.payload := bit2hex(encvalue(v_testMessage)); //encode message to payload
46 template (value) MessageType mw_matchingTemplate:=
48 payload := decmatch Mymessage: {field1:= 10, field2 := '1001'B}
49 //error: value restriction not allowed
52 messagePort.send(Message); //send message
55 [] messagePort.receive(mw_matchingTemplate) {
58 [] messagePort.receive {
59 setverdict(fail,mw_matchingTemplate);
66 execute(TC_NegSem_1508_TemplateRestrictions_051());