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

Unified Diff: tests/corelib/map_test.dart

Issue 367683002: Use JsonMap even for JSON.decode with custom reviver. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 6b03a1dc4b37d46d21fb176edcf9c38ff752be8d..aa2ae398b3a778f1ca349345475d85c9be33c620 100644
--- a/tests/corelib/map_test.dart
+++ b/tests/corelib/map_test.dart
@@ -8,6 +8,7 @@ import 'dart:collection';
import 'dart:convert' show JSON;
Map newJsonMap() => JSON.decode('{}');
+Map newJsonMapCustomReviver() => JSON.decode('{}', reviver: (key, value) => value);
floitsch 2014/07/01 13:50:58 long line.
void main() {
test(new HashMap());
@@ -19,6 +20,7 @@ void main() {
test(new MapBaseMap());
test(new MapMixinMap());
test(newJsonMap());
+ test(newJsonMapCustomReviver());
testLinkedHashMap();
testMapLiteral();
testNullValue();
@@ -35,6 +37,7 @@ void main() {
testWeirdStringKeys(new MapBaseMap<String, String>());
testWeirdStringKeys(new MapMixinMap<String, String>());
testWeirdStringKeys(newJsonMap());
+ testWeirdStringKeys(newJsonMapCustomReviver());
testNumericKeys(new Map());
testNumericKeys(new Map<num, String>());
@@ -49,6 +52,7 @@ void main() {
testNumericKeys(new MapBaseMap<num, String>());
testNumericKeys(new MapMixinMap<num, String>());
testNumericKeys(newJsonMap());
+ testNumericKeys(newJsonMapCustomReviver());
testNaNKeys(new Map());
testNaNKeys(new Map<num, String>());
@@ -59,6 +63,7 @@ void main() {
testNaNKeys(new MapBaseMap<num, String>());
testNaNKeys(new MapMixinMap<num, String>());
testNaNKeys(newJsonMap());
+ testNaNKeys(newJsonMapCustomReviver());
// Identity maps fail the NaN-keys tests because the test assumes that
// NaN is not equal to NaN.
@@ -87,6 +92,7 @@ void main() {
testIterationOrder(new LinkedHashMap());
testIterationOrder(new LinkedHashMap.identity());
testIterationOrder(newJsonMap());
+ testIterationOrder(newJsonMapCustomReviver());
testOtherKeys(new SplayTreeMap<int, int>());
testOtherKeys(new SplayTreeMap<int, int>((int a, int b) => a - b,
@@ -110,6 +116,7 @@ void main() {
testOtherKeys(new MapBaseMap<int, int>());
testOtherKeys(new MapMixinMap<int, int>());
testOtherKeys(newJsonMap());
+ testOtherKeys(newJsonMapCustomReviver());
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