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:27.7, Ensure that the IUT correctly handles attribute definitions and their scoping rules
13 ** @verdict pass reject
14 ***************************************************/
16 module NegSem_2707_OptionalAttributes_003 {
18 type enumerated EnumeratedType {e_black, e_white};
20 type record RecordType {
32 type record length (1..2) of integer IntegerList;
34 type set length (1..2) of integer IntegerUList;
36 type union UnionType {
42 type record MessageType {
47 EnumeratedType field5,
55 template MessageType mw_matchingTemplate:=
58 field2 := "test string",
62 field6 := {b:=3,c:=true}, //a is still undefined
63 field7 := {a:=3,c:=true}, //b is still undefined
67 } with { optional (field6.a, field7.b) "implicit omit"}
69 const MessageType c_testMessage:= {
71 field2 := "test string",
75 field6 := {a:=3,b:=3,c:=true},
76 field7 := {a:=3,b:=3,c:=true},
82 type port loopbackPort message {
87 type component GeneralComp {
88 port loopbackPort messagePort
91 testcase TC_NegSem_2707_OptionalAttributes_003() runs on GeneralComp {
93 var MessageType v_testMessage:=c_testMessage;
95 messagePort.send(v_testMessage);
98 [] messagePort.receive(mw_matchingTemplate) { //cannot match not fully defined template
101 [] messagePort.receive {
108 execute(TC_NegSem_2707_OptionalAttributes_003());
111 } with { optional override "explicit omit"}