conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / B_matching_incoming_values / B01_template_matching / B0102_matching_mechanisms / B010202_complemented_value_list / NegSem_B010202_complemented_value_list_004.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.2, Ensure that the IUT correctly handles template matching of complemented value omit
13 ** @verdict pass reject
14 ***************************************************/
15
16 //Restriction e) The complement of a template list shall not match omit.
17
18 module NegSem_B010202_complemented_value_list_004 {
19
20 type record MyRec{
21 integer field1,
22 float field2 optional
23 }
24
25 type port loopbackPort message {
26 inout MyRec
27 } with {extension "internal"}
28
29 type component GeneralComp {
30 port loopbackPort messagePort
31 }
32
33 testcase TC_NegSem_B010202_complemented_value_list_004() runs on GeneralComp {
34
35 var MyRec v_testMessage;
36
37 template MyRec mw_matchingTemp:={field1:=1, field2:=omit};
38
39 template MyRec mw_matchingTemplate:=complement(mw_matchingTemp);
40
41 v_testMessage:= {field1:=1, field2:=omit}; // fail, field1:=1 is not accepted in matching
42
43 connect(self:messagePort, self:messagePort);
44 messagePort.send(v_testMessage);
45
46 alt {
47 [] messagePort.receive(mw_matchingTemplate) {
48 setverdict(pass);
49 }
50 [] messagePort.receive {
51 setverdict(fail);
52 }
53 }
54 }
55
56 control{
57 execute(TC_NegSem_B010202_complemented_value_list_004());
58 }
59
60 }
61
This page took 0.033017 seconds and 5 git commands to generate.