| Index: pkg/matcher/lib/src/interfaces.dart
|
| diff --git a/pkg/matcher/lib/src/interfaces.dart b/pkg/matcher/lib/src/interfaces.dart
|
| index 9fc110781fe8d6260821b5c9abc83be07ee50ed0..f3f0755c6a1c4e91df8f5bf77f140d44f434d4b3 100644
|
| --- a/pkg/matcher/lib/src/interfaces.dart
|
| +++ b/pkg/matcher/lib/src/interfaces.dart
|
| @@ -7,15 +7,6 @@ library matcher.interfaces;
|
| // To decouple the reporting of errors, and allow for extensibility of
|
| // matchers, we make use of some interfaces.
|
|
|
| -/// The ErrorFormatter type is used for functions that
|
| -/// can be used to build up error reports upon [expect] failures.
|
| -/// There is one built-in implementation ([defaultErrorFormatter])
|
| -/// which is used by the default failure handler. If the failure handler
|
| -/// is replaced it may be desirable to replace the [stringDescription]
|
| -/// error formatter with another.
|
| -typedef String ErrorFormatter(actual, Matcher matcher, String reason,
|
| - Map matchState, bool verbose);
|
| -
|
| /// Matchers build up their error messages by appending to
|
| /// Description objects. This interface is implemented by
|
| /// StringDescription. This interface is unlikely to need
|
| @@ -58,7 +49,7 @@ abstract class Matcher {
|
| /// This builds a textual description of a specific mismatch. [item]
|
| /// is the value that was tested by [matches]; [matchState] is
|
| /// the [Map] that was passed to and supplemented by [matches]
|
| - /// with additional information about the mismact, and [mismatchDescription]
|
| + /// with additional information about the mismatch, and [mismatchDescription]
|
| /// is the [Description] that is being built to decribe the mismatch.
|
| /// A few matchers make use of the [verbose] flag to provide detailed
|
| /// information that is not typically included but can be of help in
|
| @@ -66,21 +57,3 @@ abstract class Matcher {
|
| Description describeMismatch(item, Description mismatchDescription,
|
| Map matchState, bool verbose) => mismatchDescription;
|
| }
|
| -
|
| -/// Failed matches are reported using a default IFailureHandler.
|
| -/// The default implementation simply throws [TestFailure]s;
|
| -/// this can be replaced by some other implementation of
|
| -/// IFailureHandler by calling configureExpectHandler.
|
| -abstract class FailureHandler {
|
| - /// This handles failures given a textual decription
|
| - void fail(String reason);
|
| -
|
| - /// This handles failures given the actual [value], the [matcher]
|
| - /// the [reason] (argument from [expect]), some additonal [matchState]
|
| - /// generated by the [matcher], and a verbose flag which controls in
|
| - /// some cases how much [matchState] information is used. It will use
|
| - /// these to create a detailed error message (typically by calling
|
| - /// an [ErrorFormatter]) and then call [fail] with this message.
|
| - void failMatch(actual, Matcher matcher, String reason,
|
| - Map matchState, bool verbose);
|
| -}
|
|
|