xsd2ttcn: list length restriction corrected (Bug 495990)
[deliverable/titan.core.git] / regression_test / controlTimer / TcontrolTimer.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 * Balasko, Jeno
10 * Szabo, Janos Zoltan – initial implementation
11 *
12 ******************************************************************************/
13 module TcontrolTimer {
14
15 type component CT {}
16
17 testcase tc_delay(float delay) runs on CT
18 {
19 timer T := delay;
20 all timer.stop;
21 T.start;
22 T.timeout;
23 setverdict(pass);
24 }
25
26 testcase SetVerdict(verdicttype v) runs on CT
27 {
28 setverdict(v);
29 }
30
31 function f()
32 {
33 timer T := 0.4;
34 T.start;
35 execute(tc_delay(0.1));
36 alt {
37 [] T.timeout { execute(SetVerdict(fail)); }
38 [] any timer.timeout { execute(SetVerdict(pass)); }
39 }
40 }
41
42 control {
43 timer T1 := 0.3, T2 := 0.4;
44 T1.start;
45 execute(tc_delay(0.1));
46 T2.start;
47 alt {
48 [] T1.timeout { execute(SetVerdict(pass)); }
49 [] T2.timeout { execute(SetVerdict(fail)); }
50 }
51 all timer.stop;
52 T1.start;
53 execute(tc_delay(0.1), 0.2);
54 T2.start;
55 alt {
56 [] T1.timeout { execute(SetVerdict(pass)); }
57 [] T2.timeout { execute(SetVerdict(fail)); }
58 }
59 all timer.stop;
60 T1.start;
61 f();
62 }
63
64 }
This page took 0.034407 seconds and 5 git commands to generate.