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:20.4, do-while loop inside interleave
13 ** @verdict pass reject
14 *****************************************************************/
16 // The following requirement is tested:
17 // Control transfer statements for, while, do-while, goto, activate,
18 // deactivate, stop, repeat, return, direct call of altsteps as alternatives
19 // and (direct and indirect) calls of user-defined functions, which include
20 // reception statements, shall not be used in interleave statements.
22 module NegSem_2004_InterleaveStatement_003 {
24 type port MyPort message {
26 } with {extension "internal"}
28 type component GeneralComp {
32 testcase TC_NegSem_2004_InterleaveStatement_003() runs on GeneralComp {
34 connect(self:p, self:p);
36 p.send(charstring:"foo");
37 p.send(charstring:"bar");
40 [] p.receive(charstring:"bar") {
41 var integer v_counter := 0;
43 v_counter := v_counter + 1;
44 } while(v_counter < 5);
46 [] p.receive(charstring:"foo") {
53 execute(TC_NegSem_2004_InterleaveStatement_003());