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

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

Issue 136373002: Fix JSON encoder accepting NaN and Infinity. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « tests/lib/convert/json_test.dart ('k') | tests/lib/json/json_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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 library jsonTest; 5 library jsonTest;
6 6
7 import "package:expect/expect.dart"; 7 import "package:expect/expect.dart";
8 import 'dart:convert'; 8 import 'dart:convert';
9 9
10 main() { 10 main() {
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 Expect.stringEquals('"\\u001d"', JSON.encode('\u001d')); 169 Expect.stringEquals('"\\u001d"', JSON.encode('\u001d'));
170 Expect.stringEquals('"\\u001e"', JSON.encode('\u001e')); 170 Expect.stringEquals('"\\u001e"', JSON.encode('\u001e'));
171 Expect.stringEquals('"\\u001f"', JSON.encode('\u001f')); 171 Expect.stringEquals('"\\u001f"', JSON.encode('\u001f'));
172 Expect.stringEquals('"\\\""', JSON.encode('"')); 172 Expect.stringEquals('"\\\""', JSON.encode('"'));
173 Expect.stringEquals('"\\\\"', JSON.encode('\\')); 173 Expect.stringEquals('"\\\\"', JSON.encode('\\'));
174 Expect.stringEquals('"Got \\b, \\f, \\n, \\r, \\t, \\u0000, \\\\, and \\"."', 174 Expect.stringEquals('"Got \\b, \\f, \\n, \\r, \\t, \\u0000, \\\\, and \\"."',
175 JSON.encode('Got \b, \f, \n, \r, \t, \u0000, \\, and ".')); 175 JSON.encode('Got \b, \f, \n, \r, \t, \u0000, \\, and ".'));
176 Expect.stringEquals('"Got \\b\\f\\n\\r\\t\\u0000\\\\\\"."', 176 Expect.stringEquals('"Got \\b\\f\\n\\r\\t\\u0000\\\\\\"."',
177 JSON.encode('Got \b\f\n\r\t\u0000\\".')); 177 JSON.encode('Got \b\f\n\r\t\u0000\\".'));
178 } 178 }
OLDNEW
« no previous file with comments | « tests/lib/convert/json_test.dart ('k') | tests/lib/json/json_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698