Dart API ReferenceunittestMatchState

MatchState Class

MatchState is a simple wrapper around an arbitrary object. [Matcher] [matches] methods can use this to store useful information upon match failures, and this information will be passed to describeMismatch. Each Matcher is responsible for its own use of this state, so the state created by matches should be consistent with that expected by describeMismatch in the same Matcher class, but can vary between classes. The inner state, if set, will typically be a Map with a number of key-value pairs containing relevant state information.

Constructors

Code new MatchState([state]) #

MatchState([this.state]);

Fields

Code var state #

var state = null;