/***************************************************
 ** @author   TTF T003
 ** @version  0.0.1
 ** @purpose  1:6.2.15.3, Verify that unmapping of keys is possible
 ** @verdict  pass accept, ttcn3verdict:pass
 ***************************************************/

// The following requirement is tested:
// To remove a mapping from a key to its associated value in a variable of type map, the unmap
// statement may be used.

module Sem_06021503_unmapping_keys_001 {
	type map from charstring to integer TMap1;
	type component C {}

	testcase TC_Sem_06021503_unmapping_keys_001() runs on C {
		var TMap1 v_map := { ["test"] := 1, ["xyz"] := 5 }
		unmap(v_map, "xyz");
		if (v_map["test"] == 1 and not ispresent(v_map["xyz"])) {
			setverdict(pass);
		} else {
			setverdict(fail);
		}
	}

	control {
		execute(TC_Sem_06021503_unmapping_keys_001());
	}
}
