conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / 23_timer_operations / 2306_the_timeout_operation / Sem_2306_timer_timeout_008.ttcn
1 /***************************************************
2 ** @author STF 470, corrected by STF 487
3 ** @version 0.0.1
4 ** @purpose 1:23.6, Ensure that timeout of a timer from a timer array works correctly
5 ** @verdict pass accept, ttcn3verdict:pass
6 ***************************************************/
7
8 module Sem_2306_timer_timeout_008 {
9 type component TComp{
10 timer t_TimerArray[2][2] :={{0.5, 1.0}, {5.0, 5.5}};
11 }
12
13 testcase TC_Sem_2306_timer_timeout_008() runs on TComp{
14 var integer v_foundIndex[2];
15 for (var integer i := 0; i < lengthof(t_TimerArray); i := i + 1) {
16 for (var integer j := 0; j < lengthof(t_TimerArray[i]); j := j + 1) {
17 t_TimerArray[i][j].start;
18 }
19 }
20
21 t_TimerArray[0][0].stop;
22
23 any from t_TimerArray.timeout -> @index v_foundIndex;
24 if(v_foundIndex[0] == 0 and v_foundIndex[1] == 1){
25 setverdict(pass);
26 } else {
27 setverdict(fail, "wrong number of timers with timeout");
28 }
29
30 }
31 control{
32 execute(TC_Sem_2306_timer_timeout_008(), 5.0)
33 }
34 }
This page took 0.044501 seconds and 5 git commands to generate.