| OLD | NEW |
| 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 'dart:json'; | 8 import 'dart:json'; |
| 8 | 9 |
| 9 main() { | 10 main() { |
| 10 testEscaping(); | 11 testEscaping(); |
| 11 testParse(); | 12 testParse(); |
| 12 testParseInvalid(); | 13 testParseInvalid(); |
| 13 } | 14 } |
| 14 | 15 |
| 15 void testParse() { | 16 void testParse() { |
| 16 // Scalars. | 17 // Scalars. |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 Expect.stringEquals('"\\u001d"', stringify('\u001d')); | 169 Expect.stringEquals('"\\u001d"', stringify('\u001d')); |
| 169 Expect.stringEquals('"\\u001e"', stringify('\u001e')); | 170 Expect.stringEquals('"\\u001e"', stringify('\u001e')); |
| 170 Expect.stringEquals('"\\u001f"', stringify('\u001f')); | 171 Expect.stringEquals('"\\u001f"', stringify('\u001f')); |
| 171 Expect.stringEquals('"\\\""', stringify('"')); | 172 Expect.stringEquals('"\\\""', stringify('"')); |
| 172 Expect.stringEquals('"\\\\"', stringify('\\')); | 173 Expect.stringEquals('"\\\\"', stringify('\\')); |
| 173 Expect.stringEquals('"Got \\b, \\f, \\n, \\r, \\t, \\u0000, \\\\, and \\"."', | 174 Expect.stringEquals('"Got \\b, \\f, \\n, \\r, \\t, \\u0000, \\\\, and \\"."', |
| 174 stringify('Got \b, \f, \n, \r, \t, \u0000, \\, and ".')); | 175 stringify('Got \b, \f, \n, \r, \t, \u0000, \\, and ".')); |
| 175 Expect.stringEquals('"Got \\b\\f\\n\\r\\t\\u0000\\\\\\"."', | 176 Expect.stringEquals('"Got \\b\\f\\n\\r\\t\\u0000\\\\\\"."', |
| 176 stringify('Got \b\f\n\r\t\u0000\\".')); | 177 stringify('Got \b\f\n\r\t\u0000\\".')); |
| 177 } | 178 } |
| OLD | NEW |