Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
testing::gmock_matchers_test::IsHalfOfMatcher Class Reference

Public Member Functions

template<typename T1 , typename T2 >
bool MatchAndExplain (const tuple< T1, T2 > &a_pair, MatchResultListener *listener) const
 
void DescribeTo (ostream *os) const
 
void DescribeNegationTo (ostream *os) const
 

Detailed Description

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

Member Function Documentation

◆ DescribeNegationTo()

void testing::gmock_matchers_test::IsHalfOfMatcher::DescribeNegationTo ( ostream * os) const
inline

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

6339 {
6340 *os << "are a pair where the first isn't half of the second";
6341 }
os_t os

◆ DescribeTo()

void testing::gmock_matchers_test::IsHalfOfMatcher::DescribeTo ( ostream * os) const
inline

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

6335 {
6336 *os << "are a pair where the first is half of the second";
6337 }

◆ MatchAndExplain()

template<typename T1 , typename T2 >
bool testing::gmock_matchers_test::IsHalfOfMatcher::MatchAndExplain ( const tuple< T1, T2 > & a_pair,
MatchResultListener * listener ) const
inline

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

6325 {
6326 if (get<0>(a_pair) == get<1>(a_pair)/2) {
6327 *listener << "where the second is " << get<1>(a_pair);
6328 return true;
6329 } else {
6330 *listener << "where the second/2 is " << get<1>(a_pair)/2;
6331 return false;
6332 }
6333 }

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