| 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 main() { | 5 main() { |
| 6 Expect.stringEquals('1', NoSuchMethodError.safeToString(1)); | 6 Expect.stringEquals('1', NoSuchMethodError.safeToString(1)); |
| 7 Expect.stringEquals('0.5', NoSuchMethodError.safeToString(0.5)); | 7 Expect.stringEquals('0.5', NoSuchMethodError.safeToString(0.5)); |
| 8 Expect.stringEquals('"1"', NoSuchMethodError.safeToString("1")); | 8 Expect.stringEquals('"1"', NoSuchMethodError.safeToString("1")); |
| 9 Expect.stringEquals('"\'"', NoSuchMethodError.safeToString("'")); | 9 Expect.stringEquals('"\'"', NoSuchMethodError.safeToString("'")); |
| 10 Expect.stringEquals('"\'\'"', NoSuchMethodError.safeToString("''")); | 10 Expect.stringEquals('"\'\'"', NoSuchMethodError.safeToString("''")); |
| 11 Expect.stringEquals(r'"\""', NoSuchMethodError.safeToString('"')); | 11 Expect.stringEquals(r'"\""', NoSuchMethodError.safeToString('"')); |
| 12 Expect.stringEquals(r'"\"\""', NoSuchMethodError.safeToString('""')); | 12 Expect.stringEquals(r'"\"\""', NoSuchMethodError.safeToString('""')); |
| 13 |
| 14 Expect.stringEquals(r'"\\\"\n\r"', NoSuchMethodError.safeToString('\\"\n\r')); |
| 15 |
| 13 Expect.stringEquals('null', NoSuchMethodError.safeToString(null)); | 16 Expect.stringEquals('null', NoSuchMethodError.safeToString(null)); |
| 14 Expect.stringEquals('true', NoSuchMethodError.safeToString(true)); | 17 Expect.stringEquals('true', NoSuchMethodError.safeToString(true)); |
| 15 Expect.stringEquals('false', NoSuchMethodError.safeToString(false)); | 18 Expect.stringEquals('false', NoSuchMethodError.safeToString(false)); |
| 16 Expect.stringEquals("Instance of 'Object'", | 19 Expect.stringEquals("Instance of 'Object'", |
| 17 NoSuchMethodError.safeToString(new Object())); | 20 NoSuchMethodError.safeToString(new Object())); |
| 18 } | 21 } |
| OLD | NEW |