conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / 20_statement_and_operations_for_alt / 2004_the_interleave_statement / NegSem_2004_InterleaveStatement_003.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:20.4, do-while loop inside interleave
13 ** @verdict pass reject
14 *****************************************************************/
15
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.
21
22 module NegSem_2004_InterleaveStatement_003 {
23
24 type port MyPort message {
25 inout charstring
26 } with {extension "internal"}
27
28 type component GeneralComp {
29 port MyPort p;
30 }
31
32 testcase TC_NegSem_2004_InterleaveStatement_003() runs on GeneralComp {
33
34 connect(self:p, self:p);
35
36 p.send(charstring:"foo");
37 p.send(charstring:"bar");
38
39 interleave {
40 [] p.receive(charstring:"bar") {
41 var integer v_counter := 0;
42 do {
43 v_counter := v_counter + 1;
44 } while(v_counter < 5);
45 }
46 [] p.receive(charstring:"foo") {
47 }
48 }
49 setverdict(pass);
50 }
51
52 control{
53 execute(TC_NegSem_2004_InterleaveStatement_003());
54 }
55 }
This page took 0.032175 seconds and 5 git commands to generate.