/*****************************************************************
 ** @author   STF 487
 ** @version  0.0.1
 ** @purpose  1:21.3.3, stopping all PTCs from a PTC
 ** @verdict  pass reject
 *****************************************************************/

// The following requirements are tested:
// The all keyword can be used by the MTC only in order to stop all running PTCs but
// the MTC itself.

module NegSem_210303_Stop_test_component_002 {

    type port P message {
        inout integer;
    }

    type component GeneralComp {
        port P p;
    }

	function f() runs on GeneralComp {
        all component.stop;
	}

    testcase TC_NegSem_210303_Stop_test_component_002() runs on GeneralComp system GeneralComp {
        var GeneralComp ptc := GeneralComp.create;
		ptc.start(f());
        ptc.done;
        setverdict(pass);
    }

    control {
        execute(TC_NegSem_210303_Stop_test_component_002());
    }
}