| Index: dart/tests/corelib/safe_to_string_test.dart
|
| diff --git a/dart/tests/corelib/safe_to_string_test.dart b/dart/tests/corelib/safe_to_string_test.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..9a9379f58aec222e16179a6380ee738f88028fb3
|
| --- /dev/null
|
| +++ b/dart/tests/corelib/safe_to_string_test.dart
|
| @@ -0,0 +1,18 @@
|
| +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| +// for details. All rights reserved. Use of this source code is governed by a
|
| +// BSD-style license that can be found in the LICENSE file.
|
| +
|
| +main() {
|
| + Expect.stringEquals('1', NoSuchMethodError.safeToString(1));
|
| + Expect.stringEquals('0.5', NoSuchMethodError.safeToString(0.5));
|
| + Expect.stringEquals('"1"', NoSuchMethodError.safeToString("1"));
|
| + Expect.stringEquals('"\'"', NoSuchMethodError.safeToString("'"));
|
| + Expect.stringEquals('"\'\'"', NoSuchMethodError.safeToString("''"));
|
| + Expect.stringEquals(r'"\""', NoSuchMethodError.safeToString('"'));
|
| + Expect.stringEquals(r'"\"\""', NoSuchMethodError.safeToString('""'));
|
| + Expect.stringEquals('null', NoSuchMethodError.safeToString(null));
|
| + Expect.stringEquals('true', NoSuchMethodError.safeToString(true));
|
| + Expect.stringEquals('false', NoSuchMethodError.safeToString(false));
|
| + Expect.stringEquals("Instance of 'Object'",
|
| + NoSuchMethodError.safeToString(new Object()));
|
| +}
|
|
|