Commit 3beb2335 authored by urbant's avatar urbant
Browse files

New tests for 19.9

parent 960070b8
Loading
Loading
Loading
Loading
+38 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 487
 ** @version  0.0.1
 ** @purpose  1:19.9, stop statement in a function called from a PTC
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/

// The following requirement is tested:
// When invoked in a test case, altstep or function that are executed on a test
// component, it terminates the relevant test component.

module Sem_1909_stop_statement_003 {

    type component GeneralComp {	
    }
    
    function f_stop() runs on GeneralComp {
        setverdict(pass); 
        stop;
    }
    
    function f_ptc() runs on GeneralComp {
        f_stop();
        setverdict(fail);
    }
    
    testcase TC_Sem_1909_stop_statement_003 () runs on GeneralComp system GeneralComp {
        var GeneralComp v_ptc := GeneralComp.create;
        v_ptc.start(f_ptc());
        v_ptc.done;
    }
    
    
    control {
        execute(TC_Sem_1909_stop_statement_003());
    }

}
+35 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 487
 ** @version  0.0.1
 ** @purpose  1:19.9, stop statement in a function called from a PTC
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/

// The following requirement is tested:
// When invoked in a test case, altstep or function that are executed on a test
// component, it terminates the relevant test component.

module Sem_1909_stop_statement_004 {

    type component GeneralComp {	
    }
        
    testcase TC_Sem_1909_stop_statement_004 () runs on GeneralComp {
        setverdict(pass);  
    }
    
    testcase TC_not_to_be_executed () runs on GeneralComp{
        setverdict(fail);  
    }

    function f_stop() {
        execute(TC_Sem_1909_stop_statement_004());
        stop;
    }

    control {
        f_stop();
        execute(TC_not_to_be_executed());
    }

}