Dart API ReferenceunittestFailureHandler

FailureHandler Interface

Failed matches are reported using a default IFailureHandler. The default implementation simply throws ExpectExceptions; this can be replaced by some other implementation of IFailureHandler by calling configureExpectHandler.

Implemented by

DefaultFailureHandler

Methods

Code void fail(String reason) #

This handles failures given a textual decription

void fail(String reason);

Code void failMatch(actual, Matcher matcher, String reason, MatchState matchState, bool verbose) #

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,
               MatchState matchState, bool verbose);