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 accept, ttcn3verdict:pass
14 ***************************************************/
16 module Sem_2707_OptionalAttributes_005 {
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 omitted
63 field7 := {a:=3,c:=true}, //b is omitted
67 } with { optional "implicit omit"} //with { optional (field6,field7) "implicit omit"} not work
70 const MessageType c_testMessage:= {
72 field2 := "test string",
76 field6 := {a:=3,b:=3,c:=true},
77 field7 := {a:=3,b:=3,c:=true},
83 type port loopbackPort message {
85 } with {extension "internal"}
87 type component GeneralComp {
88 port loopbackPort messagePort
91 testcase TC_Sem_2707_OptionalAttributes_005() runs on GeneralComp {
93 connect(self:messagePort, self:messagePort);
95 var MessageType v_testMessage:=c_testMessage;
97 messagePort.send(v_testMessage);
100 [] messagePort.receive(mw_matchingTemplate) {
103 [] messagePort.receive {
110 execute(TC_Sem_2707_OptionalAttributes_005());
113 } with { optional "explicit omit"}