conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / 22_communication_operations / 2202_message_based_communication / 220203_trigger_operation / Sem_220203_TriggerOperation_019.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.2.3, any from port.trigger statement
13 ** @verdict pass accept, ttcn3verdict:pass
14 *****************************************************************/
15
16 // The following requirements are tested:
17 // To trigger on a message at any port from a specific port array, use the any from
18 // PortArrayRef syntax where PortArrayRef shall be a reference to a port array
19 // identifier.
20
21 module Sem_220203_TriggerOperation_019 {
22
23 type port P message {
24 inout integer;
25 } with {extension "internal"}
26
27 type component GeneralComp
28 {
29 port P p [3];
30 port P altP;
31 }
32
33 testcase TC_Sem_220203_TriggerOperation_019() runs on GeneralComp {
34
35 connect(self:p[2], self:p[2]);
36 connect(self:altP, self:altP);
37
38 p[2].send(10);
39 altP.send(1);
40
41 alt {
42 [] any from p.trigger(integer:?) { setverdict(pass); }
43 [] any port.receive { setverdict(fail); }
44 }
45 }
46
47 control {
48 execute(TC_Sem_220203_TriggerOperation_019(), 5.0);
49 }
50 }
This page took 0.032093 seconds and 5 git commands to generate.