Electroneum
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::MatcherDescriberInterface
virtual ~MatcherDescriberInterface ()
 

Detailed Description

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

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

Member Typedef Documentation

◆ KeyType

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

Definition at line 2942 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 2945 of file gmock-matchers.h.

2946  : inner_matcher_(
2947  testing::SafeMatcherCast<const KeyType&>(inner_matcher)) {
2948  }

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 2970 of file gmock-matchers.h.

2970  {
2971  *os << "doesn't have a key that ";
2972  inner_matcher_.DescribeTo(os);
2973  }
void DescribeTo(::std::ostream *os) const
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 2964 of file gmock-matchers.h.

2964  {
2965  *os << "has a key that ";
2966  inner_matcher_.DescribeTo(os);
2967  }
void DescribeTo(::std::ostream *os) const
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 2951 of file gmock-matchers.h.

2952  {
2953  StringMatchResultListener inner_listener;
2954  const bool match = inner_matcher_.MatchAndExplain(key_value.first,
2955  &inner_listener);
2956  const internal::string explanation = inner_listener.str();
2957  if (explanation != "") {
2958  *listener << "whose first field is a value " << explanation;
2959  }
2960  return match;
2961  }
bool MatchAndExplain(T x, MatchResultListener *listener) const
::std::string string
Definition: gtest-port.h:1097
Here is the call graph for this function:

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