/*****************************************************************
 ** @author   STF 487
 ** @version  0.0.1
 ** @purpose  1:22.3.5, simple raise operation
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/
// The following requirements are tested:
// The value part of the raise operation consists of the signature reference followed by the
// exception value.

module Sem_220305_raise_operation_001 {
	signature S() exception(integer);

	type port P procedure {
		inout S;
	}

    type component GeneralComp
	{
		port P p;
	}

	function f() runs on GeneralComp
	{
		p.getcall(S:?);
		p.raise(S, 1);
        setverdict(pass);
	}

    testcase TC_Sem_220305_raise_operation_001() runs on GeneralComp system GeneralComp {
        var GeneralComp v_ptc := GeneralComp.create;
		connect(self:p, v_ptc:p);
        v_ptc.start(f());
	    p.call(S:{}, nowait); // no processing of the exception to avoid possible errors in the catch operation
        v_ptc.done;
    }

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