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.2, repeat in alstep branch of alt statements
13 ** @verdict pass accept, ttcn3verdict:pass
14 *****************************************************************/
16 // The following requirement is tested:
17 // If a repeat statement is used in a top alternative in an altstep definition,
18 // it causes a new snapshot and the re-evaluation of the alt statement from
19 // which the altstep has been called. The call of the altstep may either be
20 // done implicitly by the default mechanism (see clause 20.5.1) or explicitly
21 // in the alt statement (see clause 20.2).
23 module Sem_2003_the_repeat_statement_003 {
25 type port MyPort message {
27 } with {extension "internal"}
29 type component GeneralComp {
33 altstep a_receiveAny() runs on GeneralComp {
34 [] p.receive(charstring:?) {
39 testcase TC_Sem_2003_the_repeat_statement_003() runs on GeneralComp {
41 connect(self:p, self:p);
42 p.send(charstring:"foo");
43 p.send(charstring:"bar");
46 [] p.receive(charstring:"bar") {
54 execute(TC_Sem_2003_the_repeat_statement_003());