/*****************************************************************
 ** @author   STF 548
 ** @version  0.0.1
 ** @purpose  1:27.2, Verify that AllRef can be used to apply attributes to multiple group items
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/

// The following requirement is tested:
// AllRef can be used to apply attributes to multiple language elements defined within the scope to
// which the with statement is associated. AllRef provides a flexible mechanism to select all language
// elements or all language elements of a certain kind defined in a given scope.

module Sem_2702_the_with_statement_005 {

	group G {
		type component GeneralComp {
		}

		const integer c_int := 1;
		modulepar integer PX_INT := 1;
	} with { encode(const all) "RuleA" }

	const integer c_int2 := 0;

	type record of universal charstring RoUC;

	testcase TC_Sem_2702_the_with_statement_005 () runs on GeneralComp {
		var RoUC v_enc1 := c_int.encode,
			v_enc2 := PX_INT.encode,
			v_enc3 := c_int2.encode;
		if(v_enc1[0] == "RuleA" and lengthof(v_enc2) == 0 and lengthof(v_enc3) == 0) {
			setverdict(pass);
		} else {
			setverdict(fail);
		}
	}


	control{
		execute(TC_Sem_2702_the_with_statement_005());
	}

}