Index: tests/lib/convert/streamed_conversion_json_decode1_test.dart |
diff --git a/tests/lib/convert/streamed_conversion_json_decode1_test.dart b/tests/lib/convert/streamed_conversion_json_decode1_test.dart |
index 8f58cbca3c8c44a9877450051685c379b2945f24..2f7c5624f789f123a4b2b601b534825e24885907 100644 |
--- a/tests/lib/convert/streamed_conversion_json_decode1_test.dart |
+++ b/tests/lib/convert/streamed_conversion_json_decode1_test.dart |
@@ -8,29 +8,56 @@ import 'dart:convert'; |
import "package:async_helper/async_helper.dart"; |
final TESTS = [ |
- [ 5, '5' ], |
- [ -42, '-42' ], |
- [ 3.14, '3.14' ], |
- [ true, 'true' ], |
- [ false, 'false' ], |
- [ null, 'null' ], |
- [ 'quote"or\'', '"quote\\"or\'"' ], |
- [ '', '""' ], |
- [ [], "[]" ], |
- [ [3, -4.5, true, "hi", false], '[3,-4.5,true,"hi",false]' ], |
- [ [null], "[null]" ], |
- [ [[null]], "[[null]]" ], |
- [ [[3]], "[[3]]" ], |
- [ {}, "{}" ], |
- [ { "x": 3, "y": 4.5, "z": "hi", "u": true, "v": false }, |
- '{"x":3,"y":4.5,"z":"hi","u":true,"v":false}' ], |
- [ { "x": null }, '{"x":null}' ], |
- [ { "x": {} }, '{"x":{}}' ], |
- // Note that -0.0 won't be treated the same in JS. The Json spec seems to |
- // allow it, though. |
- [ { "hi there": 499, "'":-0.0 }, '{"hi there":499,"\'":-0.0}' ], |
- [ r'\foo', r'"\\foo"' ], |
- ]; |
+ [5, '5'], |
+ [-42, '-42'], |
+ [3.14, '3.14'], |
+ [true, 'true'], |
+ [false, 'false'], |
+ [null, 'null'], |
+ ['quote"or\'', '"quote\\"or\'"'], |
+ ['', '""'], |
+ [[], "[]"], |
+ [ |
+ [3, -4.5, true, "hi", false], |
+ '[3,-4.5,true,"hi",false]' |
+ ], |
+ [ |
+ [null], |
+ "[null]" |
+ ], |
+ [ |
+ [ |
+ [null] |
+ ], |
+ "[[null]]" |
+ ], |
+ [ |
+ [ |
+ [3] |
+ ], |
+ "[[3]]" |
+ ], |
+ [{}, "{}"], |
+ [ |
+ {"x": 3, "y": 4.5, "z": "hi", "u": true, "v": false}, |
+ '{"x":3,"y":4.5,"z":"hi","u":true,"v":false}' |
+ ], |
+ [ |
+ {"x": null}, |
+ '{"x":null}' |
+ ], |
+ [ |
+ {"x": {}}, |
+ '{"x":{}}' |
+ ], |
+ // Note that -0.0 won't be treated the same in JS. The Json spec seems to |
+ // allow it, though. |
+ [ |
+ {"hi there": 499, "'": -0.0}, |
+ '{"hi there":499,"\'":-0.0}' |
+ ], |
+ [r'\foo', r'"\\foo"'], |
+]; |
bool isJsonEqual(o1, o2) { |
if (o1 == o2) return true; |
@@ -84,11 +111,14 @@ void main() { |
var object = test[0]; |
var string = test[1]; |
var longString = " " |
- " " |
- "$string" |
- " " |
- " "; |
- return [test, [object, longString]]; |
+ " " |
+ "$string" |
+ " " |
+ " "; |
+ return [ |
+ test, |
+ [object, longString] |
+ ]; |
}); |
for (var test in TESTS) { |
var o = test[0]; |