OLD | NEW |
1 part of unittest; | |
2 | |
3 // 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 |
4 // 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 |
5 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
6 | 4 |
7 // To decouple the reporting of errors, and allow for extensibility of | 5 // To decouple the reporting of errors, and allow for extensibility of |
8 // matchers, we make use of some interfaces. | 6 // matchers, we make use of some interfaces. |
9 | 7 |
10 /** | 8 /** |
11 * The ErrorFormatter type is used for functions that | 9 * The ErrorFormatter type is used for functions that |
12 * can be used to build up error reports upon [expect] failures. | 10 * can be used to build up error reports upon [expect] failures. |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 * the [reason] (argument from [expect]), some additonal [matchState] | 90 * the [reason] (argument from [expect]), some additonal [matchState] |
93 * generated by the [matcher], and a verbose flag which controls in | 91 * generated by the [matcher], and a verbose flag which controls in |
94 * some cases how much [matchState] information is used. It will use | 92 * some cases how much [matchState] information is used. It will use |
95 * these to create a detailed error message (typically by calling | 93 * these to create a detailed error message (typically by calling |
96 * an [ErrorFormatter]) and then call [fail] with this message. | 94 * an [ErrorFormatter]) and then call [fail] with this message. |
97 */ | 95 */ |
98 abstract void failMatch(actual, Matcher matcher, String reason, | 96 abstract void failMatch(actual, Matcher matcher, String reason, |
99 MatchState matchState, bool verbose); | 97 MatchState matchState, bool verbose); |
100 } | 98 } |
101 | 99 |
OLD | NEW |