proxygen
testing::internal::ElementsAreMatcherImpl< Container > Class Template Reference

#include <gmock-matchers.h>

Inheritance diagram for testing::internal::ElementsAreMatcherImpl< 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< RawContainer > View
 
typedef View::type StlContainer
 
typedef View::const_reference StlContainerReference
 
typedef StlContainer::value_type Element
 
typedef internal::StlContainerView< RawContainer > View
 
typedef View::type StlContainer
 
typedef View::const_reference StlContainerReference
 
typedef StlContainer::value_type Element
 
typedef internal::StlContainerView< RawContainer > View
 
typedef View::type StlContainer
 
typedef View::const_reference StlContainerReference
 
typedef StlContainer::value_type Element
 

Public Member Functions

typedef GTEST_REMOVE_REFERENCE_AND_CONST_ (Container) RawContainer
 
template<typename InputIter >
 ElementsAreMatcherImpl (InputIter first, InputIter last)
 
virtual void DescribeTo (::std::ostream *os) const
 
virtual void DescribeNegationTo (::std::ostream *os) const
 
virtual bool MatchAndExplain (Container container, MatchResultListener *listener) const
 
typedef GTEST_REMOVE_REFERENCE_AND_CONST_ (Container) RawContainer
 
template<typename InputIter >
 ElementsAreMatcherImpl (InputIter first, InputIter last)
 
virtual void DescribeTo (::std::ostream *os) const
 
virtual void DescribeNegationTo (::std::ostream *os) const
 
virtual bool MatchAndExplain (Container container, MatchResultListener *listener) const
 
typedef GTEST_REMOVE_REFERENCE_AND_CONST_ (Container) RawContainer
 
template<typename InputIter >
 ElementsAreMatcherImpl (InputIter first, InputIter last)
 
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

size_t count () const
 
 GTEST_DISALLOW_ASSIGN_ (ElementsAreMatcherImpl)
 
size_t count () const
 
 GTEST_DISALLOW_ASSIGN_ (ElementsAreMatcherImpl)
 
size_t count () const
 
 GTEST_DISALLOW_ASSIGN_ (ElementsAreMatcherImpl)
 

Static Private Member Functions

static Message Elements (size_t count)
 
static Message Elements (size_t count)
 
static Message Elements (size_t count)
 

Private Attributes

::std::vector< Matcher< const Element & > > matchers_
 

Detailed Description

template<typename Container>
class testing::internal::ElementsAreMatcherImpl< Container >

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

Member Typedef Documentation

template<typename Container >
typedef StlContainer::value_type testing::internal::ElementsAreMatcherImpl< Container >::Element

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

template<typename Container >
typedef StlContainer::value_type testing::internal::ElementsAreMatcherImpl< Container >::Element

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

template<typename Container >
typedef StlContainer::value_type testing::internal::ElementsAreMatcherImpl< Container >::Element

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

template<typename Container >
typedef View::type testing::internal::ElementsAreMatcherImpl< Container >::StlContainer

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

template<typename Container >
typedef View::type testing::internal::ElementsAreMatcherImpl< Container >::StlContainer

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

template<typename Container >
typedef View::type testing::internal::ElementsAreMatcherImpl< Container >::StlContainer

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

template<typename Container >
typedef View::const_reference testing::internal::ElementsAreMatcherImpl< Container >::StlContainerReference

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

template<typename Container >
typedef View::const_reference testing::internal::ElementsAreMatcherImpl< Container >::StlContainerReference

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

template<typename Container >
typedef View::const_reference testing::internal::ElementsAreMatcherImpl< Container >::StlContainerReference

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

template<typename Container >
typedef internal::StlContainerView<RawContainer> testing::internal::ElementsAreMatcherImpl< Container >::View

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

template<typename Container >
typedef internal::StlContainerView<RawContainer> testing::internal::ElementsAreMatcherImpl< Container >::View

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

template<typename Container >
typedef internal::StlContainerView<RawContainer> testing::internal::ElementsAreMatcherImpl< Container >::View

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

