| Index: tests/isolate/message3_test.dart
|
| diff --git a/tests/isolate/message3_test.dart b/tests/isolate/message3_test.dart
|
| index a29c8f94a931772a040b62313c68ff09c5504ecc..c07a7e68329820d9aa0e660c28e3fb5c4d808b17 100644
|
| --- a/tests/isolate/message3_test.dart
|
| +++ b/tests/isolate/message3_test.dart
|
| @@ -211,6 +211,8 @@ void runTests(SendPort ping, Queue checks) {
|
| Expect.isTrue(x is LinkedHashMap);
|
| Expect.listEquals(["foo", "bar"], x.keys.toList());
|
| Expect.listEquals([499, 32], x.values.toList());
|
| + Expect.equals(499, x["foo"]);
|
| + Expect.equals(32, x["bar"]);
|
| // Must be mutable.
|
| x["foo"] = 22;
|
| Expect.equals(22, x["foo"]);
|
| @@ -219,6 +221,28 @@ void runTests(SendPort ping, Queue checks) {
|
| Expect.equals(499, x["gee"]);
|
| });
|
|
|
| + Map<String, int> mapWithRemovedKey = {"foo": 499, "bar": 32};
|
| + mapWithRemovedKey.remove("foo");
|
| + ping.send(mapWithRemovedKey);
|
| + checks.add((x) {
|
| + Expect.isTrue(x is LinkedHashMap);
|
| + Expect.listEquals(["bar"], x.keys.toList());
|
| + Expect.listEquals([32], x.values.toList());
|
| + Expect.equals(32, x["bar"]);
|
| + });
|
| +
|
| + // Test map where a key does not define ==/hashCode.
|
| + Map<A, int> mapWithIdentityKey = new Map<A, int>();
|
| + mapWithIdentityKey[new A()] = 499;
|
| + ping.send(mapWithIdentityKey);
|
| + checks.add((x) {
|
| + Expect.isTrue(x is LinkedHashMap);
|
| + int value = x.values.first;
|
| + Expect.equals(499, value);
|
| + A key = x.keys.first;
|
| + Expect.equals(499, x[key]);
|
| + });
|
| +
|
| ping.send({0: 499, 1: 32});
|
| checks.add((x) {
|
| Expect.isTrue(x is LinkedHashMap);
|
|
|