/*****************************************************************
 ** @author   STF 470
 ** @version  0.0.1
 ** @purpose  1:21.3.7, Verify that error occurs when any from done is applied to single component
 ** @verdict  pass reject
 *****************************************************************/
// The following requirements are tested:
// Restriction c
// The ComponentArrayRef shall be a reference to a component array variable identifier.
module NegSem_210307_done_operation_002 {

    type component GeneralComp {}

	function f() runs on GeneralComp {
		timer t := 100.0;
		t.start;
		t.timeout;
	}

    testcase TC_NegSem_210307_done_operation_002() runs on GeneralComp system GeneralComp {
        var GeneralComp v_ptc := GeneralComp.create;
		v_ptc.start(f());
		alt
		{
        	[] any from v_ptc.done { setverdict(pass); }
			[else] { setverdict(fail, "The any from done operation didn't find done components"); }
		}
    }

    control {
        execute(TC_NegSem_210307_done_operation_002(), 5.0);
    }
}