BaseClass for all Matcher implementations. More...
#include <basematcher.h>
Public Member Functions | |
virtual void | describeMismatch (const T &item, Description &description) const |
Generate a description of why the matcher has not accepted the item. More... | |
virtual QString | toString () const |
Public Member Functions inherited from HamcrestQt::Matcher< T > | |
virtual bool | matches (const T &item) const =0 |
Evaluates the matcher for argument item. More... | |
Public Member Functions inherited from HamcrestQt::SelfDescribing | |
virtual void | describeTo (Description &description) const =0 |
Generates a description of the object. More... | |
BaseClass for all Matcher implementations.
|
inlinevirtual |
Generate a description of why the matcher has not accepted the item.
The description will be part of a larger description of why a matching failed, so it should be concise. This method assumes that matches(item)
is false, but will not check this.
item | The item that the Matcher has rejected. |
mismatchDescription | The description to be built or appended to. |
Implements HamcrestQt::Matcher< T >.
Reimplemented in HamcrestQt::Is< T >, HamcrestQt::SubstringMatcher, and HamcrestQt::DiagnosingMatcher< T >.