/*****************************************************************
 ** @author   STF 572
 ** @version  0.0.1
 ** @purpose  1:21.3.10, call operation calling an altstep with no timeout
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/

// The following requirements are tested:
// Similar to the start operation on test components which is not blocking, the blocking call
// operation implicitly uses a start operation, but waits until either the started behaviour has
// terminated or some timeout has occurred.

module Sem_210310_call_test_component_operation_002 {
	type port P message {
	    inout integer;
	}
    type component GeneralComp {
	    port P p;
	}

	altstep a_test() runs on GeneralComp {
	    [] p.receive {
			setverdict(pass);
		}
	}

    testcase TC_Sem_210310_call_test_component_operation_002() runs on GeneralComp system GeneralComp {
        var GeneralComp v_ptc := GeneralComp.create;
        connect(self:p, v_ptc:p);
		p.send(1);
		v_ptc.call(a_test());
		if (v_ptc.running) {
		    setverdict(fail);
		} else {
		    setverdict(pass);
		}
    }

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