Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
testing::gmock_matchers_test::NewEvenMatcherImpl Class Reference
Inheritance diagram for testing::gmock_matchers_test::NewEvenMatcherImpl:
Collaboration diagram for testing::gmock_matchers_test::NewEvenMatcherImpl:

Public Member Functions

virtual bool MatchAndExplain (int x, MatchResultListener *listener) const
 
virtual void DescribeTo (ostream *os) const
 
- Public Member Functions inherited from testing::MatcherInterface< T >
virtual bool MatchAndExplain (T x, MatchResultListener *listener) const =0
 
- Public Member Functions inherited from testing::MatcherDescriberInterface
virtual ~MatcherDescriberInterface ()
 
virtual void DescribeTo (::std::ostream *os) const =0
 
virtual void DescribeNegationTo (::std::ostream *os) const
 

Detailed Description

Definition at line 281 of file gmock-matchers_test.cc.

Member Function Documentation

◆ DescribeTo()

virtual void testing::gmock_matchers_test::NewEvenMatcherImpl::DescribeTo ( ostream * os) const
inlinevirtual

Definition at line 295 of file gmock-matchers_test.cc.

295 {
296 *os << "is an even number";
297 }
os_t os

◆ MatchAndExplain()

virtual bool testing::gmock_matchers_test::NewEvenMatcherImpl::MatchAndExplain ( int x,
MatchResultListener * listener ) const
inlinevirtual

Definition at line 283 of file gmock-matchers_test.cc.

283 {
284 const bool match = x % 2 == 0;
285 // Verifies that we can stream to a listener directly.
286 *listener << "value % " << 2;
287 if (listener->stream() != NULL) {
288 // Verifies that we can stream to a listener's underlying stream
289 // too.
290 *listener->stream() << " == " << (x % 2);
291 }
292 return match;
293 }
Here is the call graph for this function:

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