Constructor & Destructor Documentation

template<typename Container >
template<typename InputIter >
testing::internal::ElementsAreMatcherImpl< Container >::ElementsAreMatcherImpl ( InputIter  first,
InputIter  last 
)
inline

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

3119  {
3120  while (first != last) {
3121  matchers_.push_back(MatcherCast<const Element&>(*first++));
3122  }
3123  }
::std::vector< Matcher< const Element & > > matchers_
constexpr detail::First first
Definition: Base-inl.h:2553
template<typename Container >
template<typename InputIter >
testing::internal::ElementsAreMatcherImpl< Container >::ElementsAreMatcherImpl ( InputIter  first,
InputIter  last 
)
inline

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

3119  {
3120  while (first != last) {
3121  matchers_.push_back(MatcherCast<const Element&>(*first++));
3122  }
3123  }
::std::vector< Matcher< const Element & > > matchers_
constexpr detail::First first
Definition: Base-inl.h:2553
template<typename Container >
template<typename InputIter >
testing::internal::ElementsAreMatcherImpl< Container >::ElementsAreMatcherImpl ( InputIter  first,
InputIter  last 
)
inline

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

3119  {
3120  while (first != last) {
3121  matchers_.push_back(MatcherCast<const Element&>(*first++));
3122  }
3123  }
::std::vector< Matcher< const Element & > > matchers_
constexpr detail::First first
Definition: Base-inl.h:2553

Member Function Documentation

template<typename Container >
size_t testing::internal::ElementsAreMatcherImpl< Container >::count ( ) const
inlineprivate

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

3246 { return matchers_.size(); }
::std::vector< Matcher< const Element & > > matchers_
template<typename Container >
size_t testing::internal::ElementsAreMatcherImpl< Container >::count ( ) const
inlineprivate

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

References GTEST_API_, and GTEST_DISALLOW_ASSIGN_.

3246 { return matchers_.size(); }
::std::vector< Matcher< const Element & > > matchers_
template<typename Container >
size_t testing::internal::ElementsAreMatcherImpl< Container >::count ( ) const
inlineprivate

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

References GTEST_API_, and GTEST_DISALLOW_ASSIGN_.

3246 { return matchers_.size(); }
::std::vector< Matcher< const Element & > > matchers_
template<typename Container >
virtual void testing::internal::ElementsAreMatcherImpl< Container >::DescribeNegationTo ( ::std::ostream *  os) const
inlinevirtual

Reimplemented from testing::MatcherDescriberInterface.

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

References count, and i.

3145  {
3146  if (count() == 0) {
3147  *os << "isn't empty";
3148  return;
3149  }
3150 
3151  *os << "doesn't have " << Elements(count()) << ", or\n";
3152  for (size_t i = 0; i != count(); ++i) {
3153  *os << "element #" << i << " ";
3154  matchers_[i].DescribeNegationTo(os);
3155  if (i + 1 < count()) {
3156  *os << ", or\n";
3157  }
3158  }
3159  }
::std::vector< Matcher< const Element & > > matchers_
static Message Elements(size_t count)
template<typename Container >
virtual void testing::internal::ElementsAreMatcherImpl< Container >::DescribeNegationTo ( ::std::ostream *  os) const
inlinevirtual

Reimplemented from testing::MatcherDescriberInterface.

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

References count, and i.

3145  {
3146  if (count() == 0) {
3147  *os << "isn't empty";
3148  return;
3149  }
3150 
3151  *os << "doesn't have " << Elements(count()) << ", or\n";
3152  for (size_t i = 0; i != count(); ++i) {
3153  *os << "element #" << i << " ";
3154  matchers_[i].DescribeNegationTo(os);
3155  if (i + 1 < count()) {
3156  *os << ", or\n";
3157  }
3158  }
3159  }
::std::vector< Matcher< const Element & > > matchers_
static Message Elements(size_t count)
template<typename Container >
virtual void testing::internal::ElementsAreMatcherImpl< Container >::DescribeNegationTo ( ::std::ostream *  os) const
inlinevirtual

