| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 main() { |
| 6 Expect.stringEquals('1', NoSuchMethodError.safeToString(1)); |
| 7 Expect.stringEquals('0.5', NoSuchMethodError.safeToString(0.5)); |
| 8 Expect.stringEquals('"1"', NoSuchMethodError.safeToString("1")); |
| 9 Expect.stringEquals('"\'"', NoSuchMethodError.safeToString("'")); |
| 10 Expect.stringEquals('"\'\'"', NoSuchMethodError.safeToString("''")); |
| 11 Expect.stringEquals(r'"\""', NoSuchMethodError.safeToString('"')); |
| 12 Expect.stringEquals(r'"\"\""', NoSuchMethodError.safeToString('""')); |
| 13 Expect.stringEquals('null', NoSuchMethodError.safeToString(null)); |
| 14 Expect.stringEquals('true', NoSuchMethodError.safeToString(true)); |
| 15 Expect.stringEquals('false', NoSuchMethodError.safeToString(false)); |
| 16 Expect.stringEquals("Instance of 'Object'", |
| 17 NoSuchMethodError.safeToString(new Object())); |
| 18 } |
| OLD | NEW |