Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
testing::internal::OptionalMatcher< ValueMatcher >::Impl< Optional > Class Template Reference

#include <gmock-matchers.h>

Inheritance diagram for testing::internal::OptionalMatcher< ValueMatcher >::Impl< Optional >:
Collaboration diagram for testing::internal::OptionalMatcher< ValueMatcher >::Impl< Optional >:

Public Types

typedef OptionalView::value_type ValueType
 

Public Member Functions

typedef GTEST_REMOVE_REFERENCE_AND_CONST_ (Optional) OptionalView
 
 Impl (const ValueMatcher &value_matcher)
 
virtual void DescribeTo (::std::ostream *os) const
 
virtual void DescribeNegationTo (::std::ostream *os) const
 
virtual bool MatchAndExplain (Optional optional, MatchResultListener *listener) const
 
- Public Member Functions inherited from testing::MatcherInterface< Optional >
- Public Member Functions inherited from testing::MatcherDescriberInterface
virtual ~MatcherDescriberInterface ()
 

Detailed Description

template<typename ValueMatcher>
template<typename Optional>
class testing::internal::OptionalMatcher< ValueMatcher >::Impl< Optional >

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

Member Typedef Documentation

◆ ValueType

template<typename ValueMatcher >
template<typename Optional >
OptionalView::value_type testing::internal::OptionalMatcher< ValueMatcher >::Impl< Optional >::ValueType

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

Constructor & Destructor Documentation

◆ Impl()

template<typename ValueMatcher >
template<typename Optional >
testing::internal::OptionalMatcher< ValueMatcher >::Impl< Optional >::Impl ( const ValueMatcher & value_matcher)
inlineexplicit

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

4017 : value_matcher_(MatcherCast<ValueType>(value_matcher)) {}

Member Function Documentation

◆ DescribeNegationTo()

template<typename ValueMatcher >
template<typename Optional >
virtual void testing::internal::OptionalMatcher< ValueMatcher >::Impl< Optional >::DescribeNegationTo ( ::std::ostream * os) const
inlinevirtual

Reimplemented from testing::MatcherDescriberInterface.

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

4024 {
4025 *os << "value ";
4026 value_matcher_.DescribeNegationTo(os);
4027 }
void DescribeNegationTo(::std::ostream *os) const
os_t os
Here is the call graph for this function:

◆ DescribeTo()

template<typename ValueMatcher >
template<typename Optional >
virtual void testing::internal::OptionalMatcher< ValueMatcher >::Impl< Optional >::DescribeTo ( ::std::ostream * os) const
inlinevirtual

Implements testing::MatcherDescriberInterface.

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

4019 {
4020 *os << "value ";
4021 value_matcher_.DescribeTo(os);
4022 }
void DescribeTo(::std::ostream *os) const
Here is the call graph for this function:

◆ GTEST_REMOVE_REFERENCE_AND_CONST_()

template<typename ValueMatcher >
template<typename Optional >
typedef testing::internal::OptionalMatcher< ValueMatcher >::Impl< Optional >::GTEST_REMOVE_REFERENCE_AND_CONST_ ( Optional )

◆ MatchAndExplain()

template<typename ValueMatcher >
template<typename Optional >
virtual bool testing::internal::OptionalMatcher< ValueMatcher >::Impl< Optional >::MatchAndExplain ( Optional optional,
MatchResultListener * listener ) const
inlinevirtual

Implements testing::MatcherInterface< Optional >.

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

4030 {
4031 if (!optional) {
4032 *listener << "which is not engaged";
4033 return false;
4034 }
4035 const ValueType& value = *optional;
4036 StringMatchResultListener value_listener;
4037 const bool match = value_matcher_.MatchAndExplain(value, &value_listener);
4038 *listener << "whose value " << PrintToString(value)
4039 << (match ? " matches" : " doesn't match");
4040 PrintIfNotEmpty(value_listener.str(), listener->stream());
4041 return match;
4042 }
bool MatchAndExplain(GTEST_REFERENCE_TO_CONST_(T) x, MatchResultListener *listener) const
void PrintIfNotEmpty(const std::string &explanation, ::std::ostream *os)
::std::string PrintToString(const T &value)
#define value
Definition pkcs11.h:157
Here is the call graph for this function:

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