38#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_
39#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_
51#define GMOCK_FIELD_TYPE_(Tuple, i) \
52 typename ::testing::tuple_element<i, Tuple>::type
65template <
class Tuple,
int k0 = -1,
int k1 = -1,
int k2 = -1,
int k3 = -1,
66 int k4 = -1,
int k5 = -1,
int k6 = -1,
int k7 = -1,
int k8 = -1,
71template <
class Tuple,
int k0,
int k1,
int k2,
int k3,
int k4,
int k5,
int k6,
72 int k7,
int k8,
int k9>
82 return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t),
83 get<k5>(t), get<k6>(t), get<k7>(t), get<k8>(t), get<k9>(t));
90class TupleFields<Tuple, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1> {
92 typedef ::testing::tuple<>
type;
98template <
class Tuple,
int k0>
99class TupleFields<Tuple, k0, -1, -1, -1, -1, -1, -1, -1, -1, -1> {
103 return type(get<k0>(t));
107template <
class Tuple,
int k0,
int k1>
108class TupleFields<Tuple, k0, k1, -1, -1, -1, -1, -1, -1, -1, -1> {
113 return type(get<k0>(t), get<k1>(t));
117template <
class Tuple,
int k0,
int k1,
int k2>
118class TupleFields<Tuple, k0, k1, k2, -1, -1, -1, -1, -1, -1, -1> {
123 return type(get<k0>(t), get<k1>(t), get<k2>(t));
127template <
class Tuple,
int k0,
int k1,
int k2,
int k3>
128class TupleFields<Tuple, k0, k1, k2, k3, -1, -1, -1, -1, -1, -1> {
134 return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t));
138template <
class Tuple,
int k0,
int k1,
int k2,
int k3,
int k4>
139class TupleFields<Tuple, k0, k1, k2, k3, k4, -1, -1, -1, -1, -1> {
145 return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t));
149template <
class Tuple,
int k0,
int k1,
int k2,
int k3,
int k4,
int k5>
150class TupleFields<Tuple, k0, k1, k2, k3, k4, k5, -1, -1, -1, -1> {
157 return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t),
162template <
class Tuple,
int k0,
int k1,
int k2,
int k3,
int k4,
int k5,
int k6>
163class TupleFields<Tuple, k0, k1, k2, k3, k4, k5, k6, -1, -1, -1> {
170 return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t),
171 get<k5>(t), get<k6>(t));
175template <
class Tuple,
int k0,
int k1,
int k2,
int k3,
int k4,
int k5,
int k6,
177class TupleFields<Tuple, k0, k1, k2, k3, k4, k5, k6, k7, -1, -1> {
185 return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t),
186 get<k5>(t), get<k6>(t), get<k7>(t));
190template <
class Tuple,
int k0,
int k1,
int k2,
int k3,
int k4,
int k5,
int k6,
192class TupleFields<Tuple, k0, k1, k2, k3, k4, k5, k6, k7, k8, -1> {
200 return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t),
201 get<k5>(t), get<k6>(t), get<k7>(t), get<k8>(t));
205#undef GMOCK_FIELD_TYPE_
208template <
class ArgsTuple,
int k0 = -1,
int k1 = -1,
int k2 = -1,
int k3 = -1,
209 int k4 = -1,
int k5 = -1,
int k6 = -1,
int k7 = -1,
int k8 = -1,
219 template <
typename InnerMatcher>
225 const SelectedArgs& selected_args = GetSelectedArgs(args);
227 return inner_matcher_.
Matches(selected_args);
229 PrintIndices(listener->
stream());
240 *
os <<
"are a tuple ";
246 *
os <<
"are a tuple ";
253 return TupleFields<RawArgsTuple, k0, k1, k2, k3, k4, k5, k6, k7, k8,
254 k9>::GetSelectedFields(args);
258 static void PrintIndices(::std::ostream*
os) {
259 *
os <<
"whose fields (";
260 const int indices[10] = { k0, k1, k2, k3, k4, k5, k6, k7, k8, k9 };
261 for (
int i = 0; i < 10; i++) {
268 *
os <<
"#" << indices[i];
278template <
class InnerMatcher,
int k0 = -1,
int k1 = -1,
int k2 = -1,
279 int k3 = -1,
int k4 = -1,
int k5 = -1,
int k6 = -1,
int k7 = -1,
280 int k8 = -1,
int k9 = -1>
284 : inner_matcher_(inner_matcher) {}
286 template <
typename ArgsTuple>
289 k6, k7, k8, k9>(inner_matcher_));
293 const InnerMatcher inner_matcher_;
304template <
typename M1>
309template <
typename M1,
typename M2>
317template <
typename M1,
typename M2,
typename M3>
325template <
typename M1,
typename M2,
typename M3,
typename M4>
333template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5>
341template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
350template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
351 typename M6,
typename M7>
359template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
360 typename M6,
typename M7,
typename M8>
368template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
369 typename M6,
typename M7,
typename M8,
typename M9>
377template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
378 typename M6,
typename M7,
typename M8,
typename M9,
typename M10>
392template <
typename M1>
397template <
typename M1,
typename M2>
405template <
typename M1,
typename M2,
typename M3>
413template <
typename M1,
typename M2,
typename M3,
typename M4>
421template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5>
429template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
438template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
439 typename M6,
typename M7>
447template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
448 typename M6,
typename M7,
typename M8>
456template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
457 typename M6,
typename M7,
typename M8,
typename M9>
465template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
466 typename M6,
typename M7,
typename M8,
typename M9,
typename M10>
479template <
typename InnerMatcher>
481Args(
const InnerMatcher& matcher) {
485template <
int k1,
typename InnerMatcher>
486inline internal::ArgsMatcher<InnerMatcher, k1>
487Args(
const InnerMatcher& matcher) {
491template <
int k1,
int k2,
typename InnerMatcher>
492inline internal::ArgsMatcher<InnerMatcher, k1, k2>
493Args(
const InnerMatcher& matcher) {
497template <
int k1,
int k2,
int k3,
typename InnerMatcher>
498inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3>
499Args(
const InnerMatcher& matcher) {
503template <
int k1,
int k2,
int k3,
int k4,
typename InnerMatcher>
504inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4>
505Args(
const InnerMatcher& matcher) {
509template <
int k1,
int k2,
int k3,
int k4,
int k5,
typename InnerMatcher>
510inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5>
511Args(
const InnerMatcher& matcher) {
515template <
int k1,
int k2,
int k3,
int k4,
int k5,
int k6,
typename InnerMatcher>
516inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6>
517Args(
const InnerMatcher& matcher) {
521template <
int k1,
int k2,
int k3,
int k4,
int k5,
int k6,
int k7,
522 typename InnerMatcher>
523inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6, k7>
524Args(
const InnerMatcher& matcher) {
529template <
int k1,
int k2,
int k3,
int k4,
int k5,
int k6,
int k7,
int k8,
530 typename InnerMatcher>
531inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6, k7, k8>
532Args(
const InnerMatcher& matcher) {
537template <
int k1,
int k2,
int k3,
int k4,
int k5,
int k6,
int k7,
int k8,
538 int k9,
typename InnerMatcher>
539inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6, k7, k8, k9>
540Args(
const InnerMatcher& matcher) {
545template <
int k1,
int k2,
int k3,
int k4,
int k5,
int k6,
int k7,
int k8,
546 int k9,
int k10,
typename InnerMatcher>
547inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6, k7, k8, k9,
549Args(
const InnerMatcher& matcher) {
568inline internal::ElementsAreMatcher<
571 typedef ::testing::tuple<>
Args;
575template <
typename T1>
576inline internal::ElementsAreMatcher<
580 typedef ::testing::tuple<
585template <
typename T1,
typename T2>
586inline internal::ElementsAreMatcher<
591 typedef ::testing::tuple<
597template <
typename T1,
typename T2,
typename T3>
598inline internal::ElementsAreMatcher<
604 typedef ::testing::tuple<
611template <
typename T1,
typename T2,
typename T3,
typename T4>
612inline internal::ElementsAreMatcher<
618ElementsAre(
const T1& e1,
const T2& e2,
const T3& e3,
const T4& e4) {
619 typedef ::testing::tuple<
627template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
628inline internal::ElementsAreMatcher<
635ElementsAre(
const T1& e1,
const T2& e2,
const T3& e3,
const T4& e4,
637 typedef ::testing::tuple<
646template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
648inline internal::ElementsAreMatcher<
656ElementsAre(
const T1& e1,
const T2& e2,
const T3& e3,
const T4& e4,
657 const T5& e5,
const T6& e6) {
658 typedef ::testing::tuple<
668template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
669 typename T6,
typename T7>
670inline internal::ElementsAreMatcher<
679ElementsAre(
const T1& e1,
const T2& e2,
const T3& e3,
const T4& e4,
680 const T5& e5,
const T6& e6,
const T7& e7) {
681 typedef ::testing::tuple<
692template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
693 typename T6,
typename T7,
typename T8>
694inline internal::ElementsAreMatcher<
704ElementsAre(
const T1& e1,
const T2& e2,
const T3& e3,
const T4& e4,
705 const T5& e5,
const T6& e6,
const T7& e7,
const T8& e8) {
706 typedef ::testing::tuple<
719template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
720 typename T6,
typename T7,
typename T8,
typename T9>
721inline internal::ElementsAreMatcher<
732ElementsAre(
const T1& e1,
const T2& e2,
const T3& e3,
const T4& e4,
733 const T5& e5,
const T6& e6,
const T7& e7,
const T8& e8,
const T9& e9) {
734 typedef ::testing::tuple<
748template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
749 typename T6,
typename T7,
typename T8,
typename T9,
typename T10>
750inline internal::ElementsAreMatcher<
762ElementsAre(
const T1& e1,
const T2& e2,
const T3& e3,
const T4& e4,
763 const T5& e5,
const T6& e6,
const T7& e7,
const T8& e8,
const T9& e9,
765 typedef ::testing::tuple<
786inline internal::UnorderedElementsAreMatcher<
789 typedef ::testing::tuple<>
Args;
793template <
typename T1>
794inline internal::UnorderedElementsAreMatcher<
798 typedef ::testing::tuple<
803template <
typename T1,
typename T2>
804inline internal::UnorderedElementsAreMatcher<
809 typedef ::testing::tuple<
815template <
typename T1,
typename T2,
typename T3>
816inline internal::UnorderedElementsAreMatcher<
822 typedef ::testing::tuple<
829template <
typename T1,
typename T2,
typename T3,
typename T4>
830inline internal::UnorderedElementsAreMatcher<
837 typedef ::testing::tuple<
845template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
846inline internal::UnorderedElementsAreMatcher<
855 typedef ::testing::tuple<
864template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
866inline internal::UnorderedElementsAreMatcher<
875 const T5& e5,
const T6& e6) {
876 typedef ::testing::tuple<
887template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
888 typename T6,
typename T7>
889inline internal::UnorderedElementsAreMatcher<
899 const T5& e5,
const T6& e6,
const T7& e7) {
900 typedef ::testing::tuple<
912template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
913 typename T6,
typename T7,
typename T8>
914inline internal::UnorderedElementsAreMatcher<
925 const T5& e5,
const T6& e6,
const T7& e7,
const T8& e8) {
926 typedef ::testing::tuple<
939template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
940 typename T6,
typename T7,
typename T8,
typename T9>
941inline internal::UnorderedElementsAreMatcher<
953 const T5& e5,
const T6& e6,
const T7& e7,
const T8& e8,
const T9& e9) {
954 typedef ::testing::tuple<
968template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
969 typename T6,
typename T7,
typename T8,
typename T9,
typename T10>
970inline internal::UnorderedElementsAreMatcher<
983 const T5& e5,
const T6& e6,
const T7& e7,
const T8& e8,
const T9& e9,
985 typedef ::testing::tuple<
997 e6, e7, e8, e9, e10));
1003template <
typename M1,
typename M2>
1011template <
typename M1,
typename M2,
typename M3>
1019template <
typename M1,
typename M2,
typename M3,
typename M4>
1027template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5>
1029AllOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5) {
1035template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
1038AllOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6) {
1044template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
1045 typename M6,
typename M7>
1047AllOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7) {
1053template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
1054 typename M6,
typename M7,
typename M8>
1056AllOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8) {
1062template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
1063 typename M6,
typename M7,
typename M8,
typename M9>
1065AllOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9) {
1072template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
1073 typename M6,
typename M7,
typename M8,
typename M9,
typename M10>
1074inline typename internal::AllOfResult10<M1, M2, M3, M4, M5, M6, M7, M8, M9,
1076AllOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1086template <
typename M1,
typename M2>
1094template <
typename M1,
typename M2,
typename M3>
1102template <
typename M1,
typename M2,
typename M3,
typename M4>
1110template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5>
1112AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5) {
1118template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
1121AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6) {
1127template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
1128 typename M6,
typename M7>
1130AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7) {
1136template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
1137 typename M6,
typename M7,
typename M8>
1139AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8) {
1145template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
1146 typename M6,
typename M7,
typename M8,
typename M9>
1148AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9) {
1155template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
1156 typename M6,
typename M7,
typename M8,
typename M9,
typename M10>
1157inline typename internal::AnyOfResult10<M1, M2, M3, M4, M5, M6, M7, M8, M9,
1159AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1385#define MATCHER(name, description)\
1386 class name##Matcher {\
1388 template <typename arg_type>\
1389 class gmock_Impl : public ::testing::MatcherInterface<\
1390 GTEST_REFERENCE_TO_CONST_(arg_type)> {\
1394 virtual bool MatchAndExplain(\
1395 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1396 ::testing::MatchResultListener* result_listener) const;\
1397 virtual void DescribeTo(::std::ostream* gmock_os) const {\
1398 *gmock_os << FormatDescription(false);\
1400 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1401 *gmock_os << FormatDescription(true);\
1404 ::std::string FormatDescription(bool negation) const {\
1405 ::std::string gmock_description = (description);\
1406 if (!gmock_description.empty())\
1407 return gmock_description;\
1408 return ::testing::internal::FormatMatcherDescription(\
1410 ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
1411 ::testing::tuple<>()));\
1414 template <typename arg_type>\
1415 operator ::testing::Matcher<arg_type>() const {\
1416 return ::testing::Matcher<arg_type>(\
1417 new gmock_Impl<arg_type>());\
1423 inline name##Matcher name() {\
1424 return name##Matcher();\
1426 template <typename arg_type>\
1427 bool name##Matcher::gmock_Impl<arg_type>::MatchAndExplain(\
1428 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1429 ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
1432#define MATCHER_P(name, p0, description)\
1433 template <typename p0##_type>\
1434 class name##MatcherP {\
1436 template <typename arg_type>\
1437 class gmock_Impl : public ::testing::MatcherInterface<\
1438 GTEST_REFERENCE_TO_CONST_(arg_type)> {\
1440 explicit gmock_Impl(p0##_type gmock_p0)\
1441 : p0(::testing::internal::move(gmock_p0)) {}\
1442 virtual bool MatchAndExplain(\
1443 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1444 ::testing::MatchResultListener* result_listener) const;\
1445 virtual void DescribeTo(::std::ostream* gmock_os) const {\
1446 *gmock_os << FormatDescription(false);\
1448 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1449 *gmock_os << FormatDescription(true);\
1451 p0##_type const p0;\
1453 ::std::string FormatDescription(bool negation) const {\
1454 ::std::string gmock_description = (description);\
1455 if (!gmock_description.empty())\
1456 return gmock_description;\
1457 return ::testing::internal::FormatMatcherDescription(\
1459 ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
1460 ::testing::tuple<p0##_type>(p0)));\
1463 template <typename arg_type>\
1464 operator ::testing::Matcher<arg_type>() const {\
1465 return ::testing::Matcher<arg_type>(\
1466 new gmock_Impl<arg_type>(p0));\
1468 explicit name##MatcherP(p0##_type gmock_p0) : \
1469 p0(::testing::internal::move(gmock_p0)) {\
1471 p0##_type const p0;\
1474 template <typename p0##_type>\
1475 inline name##MatcherP<p0##_type> name(p0##_type p0) {\
1476 return name##MatcherP<p0##_type>(p0);\
1478 template <typename p0##_type>\
1479 template <typename arg_type>\
1480 bool name##MatcherP<p0##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
1481 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1482 ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
1485#define MATCHER_P2(name, p0, p1, description)\
1486 template <typename p0##_type, typename p1##_type>\
1487 class name##MatcherP2 {\
1489 template <typename arg_type>\
1490 class gmock_Impl : public ::testing::MatcherInterface<\
1491 GTEST_REFERENCE_TO_CONST_(arg_type)> {\
1493 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1)\
1494 : p0(::testing::internal::move(gmock_p0)), \
1495 p1(::testing::internal::move(gmock_p1)) {}\
1496 virtual bool MatchAndExplain(\
1497 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1498 ::testing::MatchResultListener* result_listener) const;\
1499 virtual void DescribeTo(::std::ostream* gmock_os) const {\
1500 *gmock_os << FormatDescription(false);\
1502 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1503 *gmock_os << FormatDescription(true);\
1505 p0##_type const p0;\
1506 p1##_type const p1;\
1508 ::std::string FormatDescription(bool negation) const {\
1509 ::std::string gmock_description = (description);\
1510 if (!gmock_description.empty())\
1511 return gmock_description;\
1512 return ::testing::internal::FormatMatcherDescription(\
1514 ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
1515 ::testing::tuple<p0##_type, p1##_type>(p0, p1)));\
1518 template <typename arg_type>\
1519 operator ::testing::Matcher<arg_type>() const {\
1520 return ::testing::Matcher<arg_type>(\
1521 new gmock_Impl<arg_type>(p0, p1));\
1523 name##MatcherP2(p0##_type gmock_p0, \
1524 p1##_type gmock_p1) : p0(::testing::internal::move(gmock_p0)), \
1525 p1(::testing::internal::move(gmock_p1)) {\
1527 p0##_type const p0;\
1528 p1##_type const p1;\
1531 template <typename p0##_type, typename p1##_type>\
1532 inline name##MatcherP2<p0##_type, p1##_type> name(p0##_type p0, \
1534 return name##MatcherP2<p0##_type, p1##_type>(p0, p1);\
1536 template <typename p0##_type, typename p1##_type>\
1537 template <typename arg_type>\
1538 bool name##MatcherP2<p0##_type, \
1539 p1##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
1540 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1541 ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
1544#define MATCHER_P3(name, p0, p1, p2, description)\
1545 template <typename p0##_type, typename p1##_type, typename p2##_type>\
1546 class name##MatcherP3 {\
1548 template <typename arg_type>\
1549 class gmock_Impl : public ::testing::MatcherInterface<\
1550 GTEST_REFERENCE_TO_CONST_(arg_type)> {\
1552 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2)\
1553 : p0(::testing::internal::move(gmock_p0)), \
1554 p1(::testing::internal::move(gmock_p1)), \
1555 p2(::testing::internal::move(gmock_p2)) {}\
1556 virtual bool MatchAndExplain(\
1557 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1558 ::testing::MatchResultListener* result_listener) const;\
1559 virtual void DescribeTo(::std::ostream* gmock_os) const {\
1560 *gmock_os << FormatDescription(false);\
1562 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1563 *gmock_os << FormatDescription(true);\
1565 p0##_type const p0;\
1566 p1##_type const p1;\
1567 p2##_type const p2;\
1569 ::std::string FormatDescription(bool negation) const {\
1570 ::std::string gmock_description = (description);\
1571 if (!gmock_description.empty())\
1572 return gmock_description;\
1573 return ::testing::internal::FormatMatcherDescription(\
1575 ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
1576 ::testing::tuple<p0##_type, p1##_type, p2##_type>(p0, p1, \
1580 template <typename arg_type>\
1581 operator ::testing::Matcher<arg_type>() const {\
1582 return ::testing::Matcher<arg_type>(\
1583 new gmock_Impl<arg_type>(p0, p1, p2));\
1585 name##MatcherP3(p0##_type gmock_p0, p1##_type gmock_p1, \
1586 p2##_type gmock_p2) : p0(::testing::internal::move(gmock_p0)), \
1587 p1(::testing::internal::move(gmock_p1)), \
1588 p2(::testing::internal::move(gmock_p2)) {\
1590 p0##_type const p0;\
1591 p1##_type const p1;\
1592 p2##_type const p2;\
1595 template <typename p0##_type, typename p1##_type, typename p2##_type>\
1596 inline name##MatcherP3<p0##_type, p1##_type, p2##_type> name(p0##_type p0, \
1597 p1##_type p1, p2##_type p2) {\
1598 return name##MatcherP3<p0##_type, p1##_type, p2##_type>(p0, p1, p2);\
1600 template <typename p0##_type, typename p1##_type, typename p2##_type>\
1601 template <typename arg_type>\
1602 bool name##MatcherP3<p0##_type, p1##_type, \
1603 p2##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
1604 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1605 ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
1608#define MATCHER_P4(name, p0, p1, p2, p3, description)\
1609 template <typename p0##_type, typename p1##_type, typename p2##_type, \
1610 typename p3##_type>\
1611 class name##MatcherP4 {\
1613 template <typename arg_type>\
1614 class gmock_Impl : public ::testing::MatcherInterface<\
1615 GTEST_REFERENCE_TO_CONST_(arg_type)> {\
1617 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1618 p3##_type gmock_p3)\
1619 : p0(::testing::internal::move(gmock_p0)), \
1620 p1(::testing::internal::move(gmock_p1)), \
1621 p2(::testing::internal::move(gmock_p2)), \
1622 p3(::testing::internal::move(gmock_p3)) {}\
1623 virtual bool MatchAndExplain(\
1624 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1625 ::testing::MatchResultListener* result_listener) const;\
1626 virtual void DescribeTo(::std::ostream* gmock_os) const {\
1627 *gmock_os << FormatDescription(false);\
1629 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1630 *gmock_os << FormatDescription(true);\
1632 p0##_type const p0;\
1633 p1##_type const p1;\
1634 p2##_type const p2;\
1635 p3##_type const p3;\
1637 ::std::string FormatDescription(bool negation) const {\
1638 ::std::string gmock_description = (description);\
1639 if (!gmock_description.empty())\
1640 return gmock_description;\
1641 return ::testing::internal::FormatMatcherDescription(\
1643 ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
1644 ::testing::tuple<p0##_type, p1##_type, p2##_type, \
1645 p3##_type>(p0, p1, p2, p3)));\
1648 template <typename arg_type>\
1649 operator ::testing::Matcher<arg_type>() const {\
1650 return ::testing::Matcher<arg_type>(\
1651 new gmock_Impl<arg_type>(p0, p1, p2, p3));\
1653 name##MatcherP4(p0##_type gmock_p0, p1##_type gmock_p1, \
1654 p2##_type gmock_p2, \
1655 p3##_type gmock_p3) : p0(::testing::internal::move(gmock_p0)), \
1656 p1(::testing::internal::move(gmock_p1)), \
1657 p2(::testing::internal::move(gmock_p2)), \
1658 p3(::testing::internal::move(gmock_p3)) {\
1660 p0##_type const p0;\
1661 p1##_type const p1;\
1662 p2##_type const p2;\
1663 p3##_type const p3;\
1666 template <typename p0##_type, typename p1##_type, typename p2##_type, \
1667 typename p3##_type>\
1668 inline name##MatcherP4<p0##_type, p1##_type, p2##_type, \
1669 p3##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, \
1671 return name##MatcherP4<p0##_type, p1##_type, p2##_type, p3##_type>(p0, \
1674 template <typename p0##_type, typename p1##_type, typename p2##_type, \
1675 typename p3##_type>\
1676 template <typename arg_type>\
1677 bool name##MatcherP4<p0##_type, p1##_type, p2##_type, \
1678 p3##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
1679 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1680 ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
1683#define MATCHER_P5(name, p0, p1, p2, p3, p4, description)\
1684 template <typename p0##_type, typename p1##_type, typename p2##_type, \
1685 typename p3##_type, typename p4##_type>\
1686 class name##MatcherP5 {\
1688 template <typename arg_type>\
1689 class gmock_Impl : public ::testing::MatcherInterface<\
1690 GTEST_REFERENCE_TO_CONST_(arg_type)> {\
1692 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1693 p3##_type gmock_p3, p4##_type gmock_p4)\
1694 : p0(::testing::internal::move(gmock_p0)), \
1695 p1(::testing::internal::move(gmock_p1)), \
1696 p2(::testing::internal::move(gmock_p2)), \
1697 p3(::testing::internal::move(gmock_p3)), \
1698 p4(::testing::internal::move(gmock_p4)) {}\
1699 virtual bool MatchAndExplain(\
1700 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1701 ::testing::MatchResultListener* result_listener) const;\
1702 virtual void DescribeTo(::std::ostream* gmock_os) const {\
1703 *gmock_os << FormatDescription(false);\
1705 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1706 *gmock_os << FormatDescription(true);\
1708 p0##_type const p0;\
1709 p1##_type const p1;\
1710 p2##_type const p2;\
1711 p3##_type const p3;\
1712 p4##_type const p4;\
1714 ::std::string FormatDescription(bool negation) const {\
1715 ::std::string gmock_description = (description);\
1716 if (!gmock_description.empty())\
1717 return gmock_description;\
1718 return ::testing::internal::FormatMatcherDescription(\
1720 ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
1721 ::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
1722 p4##_type>(p0, p1, p2, p3, p4)));\
1725 template <typename arg_type>\
1726 operator ::testing::Matcher<arg_type>() const {\
1727 return ::testing::Matcher<arg_type>(\
1728 new gmock_Impl<arg_type>(p0, p1, p2, p3, p4));\
1730 name##MatcherP5(p0##_type gmock_p0, p1##_type gmock_p1, \
1731 p2##_type gmock_p2, p3##_type gmock_p3, \
1732 p4##_type gmock_p4) : p0(::testing::internal::move(gmock_p0)), \
1733 p1(::testing::internal::move(gmock_p1)), \
1734 p2(::testing::internal::move(gmock_p2)), \
1735 p3(::testing::internal::move(gmock_p3)), \
1736 p4(::testing::internal::move(gmock_p4)) {\
1738 p0##_type const p0;\
1739 p1##_type const p1;\
1740 p2##_type const p2;\
1741 p3##_type const p3;\
1742 p4##_type const p4;\
1745 template <typename p0##_type, typename p1##_type, typename p2##_type, \
1746 typename p3##_type, typename p4##_type>\
1747 inline name##MatcherP5<p0##_type, p1##_type, p2##_type, p3##_type, \
1748 p4##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
1750 return name##MatcherP5<p0##_type, p1##_type, p2##_type, p3##_type, \
1751 p4##_type>(p0, p1, p2, p3, p4);\
1753 template <typename p0##_type, typename p1##_type, typename p2##_type, \
1754 typename p3##_type, typename p4##_type>\
1755 template <typename arg_type>\
1756 bool name##MatcherP5<p0##_type, p1##_type, p2##_type, p3##_type, \
1757 p4##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
1758 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1759 ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
1762#define MATCHER_P6(name, p0, p1, p2, p3, p4, p5, description)\
1763 template <typename p0##_type, typename p1##_type, typename p2##_type, \
1764 typename p3##_type, typename p4##_type, typename p5##_type>\
1765 class name##MatcherP6 {\
1767 template <typename arg_type>\
1768 class gmock_Impl : public ::testing::MatcherInterface<\
1769 GTEST_REFERENCE_TO_CONST_(arg_type)> {\
1771 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1772 p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5)\
1773 : p0(::testing::internal::move(gmock_p0)), \
1774 p1(::testing::internal::move(gmock_p1)), \
1775 p2(::testing::internal::move(gmock_p2)), \
1776 p3(::testing::internal::move(gmock_p3)), \
1777 p4(::testing::internal::move(gmock_p4)), \
1778 p5(::testing::internal::move(gmock_p5)) {}\
1779 virtual bool MatchAndExplain(\
1780 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1781 ::testing::MatchResultListener* result_listener) const;\
1782 virtual void DescribeTo(::std::ostream* gmock_os) const {\
1783 *gmock_os << FormatDescription(false);\
1785 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1786 *gmock_os << FormatDescription(true);\
1788 p0##_type const p0;\
1789 p1##_type const p1;\
1790 p2##_type const p2;\
1791 p3##_type const p3;\
1792 p4##_type const p4;\
1793 p5##_type const p5;\
1795 ::std::string FormatDescription(bool negation) const {\
1796 ::std::string gmock_description = (description);\
1797 if (!gmock_description.empty())\
1798 return gmock_description;\
1799 return ::testing::internal::FormatMatcherDescription(\
1801 ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
1802 ::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
1803 p4##_type, p5##_type>(p0, p1, p2, p3, p4, p5)));\
1806 template <typename arg_type>\
1807 operator ::testing::Matcher<arg_type>() const {\
1808 return ::testing::Matcher<arg_type>(\
1809 new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5));\
1811 name##MatcherP6(p0##_type gmock_p0, p1##_type gmock_p1, \
1812 p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
1813 p5##_type gmock_p5) : p0(::testing::internal::move(gmock_p0)), \
1814 p1(::testing::internal::move(gmock_p1)), \
1815 p2(::testing::internal::move(gmock_p2)), \
1816 p3(::testing::internal::move(gmock_p3)), \
1817 p4(::testing::internal::move(gmock_p4)), \
1818 p5(::testing::internal::move(gmock_p5)) {\
1820 p0##_type const p0;\
1821 p1##_type const p1;\
1822 p2##_type const p2;\
1823 p3##_type const p3;\
1824 p4##_type const p4;\
1825 p5##_type const p5;\
1828 template <typename p0##_type, typename p1##_type, typename p2##_type, \
1829 typename p3##_type, typename p4##_type, typename p5##_type>\
1830 inline name##MatcherP6<p0##_type, p1##_type, p2##_type, p3##_type, \
1831 p4##_type, p5##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, \
1832 p3##_type p3, p4##_type p4, p5##_type p5) {\
1833 return name##MatcherP6<p0##_type, p1##_type, p2##_type, p3##_type, \
1834 p4##_type, p5##_type>(p0, p1, p2, p3, p4, p5);\
1836 template <typename p0##_type, typename p1##_type, typename p2##_type, \
1837 typename p3##_type, typename p4##_type, typename p5##_type>\
1838 template <typename arg_type>\
1839 bool name##MatcherP6<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
1840 p5##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
1841 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1842 ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
1845#define MATCHER_P7(name, p0, p1, p2, p3, p4, p5, p6, description)\
1846 template <typename p0##_type, typename p1##_type, typename p2##_type, \
1847 typename p3##_type, typename p4##_type, typename p5##_type, \
1848 typename p6##_type>\
1849 class name##MatcherP7 {\
1851 template <typename arg_type>\
1852 class gmock_Impl : public ::testing::MatcherInterface<\
1853 GTEST_REFERENCE_TO_CONST_(arg_type)> {\
1855 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1856 p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
1857 p6##_type gmock_p6)\
1858 : p0(::testing::internal::move(gmock_p0)), \
1859 p1(::testing::internal::move(gmock_p1)), \
1860 p2(::testing::internal::move(gmock_p2)), \
1861 p3(::testing::internal::move(gmock_p3)), \
1862 p4(::testing::internal::move(gmock_p4)), \
1863 p5(::testing::internal::move(gmock_p5)), \
1864 p6(::testing::internal::move(gmock_p6)) {}\
1865 virtual bool MatchAndExplain(\
1866 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1867 ::testing::MatchResultListener* result_listener) const;\
1868 virtual void DescribeTo(::std::ostream* gmock_os) const {\
1869 *gmock_os << FormatDescription(false);\
1871 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1872 *gmock_os << FormatDescription(true);\
1874 p0##_type const p0;\
1875 p1##_type const p1;\
1876 p2##_type const p2;\
1877 p3##_type const p3;\
1878 p4##_type const p4;\
1879 p5##_type const p5;\
1880 p6##_type const p6;\
1882 ::std::string FormatDescription(bool negation) const {\
1883 ::std::string gmock_description = (description);\
1884 if (!gmock_description.empty())\
1885 return gmock_description;\
1886 return ::testing::internal::FormatMatcherDescription(\
1888 ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
1889 ::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
1890 p4##_type, p5##_type, p6##_type>(p0, p1, p2, p3, p4, p5, \
1894 template <typename arg_type>\
1895 operator ::testing::Matcher<arg_type>() const {\
1896 return ::testing::Matcher<arg_type>(\
1897 new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5, p6));\
1899 name##MatcherP7(p0##_type gmock_p0, p1##_type gmock_p1, \
1900 p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
1901 p5##_type gmock_p5, \
1902 p6##_type gmock_p6) : p0(::testing::internal::move(gmock_p0)), \
1903 p1(::testing::internal::move(gmock_p1)), \
1904 p2(::testing::internal::move(gmock_p2)), \
1905 p3(::testing::internal::move(gmock_p3)), \
1906 p4(::testing::internal::move(gmock_p4)), \
1907 p5(::testing::internal::move(gmock_p5)), \
1908 p6(::testing::internal::move(gmock_p6)) {\
1910 p0##_type const p0;\
1911 p1##_type const p1;\
1912 p2##_type const p2;\
1913 p3##_type const p3;\
1914 p4##_type const p4;\
1915 p5##_type const p5;\
1916 p6##_type const p6;\
1919 template <typename p0##_type, typename p1##_type, typename p2##_type, \
1920 typename p3##_type, typename p4##_type, typename p5##_type, \
1921 typename p6##_type>\
1922 inline name##MatcherP7<p0##_type, p1##_type, p2##_type, p3##_type, \
1923 p4##_type, p5##_type, p6##_type> name(p0##_type p0, p1##_type p1, \
1924 p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \
1926 return name##MatcherP7<p0##_type, p1##_type, p2##_type, p3##_type, \
1927 p4##_type, p5##_type, p6##_type>(p0, p1, p2, p3, p4, p5, p6);\
1929 template <typename p0##_type, typename p1##_type, typename p2##_type, \
1930 typename p3##_type, typename p4##_type, typename p5##_type, \
1931 typename p6##_type>\
1932 template <typename arg_type>\
1933 bool name##MatcherP7<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
1934 p5##_type, p6##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
1935 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1936 ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
1939#define MATCHER_P8(name, p0, p1, p2, p3, p4, p5, p6, p7, description)\
1940 template <typename p0##_type, typename p1##_type, typename p2##_type, \
1941 typename p3##_type, typename p4##_type, typename p5##_type, \
1942 typename p6##_type, typename p7##_type>\
1943 class name##MatcherP8 {\
1945 template <typename arg_type>\
1946 class gmock_Impl : public ::testing::MatcherInterface<\
1947 GTEST_REFERENCE_TO_CONST_(arg_type)> {\
1949 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1950 p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
1951 p6##_type gmock_p6, p7##_type gmock_p7)\
1952 : p0(::testing::internal::move(gmock_p0)), \
1953 p1(::testing::internal::move(gmock_p1)), \
1954 p2(::testing::internal::move(gmock_p2)), \
1955 p3(::testing::internal::move(gmock_p3)), \
1956 p4(::testing::internal::move(gmock_p4)), \
1957 p5(::testing::internal::move(gmock_p5)), \
1958 p6(::testing::internal::move(gmock_p6)), \
1959 p7(::testing::internal::move(gmock_p7)) {}\
1960 virtual bool MatchAndExplain(\
1961 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1962 ::testing::MatchResultListener* result_listener) const;\
1963 virtual void DescribeTo(::std::ostream* gmock_os) const {\
1964 *gmock_os << FormatDescription(false);\
1966 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1967 *gmock_os << FormatDescription(true);\
1969 p0##_type const p0;\
1970 p1##_type const p1;\
1971 p2##_type const p2;\
1972 p3##_type const p3;\
1973 p4##_type const p4;\
1974 p5##_type const p5;\
1975 p6##_type const p6;\
1976 p7##_type const p7;\
1978 ::std::string FormatDescription(bool negation) const {\
1979 ::std::string gmock_description = (description);\
1980 if (!gmock_description.empty())\
1981 return gmock_description;\
1982 return ::testing::internal::FormatMatcherDescription(\
1984 ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
1985 ::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
1986 p4##_type, p5##_type, p6##_type, p7##_type>(p0, p1, p2, \
1987 p3, p4, p5, p6, p7)));\
1990 template <typename arg_type>\
1991 operator ::testing::Matcher<arg_type>() const {\
1992 return ::testing::Matcher<arg_type>(\
1993 new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5, p6, p7));\
1995 name##MatcherP8(p0##_type gmock_p0, p1##_type gmock_p1, \
1996 p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
1997 p5##_type gmock_p5, p6##_type gmock_p6, \
1998 p7##_type gmock_p7) : p0(::testing::internal::move(gmock_p0)), \
1999 p1(::testing::internal::move(gmock_p1)), \
2000 p2(::testing::internal::move(gmock_p2)), \
2001 p3(::testing::internal::move(gmock_p3)), \
2002 p4(::testing::internal::move(gmock_p4)), \
2003 p5(::testing::internal::move(gmock_p5)), \
2004 p6(::testing::internal::move(gmock_p6)), \
2005 p7(::testing::internal::move(gmock_p7)) {\
2007 p0##_type const p0;\
2008 p1##_type const p1;\
2009 p2##_type const p2;\
2010 p3##_type const p3;\
2011 p4##_type const p4;\
2012 p5##_type const p5;\
2013 p6##_type const p6;\
2014 p7##_type const p7;\
2017 template <typename p0##_type, typename p1##_type, typename p2##_type, \
2018 typename p3##_type, typename p4##_type, typename p5##_type, \
2019 typename p6##_type, typename p7##_type>\
2020 inline name##MatcherP8<p0##_type, p1##_type, p2##_type, p3##_type, \
2021 p4##_type, p5##_type, p6##_type, p7##_type> name(p0##_type p0, \
2022 p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \
2023 p6##_type p6, p7##_type p7) {\
2024 return name##MatcherP8<p0##_type, p1##_type, p2##_type, p3##_type, \
2025 p4##_type, p5##_type, p6##_type, p7##_type>(p0, p1, p2, p3, p4, p5, \
2028 template <typename p0##_type, typename p1##_type, typename p2##_type, \
2029 typename p3##_type, typename p4##_type, typename p5##_type, \
2030 typename p6##_type, typename p7##_type>\
2031 template <typename arg_type>\
2032 bool name##MatcherP8<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
2033 p5##_type, p6##_type, \
2034 p7##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
2035 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
2036 ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
2039#define MATCHER_P9(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, description)\
2040 template <typename p0##_type, typename p1##_type, typename p2##_type, \
2041 typename p3##_type, typename p4##_type, typename p5##_type, \
2042 typename p6##_type, typename p7##_type, typename p8##_type>\
2043 class name##MatcherP9 {\
2045 template <typename arg_type>\
2046 class gmock_Impl : public ::testing::MatcherInterface<\
2047 GTEST_REFERENCE_TO_CONST_(arg_type)> {\
2049 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
2050 p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
2051 p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8)\
2052 : p0(::testing::internal::move(gmock_p0)), \
2053 p1(::testing::internal::move(gmock_p1)), \
2054 p2(::testing::internal::move(gmock_p2)), \
2055 p3(::testing::internal::move(gmock_p3)), \
2056 p4(::testing::internal::move(gmock_p4)), \
2057 p5(::testing::internal::move(gmock_p5)), \
2058 p6(::testing::internal::move(gmock_p6)), \
2059 p7(::testing::internal::move(gmock_p7)), \
2060 p8(::testing::internal::move(gmock_p8)) {}\
2061 virtual bool MatchAndExplain(\
2062 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
2063 ::testing::MatchResultListener* result_listener) const;\
2064 virtual void DescribeTo(::std::ostream* gmock_os) const {\
2065 *gmock_os << FormatDescription(false);\
2067 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
2068 *gmock_os << FormatDescription(true);\
2070 p0##_type const p0;\
2071 p1##_type const p1;\
2072 p2##_type const p2;\
2073 p3##_type const p3;\
2074 p4##_type const p4;\
2075 p5##_type const p5;\
2076 p6##_type const p6;\
2077 p7##_type const p7;\
2078 p8##_type const p8;\
2080 ::std::string FormatDescription(bool negation) const {\
2081 ::std::string gmock_description = (description);\
2082 if (!gmock_description.empty())\
2083 return gmock_description;\
2084 return ::testing::internal::FormatMatcherDescription(\
2086 ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
2087 ::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
2088 p4##_type, p5##_type, p6##_type, p7##_type, \
2089 p8##_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8)));\
2092 template <typename arg_type>\
2093 operator ::testing::Matcher<arg_type>() const {\
2094 return ::testing::Matcher<arg_type>(\
2095 new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8));\
2097 name##MatcherP9(p0##_type gmock_p0, p1##_type gmock_p1, \
2098 p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
2099 p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \
2100 p8##_type gmock_p8) : p0(::testing::internal::move(gmock_p0)), \
2101 p1(::testing::internal::move(gmock_p1)), \
2102 p2(::testing::internal::move(gmock_p2)), \
2103 p3(::testing::internal::move(gmock_p3)), \
2104 p4(::testing::internal::move(gmock_p4)), \
2105 p5(::testing::internal::move(gmock_p5)), \
2106 p6(::testing::internal::move(gmock_p6)), \
2107 p7(::testing::internal::move(gmock_p7)), \
2108 p8(::testing::internal::move(gmock_p8)) {\
2110 p0##_type const p0;\
2111 p1##_type const p1;\
2112 p2##_type const p2;\
2113 p3##_type const p3;\
2114 p4##_type const p4;\
2115 p5##_type const p5;\
2116 p6##_type const p6;\
2117 p7##_type const p7;\
2118 p8##_type const p8;\
2121 template <typename p0##_type, typename p1##_type, typename p2##_type, \
2122 typename p3##_type, typename p4##_type, typename p5##_type, \
2123 typename p6##_type, typename p7##_type, typename p8##_type>\
2124 inline name##MatcherP9<p0##_type, p1##_type, p2##_type, p3##_type, \
2125 p4##_type, p5##_type, p6##_type, p7##_type, \
2126 p8##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
2127 p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, \
2129 return name##MatcherP9<p0##_type, p1##_type, p2##_type, p3##_type, \
2130 p4##_type, p5##_type, p6##_type, p7##_type, p8##_type>(p0, p1, p2, \
2131 p3, p4, p5, p6, p7, p8);\
2133 template <typename p0##_type, typename p1##_type, typename p2##_type, \
2134 typename p3##_type, typename p4##_type, typename p5##_type, \
2135 typename p6##_type, typename p7##_type, typename p8##_type>\
2136 template <typename arg_type>\
2137 bool name##MatcherP9<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
2138 p5##_type, p6##_type, p7##_type, \
2139 p8##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
2140 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
2141 ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
2144#define MATCHER_P10(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, description)\
2145 template <typename p0##_type, typename p1##_type, typename p2##_type, \
2146 typename p3##_type, typename p4##_type, typename p5##_type, \
2147 typename p6##_type, typename p7##_type, typename p8##_type, \
2148 typename p9##_type>\
2149 class name##MatcherP10 {\
2151 template <typename arg_type>\
2152 class gmock_Impl : public ::testing::MatcherInterface<\
2153 GTEST_REFERENCE_TO_CONST_(arg_type)> {\
2155 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
2156 p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
2157 p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8, \
2158 p9##_type gmock_p9)\
2159 : p0(::testing::internal::move(gmock_p0)), \
2160 p1(::testing::internal::move(gmock_p1)), \
2161 p2(::testing::internal::move(gmock_p2)), \
2162 p3(::testing::internal::move(gmock_p3)), \
2163 p4(::testing::internal::move(gmock_p4)), \
2164 p5(::testing::internal::move(gmock_p5)), \
2165 p6(::testing::internal::move(gmock_p6)), \
2166 p7(::testing::internal::move(gmock_p7)), \
2167 p8(::testing::internal::move(gmock_p8)), \
2168 p9(::testing::internal::move(gmock_p9)) {}\
2169 virtual bool MatchAndExplain(\
2170 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
2171 ::testing::MatchResultListener* result_listener) const;\
2172 virtual void DescribeTo(::std::ostream* gmock_os) const {\
2173 *gmock_os << FormatDescription(false);\
2175 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
2176 *gmock_os << FormatDescription(true);\
2178 p0##_type const p0;\
2179 p1##_type const p1;\
2180 p2##_type const p2;\
2181 p3##_type const p3;\
2182 p4##_type const p4;\
2183 p5##_type const p5;\
2184 p6##_type const p6;\
2185 p7##_type const p7;\
2186 p8##_type const p8;\
2187 p9##_type const p9;\
2189 ::std::string FormatDescription(bool negation) const {\
2190 ::std::string gmock_description = (description);\
2191 if (!gmock_description.empty())\
2192 return gmock_description;\
2193 return ::testing::internal::FormatMatcherDescription(\
2195 ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
2196 ::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
2197 p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, \
2198 p9##_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)));\
2201 template <typename arg_type>\
2202 operator ::testing::Matcher<arg_type>() const {\
2203 return ::testing::Matcher<arg_type>(\
2204 new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9));\
2206 name##MatcherP10(p0##_type gmock_p0, p1##_type gmock_p1, \
2207 p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
2208 p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \
2209 p8##_type gmock_p8, \
2210 p9##_type gmock_p9) : p0(::testing::internal::move(gmock_p0)), \
2211 p1(::testing::internal::move(gmock_p1)), \
2212 p2(::testing::internal::move(gmock_p2)), \
2213 p3(::testing::internal::move(gmock_p3)), \
2214 p4(::testing::internal::move(gmock_p4)), \
2215 p5(::testing::internal::move(gmock_p5)), \
2216 p6(::testing::internal::move(gmock_p6)), \
2217 p7(::testing::internal::move(gmock_p7)), \
2218 p8(::testing::internal::move(gmock_p8)), \
2219 p9(::testing::internal::move(gmock_p9)) {\
2221 p0##_type const p0;\
2222 p1##_type const p1;\
2223 p2##_type const p2;\
2224 p3##_type const p3;\
2225 p4##_type const p4;\
2226 p5##_type const p5;\
2227 p6##_type const p6;\
2228 p7##_type const p7;\
2229 p8##_type const p8;\
2230 p9##_type const p9;\
2233 template <typename p0##_type, typename p1##_type, typename p2##_type, \
2234 typename p3##_type, typename p4##_type, typename p5##_type, \
2235 typename p6##_type, typename p7##_type, typename p8##_type, \
2236 typename p9##_type>\
2237 inline name##MatcherP10<p0##_type, p1##_type, p2##_type, p3##_type, \
2238 p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, \
2239 p9##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
2240 p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8, \
2242 return name##MatcherP10<p0##_type, p1##_type, p2##_type, p3##_type, \
2243 p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, p9##_type>(p0, \
2244 p1, p2, p3, p4, p5, p6, p7, p8, p9);\
2246 template <typename p0##_type, typename p1##_type, typename p2##_type, \
2247 typename p3##_type, typename p4##_type, typename p5##_type, \
2248 typename p6##_type, typename p7##_type, typename p8##_type, \
2249 typename p9##_type>\
2250 template <typename arg_type>\
2251 bool name##MatcherP10<p0##_type, p1##_type, p2##_type, p3##_type, \
2252 p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, \
2253 p9##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
2254 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
2255 ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
::std::ostream * stream()
bool IsInterested() const
ArgsMatcher(const InnerMatcher &inner_matcher)
virtual bool MatchAndExplain(ArgsTuple args, MatchResultListener *listener) const
internal::TupleFields< RawArgsTuple, k0, k1, k2, k3, k4, k5, k6, k7, k8, k9 >::type SelectedArgs
typedef GTEST_REMOVE_REFERENCE_AND_CONST_(ArgsTuple) RawArgsTuple
ArgsMatcherImpl(const InnerMatcher &inner_matcher)
Matcher< const SelectedArgs & > MonomorphicInnerMatcher
virtual void DescribeTo(::std::ostream *os) const
virtual void DescribeNegationTo(::std::ostream *os) const
void DescribeTo(::std::ostream *os) const
bool MatchAndExplain(GTEST_REFERENCE_TO_CONST_(T) x, MatchResultListener *listener) const
bool Matches(GTEST_REFERENCE_TO_CONST_(T) x) const
void DescribeNegationTo(::std::ostream *os) const
testing::internal::TupleFields< Tuple, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 >::type ::testing::tuple type
testing::internal::TupleFields< Tuple, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 >::GetSelectedFields static type GetSelectedFields(const Tuple &)
testing::internal::TupleFields< Tuple, k0, -1, -1, -1, -1, -1, -1, -1, -1, -1 >::GetSelectedFields static type GetSelectedFields(const Tuple &t)
testing::internal::TupleFields< Tuple, k0, -1, -1, -1, -1, -1, -1, -1, -1, -1 >::type ::testing::tuple< GMOCK_FIELD_TYPE_(Tuple, k0)> type
testing::internal::TupleFields< Tuple, k0, k1, -1, -1, -1, -1, -1, -1, -1, -1 >::type ::testing::tuple< GMOCK_FIELD_TYPE_(Tuple, k0), GMOCK_FIELD_TYPE_(Tuple, k1)> type
testing::internal::TupleFields< Tuple, k0, k1, -1, -1, -1, -1, -1, -1, -1, -1 >::GetSelectedFields static type GetSelectedFields(const Tuple &t)
testing::internal::TupleFields< Tuple, k0, k1, k2, -1, -1, -1, -1, -1, -1, -1 >::type ::testing::tuple< GMOCK_FIELD_TYPE_(Tuple, k0), GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2)> type
testing::internal::TupleFields< Tuple, k0, k1, k2, -1, -1, -1, -1, -1, -1, -1 >::GetSelectedFields static type GetSelectedFields(const Tuple &t)
testing::internal::TupleFields< Tuple, k0, k1, k2, k3, -1, -1, -1, -1, -1, -1 >::type ::testing::tuple< GMOCK_FIELD_TYPE_(Tuple, k0), GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2), GMOCK_FIELD_TYPE_(Tuple, k3)> type
testing::internal::TupleFields< Tuple, k0, k1, k2, k3, -1, -1, -1, -1, -1, -1 >::GetSelectedFields static type GetSelectedFields(const Tuple &t)
testing::internal::TupleFields< Tuple, k0, k1, k2, k3, k4, k5, k6, -1, -1, -1 >::type ::testing::tuple< GMOCK_FIELD_TYPE_(Tuple, k0), GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2), GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4), GMOCK_FIELD_TYPE_(Tuple, k5), GMOCK_FIELD_TYPE_(Tuple, k6)> type
testing::internal::TupleFields< Tuple, k0, k1, k2, k3, k4, k5, k6, -1, -1, -1 >::GetSelectedFields static type GetSelectedFields(const Tuple &t)
testing::internal::TupleFields< Tuple, k0, k1, k2, k3, k4, -1, -1, -1, -1, -1 >::GetSelectedFields static type GetSelectedFields(const Tuple &t)
testing::internal::TupleFields< Tuple, k0, k1, k2, k3, k4, -1, -1, -1, -1, -1 >::type ::testing::tuple< GMOCK_FIELD_TYPE_(Tuple, k0), GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2), GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4)> type
testing::internal::TupleFields< Tuple, k0, k1, k2, k3, k4, k5, k6, k7, k8, -1 >::type ::testing::tuple< GMOCK_FIELD_TYPE_(Tuple, k0), GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2), GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4), GMOCK_FIELD_TYPE_(Tuple, k5), GMOCK_FIELD_TYPE_(Tuple, k6), GMOCK_FIELD_TYPE_(Tuple, k7), GMOCK_FIELD_TYPE_(Tuple, k8)> type
testing::internal::TupleFields< Tuple, k0, k1, k2, k3, k4, k5, k6, k7, k8, -1 >::GetSelectedFields static type GetSelectedFields(const Tuple &t)
testing::internal::TupleFields< Tuple, k0, k1, k2, k3, k4, k5, k6, k7, -1, -1 >::GetSelectedFields static type GetSelectedFields(const Tuple &t)
testing::internal::TupleFields< Tuple, k0, k1, k2, k3, k4, k5, k6, k7, -1, -1 >::type ::testing::tuple< GMOCK_FIELD_TYPE_(Tuple, k0), GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2), GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4), GMOCK_FIELD_TYPE_(Tuple, k5), GMOCK_FIELD_TYPE_(Tuple, k6), GMOCK_FIELD_TYPE_(Tuple, k7)> type
testing::internal::TupleFields< Tuple, k0, k1, k2, k3, k4, k5, -1, -1, -1, -1 >::GetSelectedFields static type GetSelectedFields(const Tuple &t)
testing::internal::TupleFields< Tuple, k0, k1, k2, k3, k4, k5, -1, -1, -1, -1 >::type ::testing::tuple< GMOCK_FIELD_TYPE_(Tuple, k0), GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2), GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4), GMOCK_FIELD_TYPE_(Tuple, k5)> type
static type GetSelectedFields(const Tuple &t)
::testing::tuple< GMOCK_FIELD_TYPE_(Tuple, k0), GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2), GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4), GMOCK_FIELD_TYPE_(Tuple, k5), GMOCK_FIELD_TYPE_(Tuple, k6), GMOCK_FIELD_TYPE_(Tuple, k7), GMOCK_FIELD_TYPE_(Tuple, k8), GMOCK_FIELD_TYPE_(Tuple, k9)> type
#define GMOCK_FIELD_TYPE_(Tuple, i)
#define GTEST_DISALLOW_ASSIGN_(type)
static const Opmask k6(6)
static const Opmask k7(7)
static const Opmask k3(3)
static const Opmask k4(4)
static const Opmask k2(2)
static const Opmask k1(1)
static const Opmask k5(5)
void PrintIfNotEmpty(const std::string &explanation, ::std::ostream *os)
internal::AllOfResult2< M1, M2 >::type AllOf(M1 m1, M2 m2)
internal::ArgsMatcher< InnerMatcher > Args(const InnerMatcher &matcher)
internal::ElementsAreMatcher< ::testing::tuple<> > ElementsAre()
internal::UnorderedElementsAreMatcher< ::testing::tuple<> > UnorderedElementsAre()
::std::string PrintToString(const T &value)
Matcher< T > MakeMatcher(const MatcherInterface< T > *impl)
internal::AnyOfResult2< M1, M2 >::type AnyOf(M1 m1, M2 m2)
Matcher< T > SafeMatcherCast(const M &polymorphic_matcher)
BothOfMatcher< typename AllOfResult5< M1, M2, M3, M4, M5 >::type, typename AllOfResult5< M6, M7, M8, M9, M10 >::type > type
BothOfMatcher< typename AllOfResult1< M1 >::type, typename AllOfResult1< M2 >::type > type
BothOfMatcher< typename AllOfResult1< M1 >::type, typename AllOfResult2< M2, M3 >::type > type
BothOfMatcher< typename AllOfResult2< M1, M2 >::type, typename AllOfResult2< M3, M4 >::type > type
BothOfMatcher< typename AllOfResult2< M1, M2 >::type, typename AllOfResult3< M3, M4, M5 >::type > type
BothOfMatcher< typename AllOfResult3< M1, M2, M3 >::type, typename AllOfResult3< M4, M5, M6 >::type > type
BothOfMatcher< typename AllOfResult3< M1, M2, M3 >::type, typename AllOfResult4< M4, M5, M6, M7 >::type > type
BothOfMatcher< typename AllOfResult4< M1, M2, M3, M4 >::type, typename AllOfResult4< M5, M6, M7, M8 >::type > type
BothOfMatcher< typename AllOfResult4< M1, M2, M3, M4 >::type, typename AllOfResult5< M5, M6, M7, M8, M9 >::type > type
EitherOfMatcher< typename AnyOfResult5< M1, M2, M3, M4, M5 >::type, typename AnyOfResult5< M6, M7, M8, M9, M10 >::type > type
EitherOfMatcher< typename AnyOfResult1< M1 >::type, typename AnyOfResult1< M2 >::type > type
EitherOfMatcher< typename AnyOfResult1< M1 >::type, typename AnyOfResult2< M2, M3 >::type > type
EitherOfMatcher< typename AnyOfResult2< M1, M2 >::type, typename AnyOfResult2< M3, M4 >::type > type
EitherOfMatcher< typename AnyOfResult2< M1, M2 >::type, typename AnyOfResult3< M3, M4, M5 >::type > type
EitherOfMatcher< typename AnyOfResult3< M1, M2, M3 >::type, typename AnyOfResult3< M4, M5, M6 >::type > type
EitherOfMatcher< typename AnyOfResult3< M1, M2, M3 >::type, typename AnyOfResult4< M4, M5, M6, M7 >::type > type
EitherOfMatcher< typename AnyOfResult4< M1, M2, M3, M4 >::type, typename AnyOfResult4< M5, M6, M7, M8 >::type > type
EitherOfMatcher< typename AnyOfResult4< M1, M2, M3, M4 >::type, typename AnyOfResult5< M5, M6, M7, M8, M9 >::type > type