Reimplemented from testing::MatcherDescriberInterface.

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

References count, and i.

3145  {
3146  if (count() == 0) {
3147  *os << "isn't empty";
3148  return;
3149  }
3150 
3151  *os << "doesn't have " << Elements(count()) << ", or\n";
3152  for (size_t i = 0; i != count(); ++i) {
3153  *os << "element #" << i << " ";
3154  matchers_[i].DescribeNegationTo(os);
3155  if (i + 1 < count()) {
3156  *os << ", or\n";
3157  }
3158  }
3159  }
::std::vector< Matcher< const Element & > > matchers_
static Message Elements(size_t count)
template<typename Container >
virtual void testing::internal::ElementsAreMatcherImpl< Container >::DescribeTo ( ::std::ostream *  os) const
inlinevirtual

Implements testing::MatcherDescriberInterface.

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

References count, and i.

3126  {
3127  if (count() == 0) {
3128  *os << "is empty";
3129  } else if (count() == 1) {
3130  *os << "has 1 element that ";
3131  matchers_[0].DescribeTo(os);
3132  } else {
3133  *os << "has " << Elements(count()) << " where\n";
3134  for (size_t i = 0; i != count(); ++i) {
3135  *os << "element #" << i << " ";
3136  matchers_[i].DescribeTo(os);
3137  if (i + 1 < count()) {
3138  *os << ",\n";
3139  }
3140  }
3141  }
3142  }
::std::vector< Matcher< const Element & > > matchers_
static Message Elements(size_t count)
template<typename Container >
virtual void testing::internal::ElementsAreMatcherImpl< Container >::DescribeTo ( ::std::ostream *  os) const
inlinevirtual

Implements testing::MatcherDescriberInterface.

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

References count, and i.

3126  {
3127  if (count() == 0) {
3128  *os << "is empty";
3129  } else if (count() == 1) {
3130  *os << "has 1 element that ";
3131  matchers_[0].DescribeTo(os);
3132  } else {
3133  *os << "has " << Elements(count()) << " where\n";
3134  for (size_t i = 0; i != count(); ++i) {
3135  *os << "element #" << i << " ";
3136  matchers_[i].DescribeTo(os);
3137  if (i + 1 < count()) {
3138  *os << ",\n";
3139  }
3140  }
3141  }
3142  }
::std::vector< Matcher< const Element & > > matchers_
static Message Elements(size_t count)
template<typename Container >
virtual void testing::internal::ElementsAreMatcherImpl< Container >::DescribeTo ( ::std::ostream *  os) const
inlinevirtual

Implements testing::MatcherDescriberInterface.

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

References count, and i.

3126  {
3127  if (count() == 0) {
3128  *os << "is empty";
3129  } else if (count() == 1) {
3130  *os << "has 1 element that ";
3131  matchers_[0].DescribeTo(os);
3132  } else {
3133  *os << "has " << Elements(count()) << " where\n";
3134  for (size_t i = 0; i != count(); ++i) {
3135  *os << "element #" << i << " ";
3136  matchers_[i].DescribeTo(os);
3137  if (i + 1 < count()) {
3138  *os << ",\n";
3139  }
3140  }
3141  }
3142  }
::std::vector< Matcher< const Element & > > matchers_
static Message Elements(size_t count)
template<typename Container >
static Message testing::internal::ElementsAreMatcherImpl< Container >::Elements ( size_t  count)
inlinestaticprivate

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

3242  {
3243  return Message() << count << (count == 1 ? " element" : " elements");
3244  }
template<typename Container >
static Message testing::internal::ElementsAreMatcherImpl< Container >::Elements ( size_t  count)
inlinestaticprivate

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

3242  {
3243  return Message() << count << (count == 1 ? " element" : " elements");
3244  }
template<typename Container >
static Message testing::internal::ElementsAreMatcherImpl< Container >::Elements ( size_t  count)
inlinestaticprivate

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

