/*****************************************************************
 ** @author   STF 487
 ** @version  0.0.1
 ** @purpose  1:22.2.2, invalid format value in @decoded redirect assignment
 ** @verdict  pass reject
 *****************************************************************/

// The following requirements are tested:
// Any other value shall cause an error.

module NegSem_220202_ReceiveOperation_007 {
	type record R
    {
        integer id,
        universal charstring payload
    }

	type port P message {
		inout R;
	}

    type component GeneralComp
	{
		port P p;
	}

    testcase TC_NegSem_220202_ReceiveOperation_007() runs on GeneralComp {
        var integer v_src := 1953719668, v_res with { encode "32bit" };
        var universal charstring v_str := encvalue_unichar(v_src);
        p.send(R:{ id := 1, payload := v_str });
        alt {
            [] p.receive(R:?) -> value (v_res := @decoded("proprietary") payload) {
                setverdict (pass);
            }
            [] p.receive { setverdict(pass); }
        }
    }

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