conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / B_matching_incoming_values / B01_template_matching / B0103_matching_inside_values / B010303_permutation / Sem_B010303_permutation_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.3.3, Ensure that the IUT correctly handles template matching of ? symbols in value elements
13 ** @verdict pass accept, ttcn3verdict:pass
14 ***************************************************/
15
16 module Sem_B010303_permutation_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
31 type component GeneralComp {
32 port loopbackPort messagePort
33 }
34
35 testcase TC_Sem_B010303_permutation_003() runs on GeneralComp {
36
37 var MessageType v_testMessage;
38
39 template MessageType mw_matchingTemplate:= {
40 field1 := { permutation ( 1, 2, 3 ), 5 },
41 field2 := { permutation ( 1, 2, ? ), 5 }, //there is an extra element in the sequence
42 field3 := { permutation ( 1, 2, 3 ), * },
43 field4 := { permutation ( (1,2,3), 2, 3 ), 5 }
44 }
45
46 v_testMessage:= {
47 field1 := {2,1,3,5},
48 field2 := {2,1,8,8,5},
49 field3 := {3,2,1,8},
50 field4 := {3,2,2,5}
51 }
52
53 connect(self:messagePort, self:messagePort);
54 messagePort.send(v_testMessage);
55
56 alt {
57 [] messagePort.receive(mw_matchingTemplate) {
58 setverdict(fail);
59 }
60 [] messagePort.receive {
61 setverdict(pass);
62 }
63 }
64 }
65
66 control{
67 execute(TC_Sem_B010303_permutation_003());
68 }
69
70 }
71
This page took 0.031733 seconds and 5 git commands to generate.