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

Unified Diff: tests/corelib/map_test.dart

Issue 336863008: Make the JSON decoder (parser) create Dart maps lazily (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review feedback. Created 6 years, 6 months 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
« no previous file with comments | « tests/corelib/json_map_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/map_test.dart
diff --git a/tests/corelib/map_test.dart b/tests/corelib/map_test.dart
index 564cf884c6be04f6c11a8b80a4a7564172d602a0..6b03a1dc4b37d46d21fb176edcf9c38ff752be8d 100644
--- a/tests/corelib/map_test.dart
+++ b/tests/corelib/map_test.dart
@@ -5,6 +5,9 @@
library map_test;
import "package:expect/expect.dart";
import 'dart:collection';
+import 'dart:convert' show JSON;
+
+Map newJsonMap() => JSON.decode('{}');
void main() {
test(new HashMap());
@@ -15,6 +18,7 @@ void main() {
test(new MapView(new SplayTreeMap()));
test(new MapBaseMap());
test(new MapMixinMap());
+ test(newJsonMap());
testLinkedHashMap();
testMapLiteral();
testNullValue();
@@ -30,6 +34,7 @@ void main() {
testWeirdStringKeys(new SplayTreeMap<String, String>());
testWeirdStringKeys(new MapBaseMap<String, String>());
testWeirdStringKeys(new MapMixinMap<String, String>());
+ testWeirdStringKeys(newJsonMap());
testNumericKeys(new Map());
testNumericKeys(new Map<num, String>());
@@ -43,6 +48,7 @@ void main() {
testNumericKeys(new LinkedHashMap<num, String>.identity());
testNumericKeys(new MapBaseMap<num, String>());
testNumericKeys(new MapMixinMap<num, String>());
+ testNumericKeys(newJsonMap());
testNaNKeys(new Map());
testNaNKeys(new Map<num, String>());
@@ -52,6 +58,7 @@ void main() {
testNaNKeys(new LinkedHashMap<num, String>());
testNaNKeys(new MapBaseMap<num, String>());
testNaNKeys(new MapMixinMap<num, String>());
+ testNaNKeys(newJsonMap());
// Identity maps fail the NaN-keys tests because the test assumes that
// NaN is not equal to NaN.
@@ -79,6 +86,7 @@ void main() {
testIterationOrder(new LinkedHashMap());
testIterationOrder(new LinkedHashMap.identity());
+ testIterationOrder(newJsonMap());
testOtherKeys(new SplayTreeMap<int, int>());
testOtherKeys(new SplayTreeMap<int, int>((int a, int b) => a - b,
@@ -101,6 +109,7 @@ void main() {
isValidKey: (v) => v is int));
testOtherKeys(new MapBaseMap<int, int>());
testOtherKeys(new MapMixinMap<int, int>());
+ testOtherKeys(newJsonMap());
testUnmodifiableMap(const {1 : 37});
testUnmodifiableMap(new UnmodifiableMapView({1 : 37}));
« no previous file with comments | « tests/corelib/json_map_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698