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

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

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

	type port loopbackPort message {
		inout MessageType;
	}


	type component GeneralComp {
		port loopbackPort messagePort;
	}

	testcase TC_NegSem_B010206_superset_002() runs on GeneralComp {

		var MessageType v_testMessage;

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

		v_testMessage := {field1 := {1, 3, 2}};

		messagePort.send(v_testMessage);
	 	setverdict(pass);
	}
	control {
		execute(TC_NegSem_B010206_superset_002());
	}
}
