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 part of dart.core; | 5 /** |
| 6 * This library contains an Expect class with static methods that can be used |
| 7 * for simple unit-tests. |
| 8 */ |
| 9 library expect; |
6 | 10 |
7 /** | 11 /** |
8 * Expect is used for tests that do not want to make use of the | 12 * Expect is used for tests that do not want to make use of the |
9 * Dart unit test library - for example, the core language tests. | 13 * Dart unit test library - for example, the core language tests. |
10 * Third parties are discouraged from using this, and should use | 14 * Third parties are discouraged from using this, and should use |
11 * the expect() function in the unit test library instead for | 15 * the expect() function in the unit test library instead for |
12 * test assertions. | 16 * test assertions. |
13 */ | 17 */ |
14 class Expect { | 18 class Expect { |
15 /** | 19 /** |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 | 294 |
291 bool _identical(a, b) => identical(a, b); | 295 bool _identical(a, b) => identical(a, b); |
292 | 296 |
293 typedef bool _CheckExceptionFn(exception); | 297 typedef bool _CheckExceptionFn(exception); |
294 | 298 |
295 class ExpectException implements Exception { | 299 class ExpectException implements Exception { |
296 ExpectException(this.message); | 300 ExpectException(this.message); |
297 String toString() => message; | 301 String toString() => message; |
298 String message; | 302 String message; |
299 } | 303 } |
OLD | NEW |