Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(400)

Unified Diff: pkg/serialization/test/polyfill_identity_map_test.dart

Issue 11567018: Get rid of the polyfill identity set implementation in favour of a (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: A bit more polyfill that can be removed with this change. Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/serialization/test/polyfill_identity_map_test.dart
diff --git a/pkg/serialization/test/polyfill_identity_set_test.dart b/pkg/serialization/test/polyfill_identity_map_test.dart
similarity index 79%
rename from pkg/serialization/test/polyfill_identity_set_test.dart
rename to pkg/serialization/test/polyfill_identity_map_test.dart
index b44d2cd3a0e7cce1d5a2c841675d237766b2f744..edb7b20b17f4e9e31fbf9ed9ce8a21cfe848c1f2 100644
--- a/pkg/serialization/test/polyfill_identity_set_test.dart
+++ b/pkg/serialization/test/polyfill_identity_map_test.dart
@@ -11,7 +11,7 @@
library identity_set_test;
import '../../unittest/lib/unittest.dart';
-import '../lib/src/polyfill_identity_set.dart';
+import '../lib/src/serialization_helpers.dart';
class Foo {
var x;
@@ -36,4 +36,13 @@ main() {
expect(each, one);
}
});
+
+ test('uniquing primitives', () {
+ var map = new IdentityMap();
+ var one = 'one';
+ var two = new String.fromCharCodes(one.charCodes);
+ map[one] = 1;
+ expect(map[two], 1);
+ expect(map[one], 1);
+ });
}

Powered by Google App Engine
This is Rietveld 408576698