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_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.3.3, Ensure that the IUT correctly handles permutation within arrays
13 ** @verdict pass accept, ttcn3verdict:pass
14 ***************************************************/
15
16 module Sem_B010303_permutation_006 {
17
18
19 type record MessageType {
20 integer field1[4],
21 integer field2[4],
22 integer field3[4],
23 integer field4[4]
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_006() runs on GeneralComp {
36
37 var MessageType v_testMessage;
38 var template integer mw_field1 [4] := { permutation ( 1, 2, 3 ), 5 };
39 var template integer mw_field2 [4] := { permutation ( 1, 2, ? ), 5 };
40 var template integer mw_field3 [4] := { permutation ( 1, 2, 3 ), * };
41 var template integer mw_field4 [4] := { permutation ( (1,2,3), 2, 3 ), 5 };
42
43 template MessageType mw_matchingTemplate:= {
44 mw_field1,
45 mw_field2,
46 mw_field3,
47 mw_field4
48 }
49
50 v_testMessage:= {
51 field1 := {2,1,3,5},
52 field2 := {2,1,8,5},
53 field3 := {3,2,1,8},
54 field4 := {3,2,2,5}
55 }
56
57 connect(self:messagePort, self:messagePort);
58 messagePort.send(v_testMessage);
59
60 alt {
61 [] messagePort.receive(mw_matchingTemplate) {
62 setverdict(pass);
63 }
64 [] messagePort.receive {
65 setverdict(fail);
66 }
67 }
68 }
69
70 control{
71 execute(TC_Sem_B010303_permutation_006());
72 }
73
74 }
75
This page took 0.048744 seconds and 5 git commands to generate.