| 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 // Test to ensure that StringBuffer and string interpolation behaves | 5 // Test to ensure that StringBuffer and string interpolation behaves |
| 6 // the same and fail fast. | 6 // the same and fail fast. |
| 7 | 7 |
| 8 import "package:expect/expect.dart"; |
| 9 |
| 8 class ToStringWrapper { | 10 class ToStringWrapper { |
| 9 final value; | 11 final value; |
| 10 | 12 |
| 11 ToStringWrapper(this.value); | 13 ToStringWrapper(this.value); |
| 12 | 14 |
| 13 toString() => value; | 15 toString() => value; |
| 14 } | 16 } |
| 15 | 17 |
| 16 wrap(value) => new ToStringWrapper(value); | 18 wrap(value) => new ToStringWrapper(value); |
| 17 | 19 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 Expect.equals('Error', buffer([1])); | 91 Expect.equals('Error', buffer([1])); |
| 90 Expect.equals('Error', buffer(new Object())); | 92 Expect.equals('Error', buffer(new Object())); |
| 91 | 93 |
| 92 Expect.equals('Error', initBuffer(null)); | 94 Expect.equals('Error', initBuffer(null)); |
| 93 Expect.equals('Success', initBuffer("")); | 95 Expect.equals('Success', initBuffer("")); |
| 94 Expect.equals('Success', initBuffer("string")); | 96 Expect.equals('Success', initBuffer("string")); |
| 95 Expect.equals('Error', initBuffer([])); | 97 Expect.equals('Error', initBuffer([])); |
| 96 Expect.equals('Error', initBuffer([1])); | 98 Expect.equals('Error', initBuffer([1])); |
| 97 Expect.equals('Error', initBuffer(new Object())); | 99 Expect.equals('Error', initBuffer(new Object())); |
| 98 } | 100 } |
| OLD | NEW |