proxygen
testing::internal::SizeIsMatcher< SizeMatcher >::Impl< Container > Class Template Reference

#include <gmock-matchers.h>

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

Public Types

typedef internal::StlContainerView< GTEST_REMOVE_REFERENCE_AND_CONST_(Container)> ContainerView
 
typedef ContainerView::type::size_type SizeType
 
typedef internal::StlContainerView< GTEST_REMOVE_REFERENCE_AND_CONST_(Container)> ContainerView
 
typedef ContainerView::type::size_type SizeType
 
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
 
 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
 
 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::MatcherDescriberInterface
virtual ~MatcherDescriberInterface ()
 
virtual ~MatcherDescriberInterface ()
 
virtual ~MatcherDescriberInterface ()
 

Private Member Functions

 GTEST_DISALLOW_ASSIGN_ (Impl)
 
 GTEST_DISALLOW_ASSIGN_ (Impl)
 
 GTEST_DISALLOW_ASSIGN_ (Impl)
 

Private Attributes

const Matcher< SizeTypesize_matcher_
 

Detailed Description

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

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

Member Typedef Documentation

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

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

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

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

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

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

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

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

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

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

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

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

Constructor & Destructor Documentation

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

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

2417  : size_matcher_(MatcherCast<SizeType>(size_matcher)) {}
const Matcher< SizeType > size_matcher_
template<typename SizeMatcher >
template<typename Container >
testing::internal::SizeIsMatcher< SizeMatcher >::Impl< Container >::Impl ( const SizeMatcher &  size_matcher)
inlineexplicit

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

2417  : size_matcher_(MatcherCast<SizeType>(size_matcher)) {}
const Matcher< SizeType > size_matcher_
template<typename SizeMatcher >
template<typename Container >
testing::internal::SizeIsMatcher< SizeMatcher >::Impl< Container >::Impl ( const SizeMatcher &  size_matcher)
inlineexplicit

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

2417  : size_matcher_(MatcherCast<SizeType>(size_matcher)) {}
const Matcher< SizeType > size_matcher_

Member Function Documentation

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

2423  {
2424  *os << "size ";
2426  }
const Matcher< SizeType > size_matcher_
void DescribeNegationTo(::std::ostream *os) const
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 2423 of file gmock-matchers.h.

2423  {
2424  *os << "size ";
2426  }
const Matcher< SizeType > size_matcher_
void DescribeNegationTo(::std::ostream *os) const
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 2423 of file gmock-matchers.h.

2423  {
2424  *os << "size ";
2426  }
const Matcher< SizeType > size_matcher_
void DescribeNegationTo(::std::ostream *os) const
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 2419 of file gmock-matchers.h.

2419  {
2420  *os << "size ";
2422  }
void DescribeTo(::std::ostream *os) const
const Matcher< SizeType > size_matcher_
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 2419 of file gmock-matchers.h.

2419  {
2420  *os << "size ";
2422  }
void DescribeTo(::std::ostream *os) const
const Matcher< SizeType > size_matcher_
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 2419 of file gmock-matchers.h.

2419  {
2420  *os << "size ";
2422  }
void DescribeTo(::std::ostream *os) const
const Matcher< SizeType > size_matcher_
template<typename SizeMatcher >
template<typename Container >
testing::internal::SizeIsMatcher< SizeMatcher >::Impl< Container >::GTEST_DISALLOW_ASSIGN_ ( Impl< Container >  )
private
template<typename SizeMatcher >
template<typename Container >
testing::internal::SizeIsMatcher< SizeMatcher >::Impl< Container >::GTEST_DISALLOW_ASSIGN_ ( Impl< Container >  )
private
template<typename SizeMatcher >
template<typename Container >
testing::internal::SizeIsMatcher< SizeMatcher >::Impl< Container >::GTEST_DISALLOW_ASSIGN_ ( Impl< Container >  )
private
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 2428 of file gmock-matchers.h.

References testing::internal::PrintIfNotEmpty(), folly::size(), testing::StringMatchResultListener::str(), and testing::MatchResultListener::stream().

2429  {
2430  SizeType size = container.size();
2431  StringMatchResultListener size_listener;
2432  const bool result = size_matcher_.MatchAndExplain(size, &size_listener);
2433  *listener
2434  << "whose size " << size << (result ? " matches" : " doesn't match");
2435  PrintIfNotEmpty(size_listener.str(), listener->stream());
2436  return result;
2437  }
bool MatchAndExplain(T x, MatchResultListener *listener) const
constexpr auto size(C const &c) -> decltype(c.size())
Definition: Access.h:45
void PrintIfNotEmpty(const internal::string &explanation,::std::ostream *os)
const Matcher< SizeType > size_matcher_
ContainerView::type::size_type SizeType
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 2428 of file gmock-matchers.h.

References GTEST_DISALLOW_ASSIGN_, testing::internal::PrintIfNotEmpty(), folly::size(), and testing::StringMatchResultListener::str().

2429  {
2430  SizeType size = container.size();
2431  StringMatchResultListener size_listener;
2432  const bool result = size_matcher_.MatchAndExplain(size, &size_listener);
2433  *listener
2434  << "whose size " << size << (result ? " matches" : " doesn't match");
2435  PrintIfNotEmpty(size_listener.str(), listener->stream());
2436  return result;
2437  }
bool MatchAndExplain(T x, MatchResultListener *listener) const
constexpr auto size(C const &c) -> decltype(c.size())
Definition: Access.h:45
void PrintIfNotEmpty(const internal::string &explanation,::std::ostream *os)
const Matcher< SizeType > size_matcher_
ContainerView::type::size_type SizeType
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 2428 of file gmock-matchers.h.

References GTEST_DISALLOW_ASSIGN_, testing::internal::PrintIfNotEmpty(), folly::size(), and testing::StringMatchResultListener::str().

2429  {
2430  SizeType size = container.size();
2431  StringMatchResultListener size_listener;
2432  const bool result = size_matcher_.MatchAndExplain(size, &size_listener);
2433  *listener
2434  << "whose size " << size << (result ? " matches" : " doesn't match");
2435  PrintIfNotEmpty(size_listener.str(), listener->stream());
2436  return result;
2437  }
bool MatchAndExplain(T x, MatchResultListener *listener) const
constexpr auto size(C const &c) -> decltype(c.size())
Definition: Access.h:45
void PrintIfNotEmpty(const internal::string &explanation,::std::ostream *os)
const Matcher< SizeType > size_matcher_
ContainerView::type::size_type SizeType

Member Data Documentation

template<typename SizeMatcher >
template<typename Container >
const Matcher< SizeType > testing::internal::SizeIsMatcher< SizeMatcher >::Impl< Container >::size_matcher_
private

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


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