Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
testing::internal::KeyMatcherImpl< PairType > Class Template Reference

#include <gmock-matchers.h>

Inheritance diagram for testing::internal::KeyMatcherImpl< PairType >:
Collaboration diagram for testing::internal::KeyMatcherImpl< PairType >:

Public Types

typedef RawPairType::first_type KeyType
 

Public Member Functions

typedef GTEST_REMOVE_REFERENCE_AND_CONST_ (PairType) RawPairType
 
template<typename InnerMatcher >
 KeyMatcherImpl (InnerMatcher inner_matcher)
 
virtual bool MatchAndExplain (PairType key_value, MatchResultListener *listener) const
 
virtual void DescribeTo (::std::ostream *os) const
 
virtual void DescribeNegationTo (::std::ostream *os) const
 
- Public Member Functions inherited from testing::MatcherInterface< PairType >
- Public Member Functions inherited from testing::MatcherDescriberInterface
virtual ~MatcherDescriberInterface ()
 

Detailed Description

template<typename PairType>
class testing::internal::KeyMatcherImpl< PairType >

Definition at line 3291 of file gmock-matchers.h.

Member Typedef Documentation

◆ KeyType

template<typename PairType >
RawPairType::first_type testing::internal::KeyMatcherImpl< PairType >::KeyType

Definition at line 3294 of file gmock-matchers.h.

Constructor & Destructor Documentation

◆ KeyMatcherImpl()

template<typename PairType >
template<typename InnerMatcher >
testing::internal::KeyMatcherImpl< PairType >::KeyMatcherImpl ( InnerMatcher inner_matcher)
inlineexplicit

Definition at line 3297 of file gmock-matchers.h.

3298 : inner_matcher_(
3300 }
Matcher< T > SafeMatcherCast(const M &polymorphic_matcher)

Member Function Documentation

◆ DescribeNegationTo()

template<typename PairType >
virtual void testing::internal::KeyMatcherImpl< PairType >::DescribeNegationTo ( ::std::ostream * os) const
inlinevirtual

Reimplemented from testing::MatcherDescriberInterface.

Definition at line 3322 of file gmock-matchers.h.

3322 {
3323 *os << "doesn't have a key that ";
3324 inner_matcher_.DescribeTo(os);
3325 }
void DescribeTo(::std::ostream *os) const
os_t os
Here is the call graph for this function:

◆ DescribeTo()

template<typename PairType >
virtual void testing::internal::KeyMatcherImpl< PairType >::DescribeTo ( ::std::ostream * os) const
inlinevirtual

Implements testing::MatcherDescriberInterface.

Definition at line 3316 of file gmock-matchers.h.

3316 {
3317 *os << "has a key that ";
3318 inner_matcher_.DescribeTo(os);
3319 }
Here is the call graph for this function:

◆ GTEST_REMOVE_REFERENCE_AND_CONST_()

template<typename PairType >
typedef testing::internal::KeyMatcherImpl< PairType >::GTEST_REMOVE_REFERENCE_AND_CONST_ ( PairType )

◆ MatchAndExplain()

template<typename PairType >
virtual bool testing::internal::KeyMatcherImpl< PairType >::MatchAndExplain ( PairType key_value,
MatchResultListener * listener ) const
inlinevirtual

Implements testing::MatcherInterface< PairType >.

Definition at line 3303 of file gmock-matchers.h.

3304 {
3305 StringMatchResultListener inner_listener;
3306 const bool match = inner_matcher_.MatchAndExplain(
3307 pair_getters::First(key_value, Rank0()), &inner_listener);
3308 const std::string explanation = inner_listener.str();
3309 if (explanation != "") {
3310 *listener << "whose first field is a value " << explanation;
3311 }
3312 return match;
3313 }
bool MatchAndExplain(GTEST_REFERENCE_TO_CONST_(T) x, MatchResultListener *listener) const
T::first_type & First(T &x, Rank0)
Here is the call graph for this function:

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