/*****************************************************************
 ** @author   STF 470
 ** @version  0.0.1
 ** @purpose  1:22.3.4, Verify that error occurs when any from getreply is applied to single port
 ** @verdict  pass reject
 *****************************************************************/
// The following requirements are tested:
// Restriction e
// The PortArrayRef shall be a reference to a port array variable identifier.
module NegSem_220304_getreply_operation_001 {

	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_001() runs on GeneralComp system GeneralComp {
        var GeneralComp v_ptc := GeneralComp.create;
		connect(self:p, v_ptc:p);
		p.call(S:{}, nowait);
		v_ptc.start(f());
		v_ptc.done;
        alt
		{
        	[] any from p.getreply { setverdict(pass); }
			[else] { setverdict(fail, "The any from getreply operation didn't match for some reason"); }
		}
	}

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