/*****************************************************************
 ** @author   STF 572
 ** @version  0.0.1
 ** @purpose  1:21.3.10, call operation with a verdict clause
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/

// The following requirements are tested:
// Additionally, a redirect clause can be added to the operation which allows assignment of the return
// result (in case that the called function has a return clause) to a variable via the value sub-clause
// and also the assignment of the termination verdict of the called component via the verdict sub-clause.

module Sem_210310_call_test_component_operation_009 {

    type component GeneralComp {}

	function f() runs on GeneralComp {
		setverdict(pass);
	}

    testcase TC_Sem_210310_call_test_component_operation_009() runs on GeneralComp system GeneralComp {
        var GeneralComp v_ptc := GeneralComp.create;
		var verdicttype v_verdict;
        v_ptc.call(f()) -> verdict v_verdict;
		if (v_verdict == pass) {
		    setverdict(pass);
		} else {
		    setverdict(fail);
		}
    }

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