3242  {
3243  return Message() << count << (count == 1 ? " element" : " elements");
3244  }
template<typename Container >
testing::internal::ElementsAreMatcherImpl< Container >::GTEST_DISALLOW_ASSIGN_ ( ElementsAreMatcherImpl< Container >  )
private
template<typename Container >
testing::internal::ElementsAreMatcherImpl< Container >::GTEST_DISALLOW_ASSIGN_ ( ElementsAreMatcherImpl< Container >  )
private
template<typename Container >
testing::internal::ElementsAreMatcherImpl< Container >::GTEST_DISALLOW_ASSIGN_ ( ElementsAreMatcherImpl< Container >  )
private
template<typename Container >
typedef testing::internal::ElementsAreMatcherImpl< Container >::GTEST_REMOVE_REFERENCE_AND_CONST_ ( Container  )
template<typename Container >
typedef testing::internal::ElementsAreMatcherImpl< Container >::GTEST_REMOVE_REFERENCE_AND_CONST_ ( Container  )
template<typename Container >
typedef testing::internal::ElementsAreMatcherImpl< Container >::GTEST_REMOVE_REFERENCE_AND_CONST_ ( Container  )
template<typename Container >
virtual bool testing::internal::ElementsAreMatcherImpl< Container >::MatchAndExplain ( Container  container,
MatchResultListener listener 
) const
inlinevirtual

Implements testing::MatcherInterface< Container >.

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

References count, i, testing::MatchResultListener::IsInterested(), testing::internal::PrintIfNotEmpty(), s, testing::StringMatchResultListener::str(), and testing::MatchResultListener::stream().

3162  {
3163  // To work with stream-like "containers", we must only walk
3164  // through the elements in one pass.
3165 
3166  const bool listener_interested = listener->IsInterested();
3167 
3168  // explanations[i] is the explanation of the element at index i.
3169  ::std::vector<internal::string> explanations(count());
3170  StlContainerReference stl_container = View::ConstReference(container);
3171  typename StlContainer::const_iterator it = stl_container.begin();
3172  size_t exam_pos = 0;
3173  bool mismatch_found = false; // Have we found a mismatched element yet?
3174 
3175  // Go through the elements and matchers in pairs, until we reach
3176  // the end of either the elements or the matchers, or until we find a
3177  // mismatch.
3178  for (; it != stl_container.end() && exam_pos != count(); ++it, ++exam_pos) {
3179  bool match; // Does the current element match the current matcher?
3180  if (listener_interested) {
3181  StringMatchResultListener s;
3182  match = matchers_[exam_pos].MatchAndExplain(*it, &s);
3183  explanations[exam_pos] = s.str();
3184  } else {
3185  match = matchers_[exam_pos].Matches(*it);
3186  }
3187 
3188  if (!match) {
3189  mismatch_found = true;
3190  break;
3191  }
3192  }
3193  // If mismatch_found is true, 'exam_pos' is the index of the mismatch.
3194 
3195  // Find how many elements the actual container has. We avoid
3196  // calling size() s.t. this code works for stream-like "containers"
3197  // that don't define size().
3198  size_t actual_count = exam_pos;
3199  for (; it != stl_container.end(); ++it) {
3200  ++actual_count;
3201  }
3202 
3203  if (actual_count != count()) {
3204  // The element count doesn't match. If the container is empty,
3205  // there's no need to explain anything as Google Mock already
3206  // prints the empty container. Otherwise we just need to show
3207  // how many elements there actually are.
3208  if (listener_interested && (actual_count != 0)) {
3209  *listener << "which has " << Elements(actual_count);
3210  }
3211  return false;
3212  }
3213 
3214  if (mismatch_found) {
3215  // The element count matches, but the exam_pos-th element doesn't match.
3216  if (listener_interested) {
3217  *listener << "whose element #" << exam_pos << " doesn't match";
3218  PrintIfNotEmpty(explanations[exam_pos], listener->stream());
3219  }
3220  return false;
3221  }
3222 
3223  // Every element matches its expectation. We need to explain why
3224  // (the obvious ones can be skipped).
3225  if (listener_interested) {
3226  bool reason_printed = false;
3227  for (size_t i = 0; i != count(); ++i) {
3228  const internal::string& s = explanations[i];
3229  if (!s.empty()) {
3230  if (reason_printed) {
3231  *listener << ",\nand ";
3232  }
3233  *listener << "whose element #" << i << " matches, " << s;
3234  reason_printed = true;
3235  }
3236  }
3237  }
3238  return true;
3239  }
::std::string string
Definition: gtest-port.h:1097
static const_reference ConstReference(const RawContainer &container)
void PrintIfNotEmpty(const internal::string &explanation,::std::ostream *os)
::std::vector< Matcher< const Element & > > matchers_
static set< string > s
static Message Elements(size_t count)
template<typename Container >
virtual bool testing::internal::ElementsAreMatcherImpl< Container >::MatchAndExplain ( Container  container,
MatchResultListener listener 
) const
inlinevirtual

