Electroneum
Loading...
Searching...
No Matches
testing::internal::WhenSortedByMatcher< Comparator, ContainerMatcher >::Impl< LhsContainer > Class Template Reference

#include <gmock-matchers.h>

Inheritance diagram for testing::internal::WhenSortedByMatcher< Comparator, ContainerMatcher >::Impl< LhsContainer >:
Collaboration diagram for testing::internal::WhenSortedByMatcher< Comparator, ContainerMatcher >::Impl< LhsContainer >:

Public Types

typedef internal::StlContainerView< GTEST_REMOVE_REFERENCE_AND_CONST_(LhsContainer)> LhsView
typedef LhsView::type LhsStlContainer
typedef LhsView::const_reference LhsStlContainerReference
typedef RemoveConstFromKey< typenameLhsStlContainer::value_type >::type LhsValue

Public Member Functions

 Impl (const Comparator &comparator, const ContainerMatcher &matcher)
virtual void DescribeTo (::std::ostream *os) const
virtual void DescribeNegationTo (::std::ostream *os) const
virtual bool MatchAndExplain (LhsContainer lhs, MatchResultListener *listener) const
Public Member Functions inherited from testing::MatcherDescriberInterface
virtual ~MatcherDescriberInterface ()

Detailed Description

template<typename Comparator, typename ContainerMatcher>
template<typename LhsContainer>
class testing::internal::WhenSortedByMatcher< Comparator, ContainerMatcher >::Impl< LhsContainer >

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

Member Typedef Documentation

◆ LhsStlContainer

template<typename Comparator, typename ContainerMatcher>
template<typename LhsContainer>
typedef LhsView::type testing::internal::WhenSortedByMatcher< Comparator, ContainerMatcher >::Impl< LhsContainer >::LhsStlContainer

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

◆ LhsStlContainerReference

template<typename Comparator, typename ContainerMatcher>
template<typename LhsContainer>
typedef LhsView::const_reference testing::internal::WhenSortedByMatcher< Comparator, ContainerMatcher >::Impl< LhsContainer >::LhsStlContainerReference

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

◆ LhsValue

template<typename Comparator, typename ContainerMatcher>
template<typename LhsContainer>
typedef RemoveConstFromKey<typenameLhsStlContainer::value_type>::type testing::internal::WhenSortedByMatcher< Comparator, ContainerMatcher >::Impl< LhsContainer >::LhsValue

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

◆ LhsView

template<typename Comparator, typename ContainerMatcher>
template<typename LhsContainer>
typedef internal::StlContainerView< GTEST_REMOVE_REFERENCE_AND_CONST_(LhsContainer)> testing::internal::WhenSortedByMatcher< Comparator, ContainerMatcher >::Impl< LhsContainer >::LhsView

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

Constructor & Destructor Documentation

◆ Impl()

template<typename Comparator, typename ContainerMatcher>
template<typename LhsContainer>
testing::internal::WhenSortedByMatcher< Comparator, ContainerMatcher >::Impl< LhsContainer >::Impl ( const Comparator & comparator,
const ContainerMatcher & matcher )
inline

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

Member Function Documentation

◆ DescribeNegationTo()

template<typename Comparator, typename ContainerMatcher>
template<typename LhsContainer>
virtual void testing::internal::WhenSortedByMatcher< Comparator, ContainerMatcher >::Impl< LhsContainer >::DescribeNegationTo ( ::std::ostream * os) const
inlinevirtual

Reimplemented from testing::MatcherDescriberInterface.

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

2644 {
2645 *os << "(when sorted) ";
2646 matcher_.DescribeNegationTo(os);
2647 }

◆ DescribeTo()

template<typename Comparator, typename ContainerMatcher>
template<typename LhsContainer>
virtual void testing::internal::WhenSortedByMatcher< Comparator, ContainerMatcher >::Impl< LhsContainer >::DescribeTo ( ::std::ostream * os) const
inlinevirtual

Implements testing::MatcherDescriberInterface.

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

2639 {
2640 *os << "(when sorted) ";
2641 matcher_.DescribeTo(os);
2642 }

◆ MatchAndExplain()

template<typename Comparator, typename ContainerMatcher>
template<typename LhsContainer>
virtual bool testing::internal::WhenSortedByMatcher< Comparator, ContainerMatcher >::Impl< LhsContainer >::MatchAndExplain ( LhsContainer lhs,
MatchResultListener * listener ) const
inlinevirtual

Implements testing::MatcherInterface< LhsContainer >.

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

2650 {
2653 lhs_stl_container.end());
2655 sorted_container.begin(), sorted_container.end(), comparator_);
2656
2657 if (!listener->IsInterested()) {
2658 // If the listener is not interested, we do not need to
2659 // construct the inner explanation.
2660 return matcher_.Matches(sorted_container);
2661 }
2662
2663 *listener << "which is ";
2665 *listener << " when sorted";
2666
2668 const bool match = matcher_.MatchAndExplain(sorted_container,
2670 PrintIfNotEmpty(inner_listener.str(), listener->stream());
2671 return match;
2672 }
static const_reference ConstReference(const GTEST_REMOVE_REFERENCE_AND_CONST_(LhsContainer) &container)
void UniversalPrint(const T &value, ::std::ostream *os)
void PrintIfNotEmpty(const internal::string &explanation, ::std::ostream *os)
Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • /home/abuild/rpmbuild/BUILD/electroneum-5.1.3.1-build/electroneum-5.1.3.1/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-matchers.h