/*****************************************************************
 ** @author   STF 548
 ** @version  0.0.1
 ** @purpose  1:27.5, Verify that a dot notation is available for variant attributes
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/

// The following requirement is tested:
// If multiple encodings (see clause 27.4) are used, the variant attribute value shall be composed
// of two parts separated by a dot. Such variant attributes are called encoding related variant
//  attributes. The first part of the attribute specifies the encodings the variant is related to.
// One possible notation is a comma separated list of strings enclosed in curly brackets if
// the variant is related to multiple encodings. The second part of the attribute (following the dot
// symbol) is a simple string that specifies the variant value.

module Sem_2705_variant_attributes_004 {

    type component GeneralComp {
	}

	type charstring Multi2 with {
		encode "Codec1"; encode "Codec2";
		variant {"Codec1","Codec2"}."Rule1";
	}; // multiple encodings ("Codec1", "Codec2"), variant "Rule1" applies to both of them

	type record of universal charstring RoUC;

	testcase TC_Sem_2705_variant_attributes_004 () runs on GeneralComp {
		var RoUC v_variant1 := Multi2.variant("Codec1"),
            v_variant2 := Multi2.variant("Codec2");
		if(v_variant1 == { "Rule1" } and v_variant2 == { "Rule1" }) {
			setverdict(pass);
		} else {
			setverdict(fail);
		}
	}

	control{
		execute(TC_Sem_2705_variant_attributes_004());
	}

}