Electroneum
Loading...
Searching...
No Matches
testing::internal::TuplePrefix< N > Class Template Reference

#include <gmock-matchers.h>

Static Public Member Functions

template<typename MatcherTuple, typename ValueTuple>
static bool Matches (const MatcherTuple &matcher_tuple, const ValueTuple &value_tuple)
template<typename MatcherTuple, typename ValueTuple>
static void ExplainMatchFailuresTo (const MatcherTuple &matchers, const ValueTuple &values, ::std::ostream *os)

Detailed Description

template<size_t N>
class testing::internal::TuplePrefix< N >

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

Member Function Documentation

◆ ExplainMatchFailuresTo()

template<size_t N>
template<typename MatcherTuple, typename ValueTuple>
void testing::internal::TuplePrefix< N >::ExplainMatchFailuresTo ( const MatcherTuple & matchers,
const ValueTuple & values,
::std::ostream * os )
inlinestatic

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

745 {
746 // First, describes failures in the first N - 1 fields.
748
749 // Then describes the failure (if any) in the (N - 1)-th (0-based)
750 // field.
752 get<N - 1>(matchers);
753 typedef typename tuple_element<N - 1, ValueTuple>::type Value;
754 Value value = get<N - 1>(values);
756 if (!matcher.MatchAndExplain(value, &listener)) {
757 // TODO(wan): include in the message the name of the parameter
758 // as used in MOCK_METHOD*() when possible.
759 *os << " Expected arg #" << N - 1 << ": ";
760 get<N - 1>(matchers).DescribeTo(os);
761 *os << "\n Actual: ";
762 // We remove the reference in type Value to prevent the
763 // universal printer from printing the address of value, which
764 // isn't interesting to the user most of the time. The
765 // matcher's MatchAndExplain() method handles the case when
766 // the address is interesting.
769 *os << "\n";
770 }
771 }
static void ExplainMatchFailuresTo(const MatcherTuple &matchers, const ValueTuple &values, ::std::ostream *os)
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:
Here is the caller graph for this function:

◆ Matches()

template<size_t N>
template<typename MatcherTuple, typename ValueTuple>
bool testing::internal::TuplePrefix< N >::Matches ( const MatcherTuple & matcher_tuple,
const ValueTuple & value_tuple )
inlinestatic

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

733 {
736 }
static bool Matches(const MatcherTuple &matcher_tuple, const ValueTuple &value_tuple)
Here is the call graph for this function:
Here is the caller 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