/***************************************************
 ** @author   STF 521
 ** @version  0.0.1
 ** @purpose  1:22.3.3, verify that in signature parameters of reply operations can contain matching symbols
 ** @verdict  pass accept, ttcn3verdict:pass
 ***************************************************/

// The following requirements are tested:
// b) All out and inout parameters of the signature shall have a specific value i.e.
// the use of matching mechanisms such as AnyValue is not allowed.

module Sem_220303_ReplyOperation_005 {

	type record R {
		integer field1,
		integer field2
	}

    signature S(in R par1);

    type port P procedure {
        inout S;
    }

    type component GeneralComp {
        port P p;
    }

    function f_server() runs on GeneralComp {
		var template R v_rec := { field1 := 0, field2 := ? }
        p.getcall(S:?);
        p.reply(S:{par1 := v_rec});
    }

    testcase TC_Sem_220303_ReplyOperation_005() runs on GeneralComp system GeneralComp {
        var GeneralComp v_ptc := GeneralComp.create("PTC");
        connect(self:p, v_ptc:p);
        v_ptc.start(f_server());
        p.call(S:{ par1 := { field1 := 0, field2 := 10 } }, nowait);
        alt {
			[] p.getreply {}
			[] v_ptc.done {}
		}
        setverdict(pass);
    }

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

}
