Hamcrest-Qt  0.0.1
Hamcrest matchers for C++/Qt
 All Classes Namespaces Functions
Public Member Functions | Protected Member Functions | List of all members
HamcrestQt::DiagnosingMatcher< T > Class Template Referenceabstract
Inheritance diagram for HamcrestQt::DiagnosingMatcher< T >:
HamcrestQt::BaseMatcher< T > HamcrestQt::Matcher< T > HamcrestQt::SelfDescribing HamcrestQt::AllOf< T >

Public Member Functions

virtual bool matches (const T &item) const
 Evaluates the matcher for argument item. More...
 
virtual void describeMismatch (const T &item, Description &mismatchDescription) const
 Generate a description of why the matcher has not accepted the item. More...
 
- Public Member Functions inherited from HamcrestQt::BaseMatcher< T >
virtual QString toString () const
 
- Public Member Functions inherited from HamcrestQt::SelfDescribing
virtual void describeTo (Description &description) const =0
 Generates a description of the object. More...
 

Protected Member Functions

virtual bool matches (const T &item, Description &mismatchDescription) const =0
 

Member Function Documentation

template<typename T >
virtual void HamcrestQt::DiagnosingMatcher< T >::describeMismatch ( const T &  item,
Description mismatchDescription 
) const
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.

Parameters
itemThe item that the Matcher has rejected.
mismatchDescriptionThe description to be built or appended to.

Reimplemented from HamcrestQt::BaseMatcher< T >.

template<typename T >
virtual bool HamcrestQt::DiagnosingMatcher< T >::matches ( const T &  item) const
inlinevirtual

Evaluates the matcher for argument item.

Parameters
itemthe object against which the matcher is evaluated.
Returns
true if item matches, otherwise false.
See Also
BaseMatcher

Implements HamcrestQt::Matcher< T >.


The documentation for this class was generated from the following file: