| 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 matcher; | 5 part of unittest.matcher; |
| 6 | 6 |
| 7 /** The objects thrown by the default failure handler. */ | 7 /** The objects thrown by the default failure handler. */ |
| 8 class TestFailure extends Error { | 8 class TestFailure extends Error { |
| 9 final String message; | 9 final String message; |
| 10 | 10 |
| 11 TestFailure(this.message); | 11 TestFailure(this.message); |
| 12 | 12 |
| 13 String toString() => message; | 13 String toString() => message; |
| 14 } | 14 } |
| 15 | 15 |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 * formatter is returned; this allows custom expect handlers to easily | 167 * formatter is returned; this allows custom expect handlers to easily |
| 168 * get a reference to the default formatter. | 168 * get a reference to the default formatter. |
| 169 */ | 169 */ |
| 170 ErrorFormatter configureExpectFormatter([ErrorFormatter formatter = null]) { | 170 ErrorFormatter configureExpectFormatter([ErrorFormatter formatter = null]) { |
| 171 if (formatter == null) { | 171 if (formatter == null) { |
| 172 formatter = _defaultErrorFormatter; | 172 formatter = _defaultErrorFormatter; |
| 173 } | 173 } |
| 174 return _assertErrorFormatter = formatter; | 174 return _assertErrorFormatter = formatter; |
| 175 } | 175 } |
| 176 | 176 |
| OLD | NEW |