class MatchResultListener
Defined at line 78 of file ../../third_party/googletest/src/googletest/include/gtest/gtest-matchers.h
To implement a matcher Foo for type T, define:
1. a class FooMatcherMatcher that implements the matcher interface:
using is_gtest_matcher = void;
bool MatchAndExplain(const T
&
, std::ostream*) const;
(MatchResultListener* can also be used instead of std::ostream*)
void DescribeTo(std::ostream*) const;
void DescribeNegationTo(std::ostream*) const;
2. a factory function that creates a Matcher
<T
> object from a
FooMatcherMatcher.
Public Methods
void MatchResultListener (::std::ostream * os)
Creates a listener object with the given underlying ostream. The
listener does not own the ostream, and does not dereference it
in the constructor or destructor.
Defined at line 83 of file ../../third_party/googletest/src/googletest/include/gtest/gtest-matchers.h
template <typename T>
MatchResultListener & operator<< (const T & x)
Streams x to the underlying ostream; does nothing if the ostream
is NULL.
Defined at line 89 of file ../../third_party/googletest/src/googletest/include/gtest/gtest-matchers.h
::std::ostream * stream ()
Returns the underlying ostream.
Defined at line 95 of file ../../third_party/googletest/src/googletest/include/gtest/gtest-matchers.h
bool IsInterested ()
Returns true if and only if the listener is interested in an explanation
of the match result. A matcher's MatchAndExplain() method can use
this information to avoid generating the explanation when no one
intends to hear it.
Defined at line 101 of file ../../third_party/googletest/src/googletest/include/gtest/gtest-matchers.h
void ~MatchResultListener ()
Defined at line 110 of file ../../third_party/googletest/src/googletest/include/gtest/gtest-matchers.h