conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / B_matching_incoming_values / B01_template_matching / B0104_matching_attributes_of_values / B010401_length_restrictions / NegSem_B010401_length_restrictions_003.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.4.1, Ensure that the IUT correctly handles template matching of value length definitions
13 ** @verdict pass reject
14 ***************************************************/
15
16 module NegSem_B010401_length_restrictions_003 {
17
18
19 type record MessageType {
20 record of integer field1,
21 record of integer field2,
22 record of integer field3,
23 record of integer field4
24 }
25
26 type port loopbackPort message {
27 inout MessageType
28 } with {extension "internal"}
29
30 type component GeneralComp {
31 port loopbackPort messagePort
32 }
33
34 testcase TC_NegSem_B010401_length_restrictions_003() runs on GeneralComp {
35
36 var MessageType v_testMessage;
37
38 template MessageType mw_matchingTemplate:= {
39 field1 := { permutation ( 1, 2, 3 ), * } length (4), // message length is too short
40 field2 := { (1,2),* } length (2 .. 5),
41 field3 := { permutation ( 1, 2, 3 ), ? } length (4),
42 field4 := { (1,2),? } length (2 .. 5)
43 }
44
45 v_testMessage:= {
46 field1 := {2,1,3},
47 field2 := {2,1,3,5},
48 field3 := {2,1,3,5},
49 field4 := {1,1}
50 }
51
52 connect(self:messagePort, self:messagePort);
53 messagePort.send(v_testMessage);
54
55 alt {
56 [] messagePort.receive(mw_matchingTemplate) {
57 setverdict(fail);
58 }
59 [] messagePort.receive {
60 setverdict(pass);
61 }
62 }
63 }
64
65 control{
66 execute(TC_NegSem_B010401_length_restrictions_003());
67 }
68
69 }
70
This page took 0.04651 seconds and 5 git commands to generate.