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

Side by Side Diff: tests/utils/json_test.dart

Issue 11293180: Update library syntax and fix test status. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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
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('dart:json'); 7 import 'dart:json';
8 8
9 main() { 9 main() {
10 testEscaping(); 10 testEscaping();
11 testParse(); 11 testParse();
12 testParseInvalid(); 12 testParseInvalid();
13 } 13 }
14 14
15 void testParse() { 15 void testParse() {
16 // Scalars. 16 // Scalars.
17 Expect.equals(5, JSON.parse(' 5 ')); 17 Expect.equals(5, JSON.parse(' 5 '));
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 Expect.stringEquals('"\\u001d"', JSON.stringify('\u001d')); 170 Expect.stringEquals('"\\u001d"', JSON.stringify('\u001d'));
171 Expect.stringEquals('"\\u001e"', JSON.stringify('\u001e')); 171 Expect.stringEquals('"\\u001e"', JSON.stringify('\u001e'));
172 Expect.stringEquals('"\\u001f"', JSON.stringify('\u001f')); 172 Expect.stringEquals('"\\u001f"', JSON.stringify('\u001f'));
173 Expect.stringEquals('"\\\""', JSON.stringify('"')); 173 Expect.stringEquals('"\\\""', JSON.stringify('"'));
174 Expect.stringEquals('"\\\\"', JSON.stringify('\\')); 174 Expect.stringEquals('"\\\\"', JSON.stringify('\\'));
175 Expect.stringEquals('"Got \\b, \\f, \\n, \\r, \\t, \\u0000, \\\\, and \\"."', 175 Expect.stringEquals('"Got \\b, \\f, \\n, \\r, \\t, \\u0000, \\\\, and \\"."',
176 JSON.stringify('Got \b, \f, \n, \r, \t, \u0000, \\, and ".')); 176 JSON.stringify('Got \b, \f, \n, \r, \t, \u0000, \\, and ".'));
177 Expect.stringEquals('"Got \\b\\f\\n\\r\\t\\u0000\\\\\\"."', 177 Expect.stringEquals('"Got \\b\\f\\n\\r\\t\\u0000\\\\\\"."',
178 JSON.stringify('Got \b\f\n\r\t\u0000\\".')); 178 JSON.stringify('Got \b\f\n\r\t\u0000\\".'));
179 } 179 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698