/*****************************************************************
 ** @author   STF 548
 ** @version  0.0.1
 ** @purpose  1:27.1.2.0, Verify that attributes of synonym types do not override existing attributes of fields
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/

// The following requirement is tested:
// Attributes defined for a synonym type don't override existing attributes of fields or elements of this synonym type.

module Sem_27010200_general_008 {

    type component GeneralComp {
	}

	type record SourceType2 {
		integer field1,
		integer field2
	} with { encode "Rule1" }

	type SourceType2 SynonymType2 with { encode "Rule3" }

	type record of universal charstring RoUC;

	testcase TC_Sem_27010200_general_008 () runs on GeneralComp {
		var RoUC v_enc1 := SynonymType2.encode,
			v_enc2 := SynonymType2.field1.encode,
			v_enc3 := SynonymType2.field2.encode;
		if(lengthof(v_enc1) == 1 and v_enc1[0] == "Rule3" and
		   lengthof(v_enc2) == 1 and v_enc2[0] == "Rule1" and
		   lengthof(v_enc3) == 1 and v_enc3[0] == "Rule1") {
			setverdict(pass);
		} else {
			setverdict(fail);
		}
	}

	control {
		execute(TC_Sem_27010200_general_008());
	}

}