blob: 7a79e5f1846cb6245310ab3b1154cf4150fbc8d6 [file] [log] [blame]
/*
* Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
* for details. All rights reserved. Use of this source code is governed by a
* BSD-style license that can be found in the LICENSE file.
*/
/**
* @assertion Associates the [key] with the given [value].
* @description Checks that the specified pair is inserted into the map.
* @author msyabro
* @reviewer varlax
*/
library operator_subscripted_assignment_A01_t01;
import "../../../Utils/expect.dart";
test(Map create([Map content])) {
Map<String, Object> map = create();
map[""] = "";
Expect.isTrue(map.containsValue(""));
map[""] = "1";
Expect.isTrue(map.containsKey("") && map.containsValue("1"));
Expect.isTrue(!map.containsValue(""));
map.remove("");
map[""] = map;
Expect.isTrue(map.containsKey("") && map.containsValue(map));
map[""] = null;
Expect.isTrue(map.containsValue(null));
Expect.isTrue(map[""] == null);
}