Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
testing::internal::SizeIsMatcher< SizeMatcher >::Impl< Container > Class Template Reference

#include <gmock-matchers.h>

Inheritance diagram for testing::internal::SizeIsMatcher< SizeMatcher >::Impl< Container >:
Collaboration diagram for testing::internal::SizeIsMatcher< SizeMatcher >::Impl< Container >:

Public Types

typedef internal::StlContainerView< GTEST_REMOVE_REFERENCE_AND_CONST_(Container)> ContainerView
 
typedef ContainerView::type::size_type SizeType
 

Public Member Functions

 Impl (const SizeMatcher &size_matcher)
 
virtual void DescribeTo (::std::ostream *os) const
 
virtual void DescribeNegationTo (::std::ostream *os) const
 
virtual bool MatchAndExplain (Container container, MatchResultListener *listener) const
 
- Public Member Functions inherited from testing::MatcherInterface< Container >
- Public Member Functions inherited from testing::MatcherDescriberInterface
virtual ~MatcherDescriberInterface ()
 

Detailed Description

template<typename SizeMatcher>
template<typename Container>
class testing::internal::SizeIsMatcher< SizeMatcher >::Impl< Container >

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

Member Typedef Documentation

◆ ContainerView

template<typename SizeMatcher >
template<typename Container >
internal::StlContainerView< GTEST_REMOVE_REFERENCE_AND_CONST_(Container)> testing::internal::SizeIsMatcher< SizeMatcher >::Impl< Container >::ContainerView

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

◆ SizeType

template<typename SizeMatcher >
template<typename Container >
ContainerView::type::size_type testing::internal::SizeIsMatcher< SizeMatcher >::Impl< Container >::SizeType

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

Constructor & Destructor Documentation

◆ Impl()

template<typename SizeMatcher >
template<typename Container >
testing::internal::SizeIsMatcher< SizeMatcher >::Impl< Container >::Impl ( const SizeMatcher & size_matcher)
inlineexplicit

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

2712 : size_matcher_(MatcherCast<SizeType>(size_matcher)) {}

Member Function Documentation

◆ DescribeNegationTo()

template<typename SizeMatcher >
template<typename Container >
virtual void testing::internal::SizeIsMatcher< SizeMatcher >::Impl< Container >::DescribeNegationTo ( ::std::ostream * os) const
inlinevirtual

Reimplemented from testing::MatcherDescriberInterface.

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

2718 {
2719 *os << "size ";
2720 size_matcher_.DescribeNegationTo(os);
2721 }
void DescribeNegationTo(::std::ostream *os) const
os_t os
Here is the call graph for this function:

◆ DescribeTo()

template<typename SizeMatcher >
template<typename Container >
virtual void testing::internal::SizeIsMatcher< SizeMatcher >::Impl< Container >::DescribeTo ( ::std::ostream * os) const
inlinevirtual

Implements testing::MatcherDescriberInterface.

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

2714 {
2715 *os << "size ";
2716 size_matcher_.DescribeTo(os);
2717 }
void DescribeTo(::std::ostream *os) const
Here is the call graph for this function:

◆ MatchAndExplain()

template<typename SizeMatcher >
template<typename Container >
virtual bool testing::internal::SizeIsMatcher< SizeMatcher >::Impl< Container >::MatchAndExplain ( Container container,
MatchResultListener * listener ) const
inlinevirtual

Implements testing::MatcherInterface< Container >.

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

2724 {
2725 SizeType size = container.size();
2726 StringMatchResultListener size_listener;
2727 const bool result = size_matcher_.MatchAndExplain(size, &size_listener);
2728 *listener
2729 << "whose size " << size << (result ? " matches" : " doesn't match");
2730 PrintIfNotEmpty(size_listener.str(), listener->stream());
2731 return result;
2732 }
bool MatchAndExplain(GTEST_REFERENCE_TO_CONST_(T) x, MatchResultListener *listener) const
ContainerView::type::size_type SizeType
void PrintIfNotEmpty(const std::string &explanation, ::std::ostream *os)
Here is the call graph for this function:

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