/***************************************************
 ** @author   TTF 014
 ** @version  0.0.1
 ** @purpose  1:15.12, The omit operation
 ** @verdict  pass accept
 ***************************************************/

 /* The following requirements are tested:
 * omit restriction:
 * The omit operatoion checks if a template instance fullfils conditions of the omit restriction.
 */

module Sem_1512_TheOmitOperation_002 {

	type component GeneralComp {}

	type record ExampleType {
		integer a,
		boolean b optional
	}

	template ExampleType m_originalValue := {1, true};
	template(omit) ExampleType m_targetValue := omit(m_originalValue);

	testcase TC_Sem_1512_TheOmitOperation_002() runs on GeneralComp {
		var template(omit) ExampleType v_omit;

		v_omit := m_targetValue;

		if (match(valueof(v_omit.a), 1) and
			match(ispresent(v_omit.b), true )
		   ) {
			setverdict(pass);
		} else {
			setverdict(fail);
		}
	}

	control {
		execute(TC_Sem_1512_TheOmitOperation_002());
	};
}