Implements testing::MatcherInterface< Container >.

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

References count, i, testing::internal::PrintIfNotEmpty(), s, and testing::StringMatchResultListener::str().

3162  {
3163  // To work with stream-like "containers", we must only walk
3164  // through the elements in one pass.
3165 
3166  const bool listener_interested = listener->IsInterested();
3167 
3168  // explanations[i] is the explanation of the element at index i.
3169  ::std::vector<internal::string> explanations(count());
3170  StlContainerReference stl_container = View::ConstReference(container);
3171  typename StlContainer::const_iterator it = stl_container.begin();
3172  size_t exam_pos = 0;
3173  bool mismatch_found = false; // Have we found a mismatched element yet?
3174 
3175  // Go through the elements and matchers in pairs, until we reach
3176  // the end of either the elements or the matchers, or until we find a
3177  // mismatch.
3178  for (; it != stl_container.end() && exam_pos != count(); ++it, ++exam_pos) {
3179  bool match; // Does the current element match the current matcher?
3180  if (listener_interested) {
3181  StringMatchResultListener s;
3182  match = matchers_[exam_pos].MatchAndExplain(*it, &s);
3183  explanations[exam_pos] = s.str();
3184  } else {
3185  match = matchers_[exam_pos].Matches(*it);
3186  }
3187 
3188  if (!match) {
3189  mismatch_found = true;
3190  break;
3191  }
3192  }
3193  // If mismatch_found is true, 'exam_pos' is the index of the mismatch.
3194 
3195  // Find how many elements the actual container has. We avoid
3196  // calling size() s.t. this code works for stream-like "containers"
3197  // that don't define size().
3198  size_t actual_count = exam_pos;
3199  for (; it != stl_container.end(); ++it) {
3200  ++actual_count;
3201  }
3202 
3203  if (actual_count != count()) {
3204  // The element count doesn't match. If the container is empty,
3205  // there's no need to explain anything as Google Mock already
3206  // prints the empty container. Otherwise we just need to show
3207  // how many elements there actually are.
3208  if (listener_interested && (actual_count != 0)) {
3209  *listener << "which has " << Elements(actual_count);
3210  }
3211  return false;
3212  }
3213 
3214  if (mismatch_found) {
3215  // The element count matches, but the exam_pos-th element doesn't match.
3216  if (listener_interested) {
3217  *listener << "whose element #" << exam_pos << " doesn't match";
3218  PrintIfNotEmpty(explanations[exam_pos], listener->stream());
3219  }
3220  return false;
3221  }
3222 
3223  // Every element matches its expectation. We need to explain why
3224  // (the obvious ones can be skipped).
3225  if (listener_interested) {
3226  bool reason_printed = false;
3227  for (size_t i = 0; i != count(); ++i) {
3228  const internal::string& s = explanations[i];
3229  if (!s.empty()) {
3230  if (reason_printed) {
3231  *listener << ",\nand ";
3232  }
3233  *listener << "whose element #" << i << " matches, " << s;
3234  reason_printed = true;
3235  }
3236  }
3237  }
3238  return true;
3239  }
::std::string string
Definition: gtest-port.h:1097
static const_reference ConstReference(const RawContainer &container)
void PrintIfNotEmpty(const internal::string &explanation,::std::ostream *os)
::std::vector< Matcher< const Element & > > matchers_
static set< string > s
static Message Elements(size_t count)
template<typename Container >
virtual bool testing::internal::ElementsAreMatcherImpl< Container >::MatchAndExplain ( Container  container,
MatchResultListener listener 
) const
inlinevirtual

