Commit f0252994 authored by urbant's avatar urbant
Browse files

STF 521 updates

parent 489eccda
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 521
 ** @version  0.0.1
 ** @purpose  1:5.4.1.2, Verify that template parameter of an activated altstep cannot be an out parameter
 ** @verdict  pass reject
 *****************************************************************/

module NegSem_05040102_parameters_of_kind_template_018 {

    altstep a_test(out template integer p_par) runs on C {
        [] any timer.timeout {
            p_par := ?;
        }
    }
    
    type component C {
    }
    
    testcase TC_NegSem_05040102_parameters_of_kind_template_018() {
        var integer v_int := ?;
        activate(a_test(v_int));  
        setverdict(pass);
    }
    
    control {
        execute(TC_NegSem_05040102_parameters_of_kind_template_018());
    }
}
 No newline at end of file
+28 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 521
 ** @version  0.0.1
 ** @purpose  1:5.4.1.2, Verify that template parameter of an activated altstep cannot be an inout parameter
 ** @verdict  pass reject
 *****************************************************************/

module NegSem_05040102_parameters_of_kind_template_018 {

    altstep a_test(inout template integer p_par) runs on C {
        [] any timer.timeout {
            p_par := ?;
        }
    }
    
    type component C {
    }
    
    testcase TC_NegSem_05040102_parameters_of_kind_template_018() {
        var integer v_int := ?;
        activate(a_test(v_int));  
        setverdict(pass);
    }
    
    control {
        execute(TC_NegSem_05040102_parameters_of_kind_template_018());
    }
}
 No newline at end of file
+33 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 521
 ** @version  0.0.1
 ** @purpose  1:5.4.1.3, Verify that functions with timer parameters cannot be used in component.start operation
 ** @verdict  pass reject
 *****************************************************************/

// The following requirement is tested:
// Only function and altstep definitions may have formal timer parameters, with the exception of functions or 
// altsteps started as test component behaviour (see clause 21.3.2).

module NegSem_05040103_parameters_of_kind_timer_001 {    
    
    type component C {
    }
    
    function f_test(inout timer p_tmr) runs on C {
        p_tmr.timeout;
        setverdict(pass);
    }
    
    testcase TC_NegSem_05040103_parameters_of_kind_timer_001() runs on C system C {
    	timer t_tmr := 0.1; 
        var C v_ptc := C.create;
        t_tmr.start;
        v_ptc.start(f_test(t_tmr));
        v_ptc.done;
    }
    
    control {
        execute(TC_NegSem_05040103_parameters_of_kind_timer_001());
    }
}
 No newline at end of file
+34 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 521
 ** @version  0.0.1
 ** @purpose  1:5.4.1.3, Verify that altsteps with timer parameters cannot be used in component.start operation
 ** @verdict  pass reject
 *****************************************************************/

// The following requirement is tested:
// Only function and altstep definitions may have formal timer parameters, with the exception of functions or 
// altsteps started as test component behaviour (see clause 21.3.2).

module NegSem_05040103_parameters_of_kind_timer_002 {    
    
    type component C {
    }
    
    altstep f_test(inout timer p_tmr) runs on C {
        [] p_tmr.timeout {
			setverdict(pass);
		}
    }
    
    testcase TC_NegSem_05040103_parameters_of_kind_timer_002() runs on C system C {
    	timer t_tmr := 0.1; 
        var C v_ptc := C.create;
        t_tmr.start;
        v_ptc.start(f_test(t_tmr));
        v_ptc.done;
    }
    
    control {
        execute(TC_NegSem_05040103_parameters_of_kind_timer_002());
    }
}
 No newline at end of file
+27 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 521
 ** @version  0.0.1
 ** @purpose  1:5.4.1.3, Verify that test cases cannot have timer parameters
 ** @verdict  pass reject
 *****************************************************************/

// The following requirement is tested:
// Only function and altstep definitions may have formal timer parameters, with the exception of functions or 
// altsteps started as test component behaviour (see clause 21.3.2).

module NegSem_05040103_parameters_of_kind_timer_003 {    
    
    type component C {
    }
    
    testcase TC_NegSem_05040103_parameters_of_kind_timer_003(timer p_tmr) runs on C {
        p_tmr.timeout;
        setverdict(pass);
    }
    
    control {
		timer t_tmr := 0.1; 
        t_tmr.start;
        execute(TC_NegSem_05040103_parameters_of_kind_timer_003(t_tmr));
    }
}
 No newline at end of file
Loading