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
9 * Adrien Kirjak – initial implementation
12 ** @purpose 1:22.2.1, broadcast send operation
13 ** @verdict pass accept, ttcn3verdict:pass
14 *****************************************************************/
16 // The following requirements are tested:
17 // Broadcast is defined by using the to clause with all component keyword.
19 module Sem_220201_SendOperation_007 {
23 } with {extension "internal"}
25 type component GeneralComp
30 function f(integer p_expected) runs on GeneralComp
33 [] p.receive(p_expected) { setverdict(pass); }
34 [] p.receive { setverdict(fail); }
38 const integer c_ptcCount := 3;
40 testcase TC_Sem_220201_SendOperation_007() runs on GeneralComp system GeneralComp {
41 var GeneralComp v_ptcs[c_ptcCount];
43 for (var integer i := 0; i < c_ptcCount; i := i + 1) {
44 v_ptcs[i] := GeneralComp.create;
45 connect(self:p, v_ptcs[i]:p);
46 v_ptcs[i].start(f(0));
49 p.send(0) to all component;
55 execute(TC_Sem_220201_SendOperation_007(), 5.0);