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; | |
6 | |
7 /** | 5 /** |
8 * Expect is used for tests that do not want to make use of the | 6 * 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. | 7 * Dart unit test library - for example, the core language tests. |
10 * Third parties are discouraged from using this, and should use | 8 * Third parties are discouraged from using this, and should use |
11 * the expect() function in the unit test library instead for | 9 * the expect() function in the unit test library instead for |
12 * test assertions. | 10 * test assertions. |
13 */ | 11 */ |
14 class Expect { | 12 class Expect { |
15 /** | 13 /** |
16 * Checks whether the expected and actual values are equal (using `==`). | 14 * Checks whether the expected and actual values are equal (using `==`). |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 | 287 |
290 bool _identical(a, b) => identical(a, b); | 288 bool _identical(a, b) => identical(a, b); |
291 | 289 |
292 typedef bool _CheckExceptionFn(exception); | 290 typedef bool _CheckExceptionFn(exception); |
293 | 291 |
294 class ExpectException implements Exception { | 292 class ExpectException implements Exception { |
295 ExpectException(this.message); | 293 ExpectException(this.message); |
296 String toString() => message; | 294 String toString() => message; |
297 String message; | 295 String message; |
298 } | 296 } |
OLD | NEW |