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_001 {
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 := {c:=true}, //a and b fields are omitted
63 field7 := {c:=true}, //a and b fields are omitted
67 } with { optional "implicit omit"}
69 const MessageType c_testMessage:= {
71 field2 := "test string",
75 field6 := {a:=1,b:=omit,c:=true},
76 field7 := {a:=omit,b:=1,c:=true},
82 type port loopbackPort message {
84 } with {extension "internal"}
86 type component GeneralComp {
87 port loopbackPort messagePort
90 testcase TC_Sem_2707_OptionalAttributes_001() runs on GeneralComp {
92 connect(self:messagePort, self:messagePort);
94 var MessageType v_testMessage:=c_testMessage;
96 messagePort.send(v_testMessage);
99 [] messagePort.receive(mw_matchingTemplate) {
102 [] messagePort.receive {
109 execute(TC_Sem_2707_OptionalAttributes_001());