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

Side by Side Diff: tests/lib/convert/json_pretty_test.dart

Issue 1212823002: Fix some tests and exclude others from CRLF rewriting. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Add comments to trigger update of files. Created 5 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 unified diff | Download patch
« no previous file with comments | « tests/language/raw_string_test.dart ('k') | tests/lib/convert/utf84_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // Note: This test relies on LF line endings in the source file.
6
5 library json_pretty_test; 7 library json_pretty_test;
6 8
7 import 'dart:convert'; 9 import 'dart:convert';
8 10
9 import "package:expect/expect.dart"; 11 import "package:expect/expect.dart";
10 12
11 void _testIndentWithNullChar() { 13 void _testIndentWithNullChar() {
12 var encoder = const JsonEncoder.withIndent('\x00'); 14 var encoder = const JsonEncoder.withIndent('\x00');
13 var encoded = encoder.convert([[],[[]]]); 15 var encoded = encoder.convert([[],[[]]]);
14 Expect.equals("[\n\x00[],\n\x00[\n\x00\x00[]\n\x00]\n]", encoded); 16 Expect.equals("[\n\x00[],\n\x00[\n\x00\x00[]\n\x00]\n]", encoded);
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 107
106 var compactOutput = JSON.encode(object); 108 var compactOutput = JSON.encode(object);
107 109
108 encoder = const JsonEncoder.withIndent(null); 110 encoder = const JsonEncoder.withIndent(null);
109 Expect.equals(compactOutput, encoder.convert(object)); 111 Expect.equals(compactOutput, encoder.convert(object));
110 112
111 var prettyDecoded = JSON.decode(prettyOutput); 113 var prettyDecoded = JSON.decode(prettyOutput);
112 114
113 Expect.equals(compactOutput, JSON.encode(prettyDecoded)); 115 Expect.equals(compactOutput, JSON.encode(prettyDecoded));
114 } 116 }
OLDNEW
« no previous file with comments | « tests/language/raw_string_test.dart ('k') | tests/lib/convert/utf84_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698