Go to the documentation of this file.
40 #ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_
41 #define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_
48 #include "gmock/gmock-matchers.h"
263 #define MATCHER(name, description)\
264 class name##Matcher {\
266 template <typename arg_type>\
267 class gmock_Impl : public ::testing::MatcherInterface<\
268 GTEST_REFERENCE_TO_CONST_(arg_type)> {\
272 virtual bool MatchAndExplain(\
273 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
274 ::testing::MatchResultListener* result_listener) const;\
275 virtual void DescribeTo(::std::ostream* gmock_os) const {\
276 *gmock_os << FormatDescription(false);\
278 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
279 *gmock_os << FormatDescription(true);\
282 ::std::string FormatDescription(bool negation) const {\
283 ::std::string gmock_description = (description);\
284 if (!gmock_description.empty()) {\
285 return gmock_description;\
287 return ::testing::internal::FormatMatcherDescription(\
289 ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
293 template <typename arg_type>\
294 operator ::testing::Matcher<arg_type>() const {\
295 return ::testing::Matcher<arg_type>(\
296 new gmock_Impl<arg_type>());\
302 inline name##Matcher name() {\
303 return name##Matcher();\
305 template <typename arg_type>\
306 bool name##Matcher::gmock_Impl<arg_type>::MatchAndExplain(\
307 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
308 ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
311 #define MATCHER_P(name, p0, description)\
312 template <typename p0##_type>\
313 class name##MatcherP {\
315 template <typename arg_type>\
316 class gmock_Impl : public ::testing::MatcherInterface<\
317 GTEST_REFERENCE_TO_CONST_(arg_type)> {\
319 explicit gmock_Impl(p0##_type gmock_p0)\
320 : p0(::std::move(gmock_p0)) {}\
321 virtual bool MatchAndExplain(\
322 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
323 ::testing::MatchResultListener* result_listener) const;\
324 virtual void DescribeTo(::std::ostream* gmock_os) const {\
325 *gmock_os << FormatDescription(false);\
327 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
328 *gmock_os << FormatDescription(true);\
332 ::std::string FormatDescription(bool negation) const {\
333 ::std::string gmock_description = (description);\
334 if (!gmock_description.empty()) {\
335 return gmock_description;\
337 return ::testing::internal::FormatMatcherDescription(\
339 ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
340 ::std::tuple<p0##_type>(p0)));\
343 template <typename arg_type>\
344 operator ::testing::Matcher<arg_type>() const {\
345 return ::testing::Matcher<arg_type>(\
346 new gmock_Impl<arg_type>(p0));\
348 explicit name##MatcherP(p0##_type gmock_p0) : p0(::std::move(gmock_p0)) {\
353 template <typename p0##_type>\
354 inline name##MatcherP<p0##_type> name(p0##_type p0) {\
355 return name##MatcherP<p0##_type>(p0);\
357 template <typename p0##_type>\
358 template <typename arg_type>\
359 bool name##MatcherP<p0##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
360 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
361 ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
364 #define MATCHER_P2(name, p0, p1, description)\
365 template <typename p0##_type, typename p1##_type>\
366 class name##MatcherP2 {\
368 template <typename arg_type>\
369 class gmock_Impl : public ::testing::MatcherInterface<\
370 GTEST_REFERENCE_TO_CONST_(arg_type)> {\
372 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1)\
373 : p0(::std::move(gmock_p0)), p1(::std::move(gmock_p1)) {}\
374 virtual bool MatchAndExplain(\
375 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
376 ::testing::MatchResultListener* result_listener) const;\
377 virtual void DescribeTo(::std::ostream* gmock_os) const {\
378 *gmock_os << FormatDescription(false);\
380 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
381 *gmock_os << FormatDescription(true);\
386 ::std::string FormatDescription(bool negation) const {\
387 ::std::string gmock_description = (description);\
388 if (!gmock_description.empty()) {\
389 return gmock_description;\
391 return ::testing::internal::FormatMatcherDescription(\
393 ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
394 ::std::tuple<p0##_type, p1##_type>(p0, p1)));\
397 template <typename arg_type>\
398 operator ::testing::Matcher<arg_type>() const {\
399 return ::testing::Matcher<arg_type>(\
400 new gmock_Impl<arg_type>(p0, p1));\
402 name##MatcherP2(p0##_type gmock_p0, \
403 p1##_type gmock_p1) : p0(::std::move(gmock_p0)), \
404 p1(::std::move(gmock_p1)) {\
410 template <typename p0##_type, typename p1##_type>\
411 inline name##MatcherP2<p0##_type, p1##_type> name(p0##_type p0, \
413 return name##MatcherP2<p0##_type, p1##_type>(p0, p1);\
415 template <typename p0##_type, typename p1##_type>\
416 template <typename arg_type>\
417 bool name##MatcherP2<p0##_type, \
418 p1##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
419 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
420 ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
423 #define MATCHER_P3(name, p0, p1, p2, description)\
424 template <typename p0##_type, typename p1##_type, typename p2##_type>\
425 class name##MatcherP3 {\
427 template <typename arg_type>\
428 class gmock_Impl : public ::testing::MatcherInterface<\
429 GTEST_REFERENCE_TO_CONST_(arg_type)> {\
431 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2)\
432 : p0(::std::move(gmock_p0)), p1(::std::move(gmock_p1)), \
433 p2(::std::move(gmock_p2)) {}\
434 virtual bool MatchAndExplain(\
435 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
436 ::testing::MatchResultListener* result_listener) const;\
437 virtual void DescribeTo(::std::ostream* gmock_os) const {\
438 *gmock_os << FormatDescription(false);\
440 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
441 *gmock_os << FormatDescription(true);\
447 ::std::string FormatDescription(bool negation) const {\
448 ::std::string gmock_description = (description);\
449 if (!gmock_description.empty()) {\
450 return gmock_description;\
452 return ::testing::internal::FormatMatcherDescription(\
454 ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
455 ::std::tuple<p0##_type, p1##_type, p2##_type>(p0, p1, p2)));\
458 template <typename arg_type>\
459 operator ::testing::Matcher<arg_type>() const {\
460 return ::testing::Matcher<arg_type>(\
461 new gmock_Impl<arg_type>(p0, p1, p2));\
463 name##MatcherP3(p0##_type gmock_p0, p1##_type gmock_p1, \
464 p2##_type gmock_p2) : p0(::std::move(gmock_p0)), \
465 p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)) {\
472 template <typename p0##_type, typename p1##_type, typename p2##_type>\
473 inline name##MatcherP3<p0##_type, p1##_type, p2##_type> name(p0##_type p0, \
474 p1##_type p1, p2##_type p2) {\
475 return name##MatcherP3<p0##_type, p1##_type, p2##_type>(p0, p1, p2);\
477 template <typename p0##_type, typename p1##_type, typename p2##_type>\
478 template <typename arg_type>\
479 bool name##MatcherP3<p0##_type, p1##_type, \
480 p2##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
481 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
482 ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
485 #define MATCHER_P4(name, p0, p1, p2, p3, description)\
486 template <typename p0##_type, typename p1##_type, typename p2##_type, \
488 class name##MatcherP4 {\
490 template <typename arg_type>\
491 class gmock_Impl : public ::testing::MatcherInterface<\
492 GTEST_REFERENCE_TO_CONST_(arg_type)> {\
494 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
496 : p0(::std::move(gmock_p0)), p1(::std::move(gmock_p1)), \
497 p2(::std::move(gmock_p2)), p3(::std::move(gmock_p3)) {}\
498 virtual bool MatchAndExplain(\
499 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
500 ::testing::MatchResultListener* result_listener) const;\
501 virtual void DescribeTo(::std::ostream* gmock_os) const {\
502 *gmock_os << FormatDescription(false);\
504 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
505 *gmock_os << FormatDescription(true);\
512 ::std::string FormatDescription(bool negation) const {\
513 ::std::string gmock_description = (description);\
514 if (!gmock_description.empty()) {\
515 return gmock_description;\
517 return ::testing::internal::FormatMatcherDescription(\
519 ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
520 ::std::tuple<p0##_type, p1##_type, p2##_type, p3##_type>(p0, \
524 template <typename arg_type>\
525 operator ::testing::Matcher<arg_type>() const {\
526 return ::testing::Matcher<arg_type>(\
527 new gmock_Impl<arg_type>(p0, p1, p2, p3));\
529 name##MatcherP4(p0##_type gmock_p0, p1##_type gmock_p1, \
530 p2##_type gmock_p2, p3##_type gmock_p3) : p0(::std::move(gmock_p0)), \
531 p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \
532 p3(::std::move(gmock_p3)) {\
540 template <typename p0##_type, typename p1##_type, typename p2##_type, \
542 inline name##MatcherP4<p0##_type, p1##_type, p2##_type, \
543 p3##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, \
545 return name##MatcherP4<p0##_type, p1##_type, p2##_type, p3##_type>(p0, \
548 template <typename p0##_type, typename p1##_type, typename p2##_type, \
550 template <typename arg_type>\
551 bool name##MatcherP4<p0##_type, p1##_type, p2##_type, \
552 p3##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
553 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
554 ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
557 #define MATCHER_P5(name, p0, p1, p2, p3, p4, description)\
558 template <typename p0##_type, typename p1##_type, typename p2##_type, \
559 typename p3##_type, typename p4##_type>\
560 class name##MatcherP5 {\
562 template <typename arg_type>\
563 class gmock_Impl : public ::testing::MatcherInterface<\
564 GTEST_REFERENCE_TO_CONST_(arg_type)> {\
566 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
567 p3##_type gmock_p3, p4##_type gmock_p4)\
568 : p0(::std::move(gmock_p0)), p1(::std::move(gmock_p1)), \
569 p2(::std::move(gmock_p2)), p3(::std::move(gmock_p3)), \
570 p4(::std::move(gmock_p4)) {}\
571 virtual bool MatchAndExplain(\
572 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
573 ::testing::MatchResultListener* result_listener) const;\
574 virtual void DescribeTo(::std::ostream* gmock_os) const {\
575 *gmock_os << FormatDescription(false);\
577 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
578 *gmock_os << FormatDescription(true);\
586 ::std::string FormatDescription(bool negation) const {\
587 ::std::string gmock_description = (description);\
588 if (!gmock_description.empty()) {\
589 return gmock_description;\
591 return ::testing::internal::FormatMatcherDescription(\
593 ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
594 ::std::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
595 p4##_type>(p0, p1, p2, p3, p4)));\
598 template <typename arg_type>\
599 operator ::testing::Matcher<arg_type>() const {\
600 return ::testing::Matcher<arg_type>(\
601 new gmock_Impl<arg_type>(p0, p1, p2, p3, p4));\
603 name##MatcherP5(p0##_type gmock_p0, p1##_type gmock_p1, \
604 p2##_type gmock_p2, p3##_type gmock_p3, \
605 p4##_type gmock_p4) : p0(::std::move(gmock_p0)), \
606 p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \
607 p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4)) {\
616 template <typename p0##_type, typename p1##_type, typename p2##_type, \
617 typename p3##_type, typename p4##_type>\
618 inline name##MatcherP5<p0##_type, p1##_type, p2##_type, p3##_type, \
619 p4##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
621 return name##MatcherP5<p0##_type, p1##_type, p2##_type, p3##_type, \
622 p4##_type>(p0, p1, p2, p3, p4);\
624 template <typename p0##_type, typename p1##_type, typename p2##_type, \
625 typename p3##_type, typename p4##_type>\
626 template <typename arg_type>\
627 bool name##MatcherP5<p0##_type, p1##_type, p2##_type, p3##_type, \
628 p4##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
629 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
630 ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
633 #define MATCHER_P6(name, p0, p1, p2, p3, p4, p5, description)\
634 template <typename p0##_type, typename p1##_type, typename p2##_type, \
635 typename p3##_type, typename p4##_type, typename p5##_type>\
636 class name##MatcherP6 {\
638 template <typename arg_type>\
639 class gmock_Impl : public ::testing::MatcherInterface<\
640 GTEST_REFERENCE_TO_CONST_(arg_type)> {\
642 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
643 p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5)\
644 : p0(::std::move(gmock_p0)), p1(::std::move(gmock_p1)), \
645 p2(::std::move(gmock_p2)), p3(::std::move(gmock_p3)), \
646 p4(::std::move(gmock_p4)), p5(::std::move(gmock_p5)) {}\
647 virtual bool MatchAndExplain(\
648 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
649 ::testing::MatchResultListener* result_listener) const;\
650 virtual void DescribeTo(::std::ostream* gmock_os) const {\
651 *gmock_os << FormatDescription(false);\
653 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
654 *gmock_os << FormatDescription(true);\
663 ::std::string FormatDescription(bool negation) const {\
664 ::std::string gmock_description = (description);\
665 if (!gmock_description.empty()) {\
666 return gmock_description;\
668 return ::testing::internal::FormatMatcherDescription(\
670 ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
671 ::std::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
672 p4##_type, p5##_type>(p0, p1, p2, p3, p4, p5)));\
675 template <typename arg_type>\
676 operator ::testing::Matcher<arg_type>() const {\
677 return ::testing::Matcher<arg_type>(\
678 new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5));\
680 name##MatcherP6(p0##_type gmock_p0, p1##_type gmock_p1, \
681 p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
682 p5##_type gmock_p5) : p0(::std::move(gmock_p0)), \
683 p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \
684 p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4)), \
685 p5(::std::move(gmock_p5)) {\
695 template <typename p0##_type, typename p1##_type, typename p2##_type, \
696 typename p3##_type, typename p4##_type, typename p5##_type>\
697 inline name##MatcherP6<p0##_type, p1##_type, p2##_type, p3##_type, \
698 p4##_type, p5##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, \
699 p3##_type p3, p4##_type p4, p5##_type p5) {\
700 return name##MatcherP6<p0##_type, p1##_type, p2##_type, p3##_type, \
701 p4##_type, p5##_type>(p0, p1, p2, p3, p4, p5);\
703 template <typename p0##_type, typename p1##_type, typename p2##_type, \
704 typename p3##_type, typename p4##_type, typename p5##_type>\
705 template <typename arg_type>\
706 bool name##MatcherP6<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
707 p5##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
708 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
709 ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
712 #define MATCHER_P7(name, p0, p1, p2, p3, p4, p5, p6, description)\
713 template <typename p0##_type, typename p1##_type, typename p2##_type, \
714 typename p3##_type, typename p4##_type, typename p5##_type, \
716 class name##MatcherP7 {\
718 template <typename arg_type>\
719 class gmock_Impl : public ::testing::MatcherInterface<\
720 GTEST_REFERENCE_TO_CONST_(arg_type)> {\
722 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
723 p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
725 : p0(::std::move(gmock_p0)), p1(::std::move(gmock_p1)), \
726 p2(::std::move(gmock_p2)), p3(::std::move(gmock_p3)), \
727 p4(::std::move(gmock_p4)), p5(::std::move(gmock_p5)), \
728 p6(::std::move(gmock_p6)) {}\
729 virtual bool MatchAndExplain(\
730 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
731 ::testing::MatchResultListener* result_listener) const;\
732 virtual void DescribeTo(::std::ostream* gmock_os) const {\
733 *gmock_os << FormatDescription(false);\
735 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
736 *gmock_os << FormatDescription(true);\
746 ::std::string FormatDescription(bool negation) const {\
747 ::std::string gmock_description = (description);\
748 if (!gmock_description.empty()) {\
749 return gmock_description;\
751 return ::testing::internal::FormatMatcherDescription(\
753 ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
754 ::std::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
755 p4##_type, p5##_type, p6##_type>(p0, p1, p2, p3, p4, p5, \
759 template <typename arg_type>\
760 operator ::testing::Matcher<arg_type>() const {\
761 return ::testing::Matcher<arg_type>(\
762 new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5, p6));\
764 name##MatcherP7(p0##_type gmock_p0, p1##_type gmock_p1, \
765 p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
766 p5##_type gmock_p5, p6##_type gmock_p6) : p0(::std::move(gmock_p0)), \
767 p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \
768 p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4)), \
769 p5(::std::move(gmock_p5)), p6(::std::move(gmock_p6)) {\
780 template <typename p0##_type, typename p1##_type, typename p2##_type, \
781 typename p3##_type, typename p4##_type, typename p5##_type, \
783 inline name##MatcherP7<p0##_type, p1##_type, p2##_type, p3##_type, \
784 p4##_type, p5##_type, p6##_type> name(p0##_type p0, p1##_type p1, \
785 p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \
787 return name##MatcherP7<p0##_type, p1##_type, p2##_type, p3##_type, \
788 p4##_type, p5##_type, p6##_type>(p0, p1, p2, p3, p4, p5, p6);\
790 template <typename p0##_type, typename p1##_type, typename p2##_type, \
791 typename p3##_type, typename p4##_type, typename p5##_type, \
793 template <typename arg_type>\
794 bool name##MatcherP7<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
795 p5##_type, p6##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
796 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
797 ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
800 #define MATCHER_P8(name, p0, p1, p2, p3, p4, p5, p6, p7, description)\
801 template <typename p0##_type, typename p1##_type, typename p2##_type, \
802 typename p3##_type, typename p4##_type, typename p5##_type, \
803 typename p6##_type, typename p7##_type>\
804 class name##MatcherP8 {\
806 template <typename arg_type>\
807 class gmock_Impl : public ::testing::MatcherInterface<\
808 GTEST_REFERENCE_TO_CONST_(arg_type)> {\
810 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
811 p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
812 p6##_type gmock_p6, p7##_type gmock_p7)\
813 : p0(::std::move(gmock_p0)), p1(::std::move(gmock_p1)), \
814 p2(::std::move(gmock_p2)), p3(::std::move(gmock_p3)), \
815 p4(::std::move(gmock_p4)), p5(::std::move(gmock_p5)), \
816 p6(::std::move(gmock_p6)), p7(::std::move(gmock_p7)) {}\
817 virtual bool MatchAndExplain(\
818 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
819 ::testing::MatchResultListener* result_listener) const;\
820 virtual void DescribeTo(::std::ostream* gmock_os) const {\
821 *gmock_os << FormatDescription(false);\
823 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
824 *gmock_os << FormatDescription(true);\
835 ::std::string FormatDescription(bool negation) const {\
836 ::std::string gmock_description = (description);\
837 if (!gmock_description.empty()) {\
838 return gmock_description;\
840 return ::testing::internal::FormatMatcherDescription(\
842 ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
843 ::std::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
844 p4##_type, p5##_type, p6##_type, p7##_type>(p0, p1, p2, \
845 p3, p4, p5, p6, p7)));\
848 template <typename arg_type>\
849 operator ::testing::Matcher<arg_type>() const {\
850 return ::testing::Matcher<arg_type>(\
851 new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5, p6, p7));\
853 name##MatcherP8(p0##_type gmock_p0, p1##_type gmock_p1, \
854 p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
855 p5##_type gmock_p5, p6##_type gmock_p6, \
856 p7##_type gmock_p7) : p0(::std::move(gmock_p0)), \
857 p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \
858 p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4)), \
859 p5(::std::move(gmock_p5)), p6(::std::move(gmock_p6)), \
860 p7(::std::move(gmock_p7)) {\
872 template <typename p0##_type, typename p1##_type, typename p2##_type, \
873 typename p3##_type, typename p4##_type, typename p5##_type, \
874 typename p6##_type, typename p7##_type>\
875 inline name##MatcherP8<p0##_type, p1##_type, p2##_type, p3##_type, \
876 p4##_type, p5##_type, p6##_type, p7##_type> name(p0##_type p0, \
877 p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \
878 p6##_type p6, p7##_type p7) {\
879 return name##MatcherP8<p0##_type, p1##_type, p2##_type, p3##_type, \
880 p4##_type, p5##_type, p6##_type, p7##_type>(p0, p1, p2, p3, p4, p5, \
883 template <typename p0##_type, typename p1##_type, typename p2##_type, \
884 typename p3##_type, typename p4##_type, typename p5##_type, \
885 typename p6##_type, typename p7##_type>\
886 template <typename arg_type>\
887 bool name##MatcherP8<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
888 p5##_type, p6##_type, \
889 p7##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
890 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
891 ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
894 #define MATCHER_P9(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, description)\
895 template <typename p0##_type, typename p1##_type, typename p2##_type, \
896 typename p3##_type, typename p4##_type, typename p5##_type, \
897 typename p6##_type, typename p7##_type, typename p8##_type>\
898 class name##MatcherP9 {\
900 template <typename arg_type>\
901 class gmock_Impl : public ::testing::MatcherInterface<\
902 GTEST_REFERENCE_TO_CONST_(arg_type)> {\
904 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
905 p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
906 p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8)\
907 : p0(::std::move(gmock_p0)), p1(::std::move(gmock_p1)), \
908 p2(::std::move(gmock_p2)), p3(::std::move(gmock_p3)), \
909 p4(::std::move(gmock_p4)), p5(::std::move(gmock_p5)), \
910 p6(::std::move(gmock_p6)), p7(::std::move(gmock_p7)), \
911 p8(::std::move(gmock_p8)) {}\
912 virtual bool MatchAndExplain(\
913 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
914 ::testing::MatchResultListener* result_listener) const;\
915 virtual void DescribeTo(::std::ostream* gmock_os) const {\
916 *gmock_os << FormatDescription(false);\
918 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
919 *gmock_os << FormatDescription(true);\
931 ::std::string FormatDescription(bool negation) const {\
932 ::std::string gmock_description = (description);\
933 if (!gmock_description.empty()) {\
934 return gmock_description;\
936 return ::testing::internal::FormatMatcherDescription(\
938 ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
939 ::std::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
940 p4##_type, p5##_type, p6##_type, p7##_type, \
941 p8##_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8)));\
944 template <typename arg_type>\
945 operator ::testing::Matcher<arg_type>() const {\
946 return ::testing::Matcher<arg_type>(\
947 new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8));\
949 name##MatcherP9(p0##_type gmock_p0, p1##_type gmock_p1, \
950 p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
951 p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \
952 p8##_type gmock_p8) : p0(::std::move(gmock_p0)), \
953 p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \
954 p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4)), \
955 p5(::std::move(gmock_p5)), p6(::std::move(gmock_p6)), \
956 p7(::std::move(gmock_p7)), p8(::std::move(gmock_p8)) {\
969 template <typename p0##_type, typename p1##_type, typename p2##_type, \
970 typename p3##_type, typename p4##_type, typename p5##_type, \
971 typename p6##_type, typename p7##_type, typename p8##_type>\
972 inline name##MatcherP9<p0##_type, p1##_type, p2##_type, p3##_type, \
973 p4##_type, p5##_type, p6##_type, p7##_type, \
974 p8##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
975 p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, \
977 return name##MatcherP9<p0##_type, p1##_type, p2##_type, p3##_type, \
978 p4##_type, p5##_type, p6##_type, p7##_type, p8##_type>(p0, p1, p2, \
979 p3, p4, p5, p6, p7, p8);\
981 template <typename p0##_type, typename p1##_type, typename p2##_type, \
982 typename p3##_type, typename p4##_type, typename p5##_type, \
983 typename p6##_type, typename p7##_type, typename p8##_type>\
984 template <typename arg_type>\
985 bool name##MatcherP9<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
986 p5##_type, p6##_type, p7##_type, \
987 p8##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
988 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
989 ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
992 #define MATCHER_P10(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, description)\
993 template <typename p0##_type, typename p1##_type, typename p2##_type, \
994 typename p3##_type, typename p4##_type, typename p5##_type, \
995 typename p6##_type, typename p7##_type, typename p8##_type, \
997 class name##MatcherP10 {\
999 template <typename arg_type>\
1000 class gmock_Impl : public ::testing::MatcherInterface<\
1001 GTEST_REFERENCE_TO_CONST_(arg_type)> {\
1003 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
1004 p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
1005 p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8, \
1006 p9##_type gmock_p9)\
1007 : p0(::std::move(gmock_p0)), p1(::std::move(gmock_p1)), \
1008 p2(::std::move(gmock_p2)), p3(::std::move(gmock_p3)), \
1009 p4(::std::move(gmock_p4)), p5(::std::move(gmock_p5)), \
1010 p6(::std::move(gmock_p6)), p7(::std::move(gmock_p7)), \
1011 p8(::std::move(gmock_p8)), p9(::std::move(gmock_p9)) {}\
1012 virtual bool MatchAndExplain(\
1013 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1014 ::testing::MatchResultListener* result_listener) const;\
1015 virtual void DescribeTo(::std::ostream* gmock_os) const {\
1016 *gmock_os << FormatDescription(false);\
1018 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
1019 *gmock_os << FormatDescription(true);\
1021 p0##_type const p0;\
1022 p1##_type const p1;\
1023 p2##_type const p2;\
1024 p3##_type const p3;\
1025 p4##_type const p4;\
1026 p5##_type const p5;\
1027 p6##_type const p6;\
1028 p7##_type const p7;\
1029 p8##_type const p8;\
1030 p9##_type const p9;\
1032 ::std::string FormatDescription(bool negation) const {\
1033 ::std::string gmock_description = (description);\
1034 if (!gmock_description.empty()) {\
1035 return gmock_description;\
1037 return ::testing::internal::FormatMatcherDescription(\
1039 ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
1040 ::std::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
1041 p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, \
1042 p9##_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)));\
1045 template <typename arg_type>\
1046 operator ::testing::Matcher<arg_type>() const {\
1047 return ::testing::Matcher<arg_type>(\
1048 new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9));\
1050 name##MatcherP10(p0##_type gmock_p0, p1##_type gmock_p1, \
1051 p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
1052 p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \
1053 p8##_type gmock_p8, p9##_type gmock_p9) : p0(::std::move(gmock_p0)), \
1054 p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \
1055 p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4)), \
1056 p5(::std::move(gmock_p5)), p6(::std::move(gmock_p6)), \
1057 p7(::std::move(gmock_p7)), p8(::std::move(gmock_p8)), \
1058 p9(::std::move(gmock_p9)) {\
1060 p0##_type const p0;\
1061 p1##_type const p1;\
1062 p2##_type const p2;\
1063 p3##_type const p3;\
1064 p4##_type const p4;\
1065 p5##_type const p5;\
1066 p6##_type const p6;\
1067 p7##_type const p7;\
1068 p8##_type const p8;\
1069 p9##_type const p9;\
1072 template <typename p0##_type, typename p1##_type, typename p2##_type, \
1073 typename p3##_type, typename p4##_type, typename p5##_type, \
1074 typename p6##_type, typename p7##_type, typename p8##_type, \
1075 typename p9##_type>\
1076 inline name##MatcherP10<p0##_type, p1##_type, p2##_type, p3##_type, \
1077 p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, \
1078 p9##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
1079 p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8, \
1081 return name##MatcherP10<p0##_type, p1##_type, p2##_type, p3##_type, \
1082 p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, p9##_type>(p0, \
1083 p1, p2, p3, p4, p5, p6, p7, p8, p9);\
1085 template <typename p0##_type, typename p1##_type, typename p2##_type, \
1086 typename p3##_type, typename p4##_type, typename p5##_type, \
1087 typename p6##_type, typename p7##_type, typename p8##_type, \
1088 typename p9##_type>\
1089 template <typename arg_type>\
1090 bool name##MatcherP10<p0##_type, p1##_type, p2##_type, p3##_type, \
1091 p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, \
1092 p9##_type>::gmock_Impl<arg_type>::MatchAndExplain(\
1093 GTEST_REFERENCE_TO_CONST_(arg_type) arg,\
1094 ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\
1097 #endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_
grpc
Author(s):
autogenerated on Fri May 16 2025 02:58:30