/*****************************************************************
 ** @author   STF 470
 ** @version  0.0.1
 ** @purpose  1:22.4, Verify behaviour of any port.check(receive) with assignment in case of unsuccessful match in standalone statement
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/
module Sem_2204_the_check_operation_016 {

	type integer address;

	type port P message {
		inout integer;
	}

    type component GeneralComp {
		port P p1, p2;
		var address v_addr;
	}

	altstep a() runs on GeneralComp {
		[] any port.receive {
			if (not isbound(v_addr)) { setverdict(pass, "As expected, the check operation didn't match"); }
			else { setverdict(fail, "The address value should still be undefined at this point"); }
			stop;
		}
	}
	testcase TC_Sem_2204_the_check_operation_016() runs on GeneralComp {
		activate(a());
		p2.send(integer:1) to 80;
        any port.check(receive(integer:(100..200)) from address:(20..100) -> sender v_addr);
		setverdict(fail, "Incorrect match");
    }

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