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

Unified Diff: tests/lib/convert/streamed_conversion_json_encode1_test.dart

Issue 2771453003: Format all tests. (Closed)
Patch Set: Format files Created 3 years, 8 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
Index: tests/lib/convert/streamed_conversion_json_encode1_test.dart
diff --git a/tests/lib/convert/streamed_conversion_json_encode1_test.dart b/tests/lib/convert/streamed_conversion_json_encode1_test.dart
index c25121525eab85a0e57b22e0c053e6864c2c9d20..75dde8b7ed023e2649f8ee15c0d37068fae8f548 100644
--- a/tests/lib/convert/streamed_conversion_json_encode1_test.dart
+++ b/tests/lib/convert/streamed_conversion_json_encode1_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"'],
+];
Stream<String> encode(Object o) {
var encoder = new JsonEncoder();

Powered by Google App Engine
This is Rietveld 408576698