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_006.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.6, Ensure that the IUT correctly handles template matching of subset definitions
13 ** @verdict pass reject
14 ***************************************************/
15
16 //Restriction e)
17 /*The individual members of the SubSet's argument and the elements of the template in the all from clause
18 shall not be the matching mechanisms omit, SuperSet, SubSet and the matching attributes (length restriction
19 and ifpresent). In addition, individual members shall not resolve to AnyValueOrNone and individual fields of
20 the template in the all from clause shall not resolve to AnyElementsOrNone or permutation.*/
21
22 module NegSem_B010207_subset_006 {
23
24 type set of integer SoI;
25
26 type port loopbackPort message {
27 inout SoI
28 } with {extension "internal"}
29
30 type component GeneralComp {
31 port loopbackPort messagePort
32 }
33
34 testcase TC_NegSem_B010207_subset_006() runs on GeneralComp {
35
36 var SoI v_testMessage;
37
38 template SoI Template:= subset(3,4);
39
40 template SoI mw_matchingTemplate:= subset(all from Template);
41 //error: The "all from" clause contains a matching mechanism.
42
43 v_testMessage:={2};
44
45 connect(self:messagePort, self:messagePort);
46 messagePort.send(v_testMessage);
47
48 alt {
49 [] messagePort.receive(mw_matchingTemplate) {
50 setverdict(pass);
51 }
52 [] messagePort.receive {
53 setverdict(fail);
54 }
55 }
56 }
57
58 control{
59 execute(TC_NegSem_B010207_subset_006());
60 }
61
62 }
63
This page took 0.035882 seconds and 5 git commands to generate.