conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / 23_timer_operations / 2305_the_running_timer_operation / Sem_2305_timer_running_005.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:23.5, Ensure that correct number of timers from a timer array is still running
13 ** @verdict pass accept, ttcn3verdict:pass
14 ***************************************************/
15
16 module Sem_2305_timer_running_005 {
17 type component TComp {
18 timer t_TimerArray[2][2] :={{3.0,3.0}, {5.0,5.0}};
19 }
20
21 testcase TC_Sem_2305_timer_running_005() runs on TComp {
22
23 var integer v_foundIndex[2];
24 for (var integer i := 0; i < lengthof(t_TimerArray); i := i + 1) {
25 for (var integer j := 0; j < lengthof(t_TimerArray[i]); j := j + 1) {
26 t_TimerArray[i][j].start;
27 }
28 }
29 t_TimerArray[0][0].stop;
30 if (any from t_TimerArray.running -> @index v_foundIndex and v_foundIndex[0] == 0 and v_foundIndex[1] == 1) {
31 setverdict(pass);
32 } else {
33 setverdict(fail, "wrong number of timers running");
34 }
35 }
36
37 control {
38 execute(TC_Sem_2305_timer_running_005())
39 }
40 }
This page took 0.037025 seconds and 5 git commands to generate.