/*****************************************************************
 ** @author   STF 548
 ** @version  0.0.1
 ** @purpose  1:27.2, Verify that error is generated for an unknown DefinitionRef in group attributes
 ** @verdict  pass reject
 *****************************************************************/

// The following requirement is tested:
// Restriction a:
// DefinitionRef and FieldReference shall refer to a definition or field respectively which is within the module,
// group or definition to which the with statement is associated

module NegSem_2702_the_with_statement_002 {
	group G {
		type component GeneralComp {
		}

		type record R {
		}
	} with { encode(R2) "RuleA" }

	type record of universal charstring RoUC;

	testcase TC_NegSem_2702_the_with_statement_002 () runs on GeneralComp {
		var RoUC v_enc := R.encode;
		if(v_enc[0] == "RuleA") {
			setverdict(pass);
		} else {
			setverdict(fail);
		}
	}


	control{
		execute(TC_NegSem_2702_the_with_statement_002());
	}

}