/*****************************************************************
 ** @author   STF 572
 ** @version  0.0.1
 ** @purpose  1:7.1.3, Ensure that the less than or equal to operator on enumerations is evaluated correctly with differing values.
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/
// The following requirements are tested:
/* Enumerated values of the same, or different types can be compared. In the case of different enumerated
types, expression "b" of type "B" can be compared with expression "a" of type "A" if the two types "A" and
"B" can be merged to a consistent larger enumerated type (i.e. where numbers are not associated with different
identifiers, see also clause 6.3.2.1). Two enumerated values are equal if and only if both their identifiers and
associated integer values (associated either explicitly or implicitly, see clause 6.2.4) are the same.
 * */


module Sem_070103_RelationalOperators_051 {

type component GeneralComp {
}

type enumerated MyEnumType1 {
	e_monday(2), e_tuesday, e_wednesday, e_thursday, e_friday
};

type enumerated MyEnumType2 {
	e_tuesday, e_wednesday
};

// note: MyEnumType1 and MyEnumType2 have different size, but it has the same identifiers and associated integers

testcase TC_Sem_070103_RelationalOperators_051() runs on GeneralComp {
	var MyEnumType1 v_first := e_tuesday;
	var MyEnumType2 v_second := e_tuesday;

	if ( v_first == v_second ) {
		setverdict(pass);
	} else {
		setverdict(fail);
	}
}

control{
    execute(TC_Sem_070103_RelationalOperators_051());
}

}
