/*****************************************************************
 ** @author   STF 451
 ** @version  0.0.1
 ** @purpose  1:21.3.4, Ensure that all component kill stop all ptcs
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/
//Kill all component (ptc and ptc2) with all component.kill
module Sem_210304_kill_test_component_002 {

    type component GeneralComp {
	 var integer v_gc:=0;
	 var integer v_res:=0;}
	function f1 ( ) runs on GeneralComp {}

    testcase TC_Sem_210304_kill_test_component_002() runs on GeneralComp system GeneralComp {
        var GeneralComp ptc;
        var GeneralComp ptc2;
		ptc:=GeneralComp.create alive;
		ptc2:=GeneralComp.create alive;

		ptc.start(f1());
		ptc2.start(f1());

        all component.kill;

		if (all component.alive==false) {
        setverdict(pass);
        }
        else
        {
        setverdict(fail);
        }

    }

    control {
        execute(TC_Sem_210304_kill_test_component_002());
    }
}