/***************************************************
 ** @author   STF 470
 ** @version  0.0.1
 ** @purpose  1:6.2.3.2, referencing non-existent element of record of value (left-hand side)
 ** @verdict  pass accept, ttcn3verdict:pass
 ***************************************************/

// The following requirement is tested:
// If an indexing operator at the left-hand side of an assignment refers to
// a non-existent element, the value at the right-hand side is assigned to
// the element and all elements with an index smaller than the actual index
// and without assigned value are created with an undefined value.
module Sem_060203_records_and_sets_of_single_types_019 {

	type component GeneralComp {
	}

	type record of integer RoI;

	testcase TC_Sem_060203_records_and_sets_of_single_types_019() runs on GeneralComp {

		var RoI v_rec := { 0, 1 };
		v_rec[3] := 3; // {0, 1, -, 3}
		if (match(v_rec[0], 0) and
			match(v_rec[1], 1) and
			not isbound(v_rec[2]) and
			match(v_rec[3], 3)) {
			setverdict(pass);
		}
		else {
			setverdict(fail);
		}
	}

	control {
		execute(TC_Sem_060203_records_and_sets_of_single_types_019());
	}

}
