conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / B_matching_incoming_values / B01_template_matching / B0102_matching_mechanisms / B010207_subset / NegSem_B010207_subset_002.ttcn
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
7 *
8 * Contributors:
9 * Adrien Kirjak – initial implementation
10 *
11 ** @version 0.0.1
12 ** @purpose 1:B.1.2.7, Ensure that the IUT correctly handles template matching of subset definitions
13 ** @verdict pass reject
14 ***************************************************/
15
16 module NegSem_B010207_subset_002 {
17
18 type set SetType {
19 integer a optional,
20 integer b optional,
21 integer c optional
22 }
23
24 type record MessageType {
25 SetType field1 //subset definition is only allowed over set of
26 }
27
28 type port loopbackPort message {
29 inout MessageType
30 } with {extension "internal"}
31
32
33 type component GeneralComp {
34 port loopbackPort messagePort
35 }
36
37 testcase TC_NegSem_B010207_subset_002() runs on GeneralComp {
38
39 var MessageType v_testMessage;
40
41 template MessageType mw_matchingTemplate:= {
42 field1 := subset(1,2)
43 }
44
45 v_testMessage:= {
46 field1 := {a:= 1}
47 }
48
49 connect(self:messagePort, self:messagePort);
50 messagePort.send(v_testMessage);
51
52 }
53
54 control{
55 execute(TC_NegSem_B010207_subset_002());
56 }
57
58 }
59
This page took 0.054103 seconds and 5 git commands to generate.