/***************************************************
 ** @author   STF 409
 ** @version  0.0.1
 ** @purpose  1:B.1.1.1, Ensure that the IUT correctly handles template matching of omitted values
 ** @verdict  pass reject
 ***************************************************/

module NegSem_B010101_omitting_values_001 {

	type record RecordType {
 	 integer  a optional,
 	 integer  b optional,
 	 boolean  c
	}

	type set SetType {
 	 integer  a optional,
 	 integer  b optional,
 	 boolean  c
	}

	type record MessageType {
  	 RecordType		field1,
  	 SetType		field2
	}

    type port loopbackPort message {
	  inout MessageType
	}


type component GeneralComp {
	  port loopbackPort messagePort
}

testcase TC_NegSem_B010101_omitting_values_001() runs on GeneralComp {

    var MessageType v_testMessage;

 template MessageType mw_matchingTemplate:=
 {
  field1 := {a:=1,b:=omit,c:=omit},		//omitting a mandatory field
  field2 := {a:=1,b:=omit,c:=omit}
 }

 v_testMessage:=  {
  field1 := {a:=1,b:=omit,c:=true},
  field2 := {a:=1,b:=omit,c:=true}
 }

 messagePort.send(v_testMessage);

}

control{
    execute(TC_NegSem_B010101_omitting_values_001());
}

}
