conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / 22_communication_operations / 2203_procedure_based_communication / 220304_getreply_operation / Sem_220304_getreply_operation_001.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:22.3.4, Verify that any from getreply is not triggered if there hasn't been any reply
13 ** @verdict pass accept, ttcn3verdict:pass
14 *****************************************************************/
15 // The following requirements are tested:
16 // To getreply on any port from a specific port array, use the any from PortArrayRef syntax where
17 // PortArrayRef shall be a reference to a port array identifier.
18 // The first port which matches all the criteria will cause the operation to be successful even if
19 // other ports in the array would also meet the criteria.
20 module Sem_220304_getreply_operation_001 {
21 signature S();
22
23 type port P procedure {
24 inout S;
25 } with {extension "internal"}
26
27 const integer c_portCount := 4;
28 type component GeneralComp
29 {
30 port P p[c_portCount];
31 }
32
33 testcase TC_Sem_220304_getreply_operation_001() runs on GeneralComp system GeneralComp {
34 var GeneralComp v_ptc := GeneralComp.create;
35 for(var integer i := 0; i < c_portCount; i := i + 1) {
36 connect(self:p[i], v_ptc:p[i]);
37 }
38
39 alt
40 {
41 [] any from p.getreply { setverdict(fail, "The any from getreply operation produced incorrect match"); }
42 [else] { setverdict(pass); }
43 }
44 }
45
46 control {
47 execute(TC_Sem_220304_getreply_operation_001(), 5.0);
48 }
49 }
This page took 0.036016 seconds and 5 git commands to generate.