/*****************************************************************
 ** @author   STF 487 (updated by STF 521)
 ** @version  0.0.2
 ** @purpose  1:22.3.4, null component in the from clause of the getreply 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_220304_getreply_operation_006 {

	signature S();

	type port P procedure {
		inout S;
	}

    type component GeneralComp
	{
		port P p;
	}

	function f() runs on GeneralComp
	{
        p.getcall(S:{});
        p.reply(S:{});
	}

    testcase TC_NegSem_220304_getreply_operation_006() 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.getreply(S:{}) from v_compRef {} // error expected
            [] p.getreply(S:{}) {}
        }
        setverdict(pass);
    }

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