/***************************************************
 ** @author   STF 433
 ** @version  0.0.1
 ** @purpose  1:12, Ensure timer`s elapsed time is plausible
 ** @verdict  pass accept, ttcn3verdict:pass
 ***************************************************/
/*
 * #reqname  /Requirements/12 Declaring timers/Timer value is non-neg float
 **/


module Sem_12_toplevel_timer_006 {
    type component TComp{
        timer t_timer1:=1.05;
        timer t_timer2:=1.0;
        timer t_timer3:=0.95;
    }
    altstep a_step() runs on TComp{
                []t_timer2.timeout{
                    if (match(t_timer3.running, false) and t_timer1.running){
                        setverdict(pass);
                    }
                    else {
                        setverdict(fail);
                    }
                }
                []t_timer1.timeout{
                    setverdict(fail);
                }
            }
    testcase TC_Sem_12_toplevel_timer_006() runs on TComp{

        t_timer1.start;
        t_timer2.start;
        t_timer3.start;
        a_step();

    }
    control{
       execute(TC_Sem_12_toplevel_timer_006())
    }
}