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

module NegSem_B010207_subset_002 {

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

	type record MessageType {
  	 SetType	field1		//subset definition is only allowed over set of
	}

    type port loopbackPort message {
	  inout MessageType
	}


type component GeneralComp {
	  port loopbackPort messagePort
}

testcase TC_NegSem_B010207_subset_002() runs on GeneralComp {

    var MessageType v_testMessage;

 template MessageType mw_matchingTemplate:=
 {
  field1 := subset(1,2)
 }

 v_testMessage:=  {
  field1 := {1}
 }

 messagePort.send(v_testMessage);

}

control{
    execute(TC_NegSem_B010207_subset_002());
}

}