Implements testing::MatcherInterface< Container >.

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

References count, i, testing::internal::PrintIfNotEmpty(), s, and testing::StringMatchResultListener::str().

3162  {
3163  // To work with stream-like "containers", we must only walk
3164  // through the elements in one pass.
3165 
3166  const bool listener_interested = listener->IsInterested();
3167 
3168  // explanations[i] is the explanation of the element at index i.
3169  ::std::vector<internal::string> explanations(count());
3170  StlContainerReference stl_container = View::ConstReference(container);
3171  typename StlContainer::const_iterator it = stl_container.begin();
3172  size_t exam_pos = 0;
3173  bool mismatch_found = false; // Have we found a mismatched element yet?
3174 
3175  // Go through the elements and matchers in pairs, until we reach
3176  // the end of either the elements or the matchers, or until we find a
3177  // mismatch.
3178  for (; it != stl_container.end() && exam_pos != count(); ++it, ++exam_pos) {
3179  bool match; // Does the current element match the current matcher?
3180  if (listener_interested) {
3181  StringMatchResultListener s;
3182  match = matchers_[exam_pos].MatchAndExplain(*it, &s);
3183  explanations[exam_pos] = s.str();
3184  } else {
3185  match = matchers_[exam_pos].Matches(*it);
3186  }
3187 
3188  if (!match) {
3189  mismatch_found = true;
3190  break;
3191  }
3192  }
3193  // If mismatch_found is true, 'exam_pos' is the index of the mismatch.
3194 
3195  // Find how many elements the actual container has. We avoid
3196  // calling size() s.t. this code works for stream-like "containers"
3197  // that don't define size().
3198  size_t actual_count = exam_pos;
3199  for (; it != stl_container.end(); ++it) {
3200  ++actual_count;
3201  }
3202 
3203  if (actual_count != count()) {
3204  // The element count doesn't match. If the container is empty,
3205  // there's no need to explain anything as Google Mock already
3206  // prints the empty container. Otherwise we just need to show
3207  // how many elements there actually are.
3208  if (listener_interested && (actual_count != 0)) {
3209  *listener << "which has " << Elements(actual_count);
3210  }
3211  return false;
3212  }
3213 
3214  if (mismatch_found) {
3215  // The element count matches, but the exam_pos-th element doesn't match.
3216  if (listener_interested) {
3217  *listener << "whose element #" << exam_pos << " doesn't match";
3218  PrintIfNotEmpty(explanations[exam_pos], listener->stream());
3219  }
3220  return false;
3221  }
3222 
3223  // Every element matches its expectation. We need to explain why
3224  // (the obvious ones can be skipped).
3225  if (listener_interested) {
3226  bool reason_printed = false;
3227  for (size_t i = 0; i != count(); ++i) {
3228  const internal::string& s = explanations[i];
3229  if (!s.empty()) {
3230  if (reason_printed) {
3231  *listener << ",\nand ";
3232  }
3233  *listener << "whose element #" << i << " matches, " << s;
3234  reason_printed = true;
3235  }
3236  }
3237  }
3238  return true;
3239  }
::std::string string
Definition: gtest-port.h:1097
static const_reference ConstReference(const RawContainer &container)
void PrintIfNotEmpty(const internal::string &explanation,::std::ostream *os)
::std::vector< Matcher< const Element & > > matchers_
static set< string > s
static Message Elements(size_t count)

Member Data Documentation

template<typename Container >
std::vector< Matcher< const Element & > > testing::internal::ElementsAreMatcherImpl< Container >::matchers_
private

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


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