/*****************************************************************
 ** @author   STF 470
 ** @version  0.0.1
 ** @purpose  1:22.3.2, Verify that error occurs when using @nodefault in a not stand-alone getcall operation
 ** @verdict  pass reject, noexecution
 *****************************************************************/
// The following requirements are tested:
// Restriction o) The @nodefault modifier is allowed only in stand-alone getcall statements.

module NegSyn_220302_getcall_operation_003 {

	signature S();

	type port P procedure {
		inout S;
	}

    type component GeneralComp
	{
		port P p;
	}

	function f() runs on GeneralComp
	{
		var integer v_index;
        alt
		{
        	[] @nodefault any port.getcall  { setverdict(pass); }    // error: modifier can not be used here, not stand-alone statement
			[else] { setverdict(fail, "The any from getcall operation didn't match for some reason"); }
		}
	}

    testcase TC_NegSyn_220302_getcall_operation_003() 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;
    }

    control {
       // execute(TC_NegSyn_220302_getcall_operation_003(), 5.0);
    }
}