/*****************************************************************
 ** @author   STF 487 (updated by STF 521)
 ** @version  0.0.2
 ** @purpose  1:22.3.6, null component in the multicast list of the from clause of the catch operation
 ** @verdict  pass reject
 *****************************************************************/

// The following requirements are tested:
// No AddressRef in the to clause shall contain the special value null at the time
// of the operation.

module NegSem_220306_catch_operation_007 {

	signature S() exception (charstring);

	type port P procedure {
		inout S;
	}

    type component GeneralComp
	{
		port P p;
	}

	function f() runs on GeneralComp
	{
        p.getcall(S:{});
        p.raise(S, "exc");
	}

    testcase TC_NegSem_220306_catch_operation_007() runs on GeneralComp system GeneralComp {
        var GeneralComp v_compRef := null;
        var GeneralComp v_ptc := GeneralComp.create;
		connect(self:p, v_ptc:p);
		v_ptc.start(f());
		p.call(S:{}) {
            [] p.catch(S, charstring:?) from (mtc, v_compRef) {} // error expected
        }
        setverdict(pass);
    }

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