Index: tests/lib_strong/convert/streamed_conversion_json_encode1_test.dart |
diff --git a/tests/lib_strong/convert/streamed_conversion_json_encode1_test.dart b/tests/lib_strong/convert/streamed_conversion_json_encode1_test.dart |
index 373e29f2cd8523a90944cbbcb56f50bd36ae3f4f..1cfb0489df41355a8aa7df6977a0bdee1906e2fc 100644 |
--- a/tests/lib_strong/convert/streamed_conversion_json_encode1_test.dart |
+++ b/tests/lib_strong/convert/streamed_conversion_json_encode1_test.dart |
@@ -8,30 +8,57 @@ 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. |
- // TODO(rnystrom): Changed to "0". See above comment. |
- [ { "hi there": 499, "'":-0.0 }, '{"hi there":499,"\'":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. |
+ // TODO(rnystrom): Changed to "0". See above comment. |
+ [ |
+ {"hi there": 499, "'": -0.0}, |
+ '{"hi there":499,"\'":0}' |
+ ], |
+ [r'\foo', r'"\\foo"'], |
+]; |
Stream<String> encode(Object o) { |
var encoder = new JsonEncoder(); |