38 #ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_ 39 #define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_ 45 #include "gmock/gmock-matchers.h" 51 #define GMOCK_FIELD_TYPE_(Tuple, i) \ 52 typename ::testing::tuple_element<i, Tuple>::type 65 template <
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,
71 template <
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));
89 template <
class Tuple>
90 class TupleFields<Tuple, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1> {
92 typedef ::testing::tuple<>
type;
98 template <
class Tuple,
int k0>
99 class TupleFields<Tuple, k0, -1, -1, -1, -1, -1, -1, -1, -1, -1> {
101 typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0)>
type;
103 return type(get<k0>(t));
107 template <
class Tuple,
int k0,
int k1>
108 class TupleFields<Tuple, k0, k1, -1, -1, -1, -1, -1, -1, -1, -1> {
113 return type(get<k0>(t), get<k1>(t));
117 template <
class Tuple,
int k0,
int k1,
int k2>
118 class TupleFields<Tuple, k0, k1, k2, -1, -1, -1, -1, -1, -1, -1> {
123 return type(get<k0>(t), get<k1>(t), get<k2>(t));
127 template <
class Tuple,
int k0,
int k1,
int k2,
int k3>
128 class 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));
138 template <
class Tuple,
int k0,
int k1,
int k2,
int k3,
int k4>
139 class 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));
149 template <
class Tuple,
int k0,
int k1,
int k2,
int k3,
int k4,
int k5>
150 class 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),
162 template <
class Tuple,
int k0,
int k1,
int k2,
int k3,
int k4,
int k5,
int k6>
163 class 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));
175 template <
class Tuple,
int k0,
int k1,
int k2,
int k3,
int k4,
int k5,
int k6,
177 class 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));
190 template <
class Tuple,
int k0,
int k1,
int k2,
int k3,
int k4,
int k5,
int k6,
192 class 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_ 208 template <
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());
233 const bool match = inner_matcher_.MatchAndExplain(selected_args,
240 *os <<
"are a tuple ";
242 inner_matcher_.DescribeTo(os);
246 *os <<
"are a tuple ";
248 inner_matcher_.DescribeNegationTo(os);
253 return TupleFields<RawArgsTuple, k0, k1, k2, k3, k4, k5, k6, k7, k8,
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];
273 const MonomorphicInnerMatcher inner_matcher_;
278 template <
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_;
304 template <
typename M1>
309 template <
typename M1,
typename M2>
317 template <
typename M1,
typename M2,
typename M3>
325 template <
typename M1,
typename M2,
typename M3,
typename M4>
333 template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5>
341 template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
350 template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
351 typename M6,
typename M7>
359 template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
360 typename M6,
typename M7,
typename M8>
368 template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
369 typename M6,
typename M7,
typename M8,
typename M9>
377 template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
378 typename M6,
typename M7,
typename M8,
typename M9,
typename M10>
392 template <
typename M1>
397 template <
typename M1,
typename M2>
405 template <
typename M1,
typename M2,
typename M3>
413 template <
typename M1,
typename M2,
typename M3,
typename M4>
421 template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5>
429 template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
438 template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
439 typename M6,
typename M7>
447 template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
448 typename M6,
typename M7,
typename M8>
456 template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
457 typename M6,
typename M7,
typename M8,
typename M9>
465 template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
466 typename M6,
typename M7,
typename M8,
typename M9,
typename M10>
479 template <
typename InnerMatcher>
481 Args(
const InnerMatcher& matcher) {
485 template <
int k1,
typename InnerMatcher>
487 Args(
const InnerMatcher& matcher) {
491 template <
int k1,
int k2,
typename InnerMatcher>
493 Args(
const InnerMatcher& matcher) {
497 template <
int k1,
int k2,
int k3,
typename InnerMatcher>
499 Args(
const InnerMatcher& matcher) {
503 template <
int k1,
int k2,
int k3,
int k4,
typename InnerMatcher>
505 Args(
const InnerMatcher& matcher) {
509 template <
int k1,
int k2,
int k3,
int k4,
int k5,
typename InnerMatcher>
511 Args(
const InnerMatcher& matcher) {
515 template <
int k1,
int k2,
int k3,
int k4,
int k5,
int k6,
typename InnerMatcher>
517 Args(
const InnerMatcher& matcher) {
521 template <
int k1,
int k2,
int k3,
int k4,
int k5,
int k6,
int k7,
522 typename InnerMatcher>
524 Args(
const InnerMatcher& matcher) {
529 template <
int k1,
int k2,
int k3,
int k4,
int k5,
int k6,
int k7,
int k8,
530 typename InnerMatcher>
532 Args(
const InnerMatcher& matcher) {
537 template <
int k1,
int k2,
int k3,
int k4,
int k5,
int k6,
int k7,
int k8,
538 int k9,
typename InnerMatcher>
540 Args(
const InnerMatcher& matcher) {
545 template <
int k1,
int k2,
int k3,
int k4,
int k5,
int k6,
int k7,
int k8,
546 int k9,
int k10,
typename InnerMatcher>
547 inline internal::ArgsMatcher<InnerMatcher, k1, k2, k3, k4, k5, k6, k7, k8, k9,
549 Args(
const InnerMatcher& matcher) {
571 typedef ::testing::tuple<>
Args;
575 template <
typename T1>
580 typedef ::testing::tuple<
585 template <
typename T1,
typename T2>
591 typedef ::testing::tuple<
592 typename internal::DecayArray<T1>::type,
597 template <
typename T1,
typename T2,
typename T3>
600 typename internal::DecayArray<T1>::type,
604 typedef ::testing::tuple<
605 typename internal::DecayArray<T1>::type,
606 typename internal::DecayArray<T2>::type,
611 template <
typename T1,
typename T2,
typename T3,
typename T4>
614 typename internal::DecayArray<T1>::type,
615 typename internal::DecayArray<T2>::type,
619 typedef ::testing::tuple<
620 typename internal::DecayArray<T1>::type,
621 typename internal::DecayArray<T2>::type,
622 typename internal::DecayArray<T3>::type,
627 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
630 typename internal::DecayArray<T1>::type,
631 typename internal::DecayArray<T2>::type,
632 typename internal::DecayArray<T3>::type,
637 typedef ::testing::tuple<
638 typename internal::DecayArray<T1>::type,
639 typename internal::DecayArray<T2>::type,
640 typename internal::DecayArray<T3>::type,
641 typename internal::DecayArray<T4>::type,
646 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
650 typename internal::DecayArray<T1>::type,
651 typename internal::DecayArray<T2>::type,
652 typename internal::DecayArray<T3>::type,
653 typename internal::DecayArray<T4>::type,
656 ElementsAre(
const T1& e1,
const T2& e2,
const T3& e3,
const T4& e4,
657 const T5& e5,
const T6& e6) {
658 typedef ::testing::tuple<
659 typename internal::DecayArray<T1>::type,
660 typename internal::DecayArray<T2>::type,
661 typename internal::DecayArray<T3>::type,
662 typename internal::DecayArray<T4>::type,
663 typename internal::DecayArray<T5>::type,
668 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
669 typename T6,
typename T7>
672 typename internal::DecayArray<T1>::type,
673 typename internal::DecayArray<T2>::type,
674 typename internal::DecayArray<T3>::type,
675 typename internal::DecayArray<T4>::type,
676 typename internal::DecayArray<T5>::type,
679 ElementsAre(
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<
682 typename internal::DecayArray<T1>::type,
683 typename internal::DecayArray<T2>::type,
684 typename internal::DecayArray<T3>::type,
685 typename internal::DecayArray<T4>::type,
686 typename internal::DecayArray<T5>::type,
687 typename internal::DecayArray<T6>::type,
692 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
693 typename T6,
typename T7,
typename T8>
696 typename internal::DecayArray<T1>::type,
697 typename internal::DecayArray<T2>::type,
698 typename internal::DecayArray<T3>::type,
699 typename internal::DecayArray<T4>::type,
700 typename internal::DecayArray<T5>::type,
701 typename internal::DecayArray<T6>::type,
704 ElementsAre(
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<
707 typename internal::DecayArray<T1>::type,
708 typename internal::DecayArray<T2>::type,
709 typename internal::DecayArray<T3>::type,
710 typename internal::DecayArray<T4>::type,
711 typename internal::DecayArray<T5>::type,
712 typename internal::DecayArray<T6>::type,
713 typename internal::DecayArray<T7>::type,
719 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
720 typename T6,
typename T7,
typename T8,
typename T9>
723 typename internal::DecayArray<T1>::type,
724 typename internal::DecayArray<T2>::type,
725 typename internal::DecayArray<T3>::type,
726 typename internal::DecayArray<T4>::type,
727 typename internal::DecayArray<T5>::type,
728 typename internal::DecayArray<T6>::type,
729 typename internal::DecayArray<T7>::type,
732 ElementsAre(
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<
735 typename internal::DecayArray<T1>::type,
736 typename internal::DecayArray<T2>::type,
737 typename internal::DecayArray<T3>::type,
738 typename internal::DecayArray<T4>::type,
739 typename internal::DecayArray<T5>::type,
740 typename internal::DecayArray<T6>::type,
741 typename internal::DecayArray<T7>::type,
742 typename internal::DecayArray<T8>::type,
748 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
749 typename T6,
typename T7,
typename T8,
typename T9,
typename T10>
752 typename internal::DecayArray<T1>::type,
753 typename internal::DecayArray<T2>::type,
754 typename internal::DecayArray<T3>::type,
755 typename internal::DecayArray<T4>::type,
756 typename internal::DecayArray<T5>::type,
757 typename internal::DecayArray<T6>::type,
758 typename internal::DecayArray<T7>::type,
759 typename internal::DecayArray<T8>::type,
762 ElementsAre(
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<
766 typename internal::DecayArray<T1>::type,
767 typename internal::DecayArray<T2>::type,
768 typename internal::DecayArray<T3>::type,
769 typename internal::DecayArray<T4>::type,
770 typename internal::DecayArray<T5>::type,
771 typename internal::DecayArray<T6>::type,
772 typename internal::DecayArray<T7>::type,
773 typename internal::DecayArray<T8>::type,
774 typename internal::DecayArray<T9>::type,
786 typedef ::testing::tuple<>
Args;
790 template <
typename T1>
793 typename internal::DecayArray<T1>::type> >
795 typedef ::testing::tuple<
796 typename internal::DecayArray<T1>::type>
Args;
800 template <
typename T1,
typename T2>
803 typename internal::DecayArray<T1>::type,
804 typename internal::DecayArray<T2>::type> >
806 typedef ::testing::tuple<
807 typename internal::DecayArray<T1>::type,
808 typename internal::DecayArray<T2>::type>
Args;
812 template <
typename T1,
typename T2,
typename T3>
815 typename internal::DecayArray<T1>::type,
816 typename internal::DecayArray<T2>::type,
817 typename internal::DecayArray<T3>::type> >
819 typedef ::testing::tuple<
820 typename internal::DecayArray<T1>::type,
821 typename internal::DecayArray<T2>::type,
822 typename internal::DecayArray<T3>::type>
Args;
826 template <
typename T1,
typename T2,
typename T3,
typename T4>
829 typename internal::DecayArray<T1>::type,
830 typename internal::DecayArray<T2>::type,
831 typename internal::DecayArray<T3>::type,
832 typename internal::DecayArray<T4>::type> >
834 typedef ::testing::tuple<
835 typename internal::DecayArray<T1>::type,
836 typename internal::DecayArray<T2>::type,
837 typename internal::DecayArray<T3>::type,
838 typename internal::DecayArray<T4>::type>
Args;
842 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
845 typename internal::DecayArray<T1>::type,
846 typename internal::DecayArray<T2>::type,
847 typename internal::DecayArray<T3>::type,
848 typename internal::DecayArray<T4>::type,
849 typename internal::DecayArray<T5>::type> >
852 typedef ::testing::tuple<
853 typename internal::DecayArray<T1>::type,
854 typename internal::DecayArray<T2>::type,
855 typename internal::DecayArray<T3>::type,
856 typename internal::DecayArray<T4>::type,
857 typename internal::DecayArray<T5>::type>
Args;
861 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
865 typename internal::DecayArray<T1>::type,
866 typename internal::DecayArray<T2>::type,
867 typename internal::DecayArray<T3>::type,
868 typename internal::DecayArray<T4>::type,
869 typename internal::DecayArray<T5>::type,
870 typename internal::DecayArray<T6>::type> >
872 const T5& e5,
const T6& e6) {
873 typedef ::testing::tuple<
874 typename internal::DecayArray<T1>::type,
875 typename internal::DecayArray<T2>::type,
876 typename internal::DecayArray<T3>::type,
877 typename internal::DecayArray<T4>::type,
878 typename internal::DecayArray<T5>::type,
879 typename internal::DecayArray<T6>::type>
Args;
884 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
885 typename T6,
typename T7>
888 typename internal::DecayArray<T1>::type,
889 typename internal::DecayArray<T2>::type,
890 typename internal::DecayArray<T3>::type,
891 typename internal::DecayArray<T4>::type,
892 typename internal::DecayArray<T5>::type,
893 typename internal::DecayArray<T6>::type,
894 typename internal::DecayArray<T7>::type> >
896 const T5& e5,
const T6& e6,
const T7& e7) {
897 typedef ::testing::tuple<
898 typename internal::DecayArray<T1>::type,
899 typename internal::DecayArray<T2>::type,
900 typename internal::DecayArray<T3>::type,
901 typename internal::DecayArray<T4>::type,
902 typename internal::DecayArray<T5>::type,
903 typename internal::DecayArray<T6>::type,
904 typename internal::DecayArray<T7>::type>
Args;
909 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
910 typename T6,
typename T7,
typename T8>
913 typename internal::DecayArray<T1>::type,
914 typename internal::DecayArray<T2>::type,
915 typename internal::DecayArray<T3>::type,
916 typename internal::DecayArray<T4>::type,
917 typename internal::DecayArray<T5>::type,
918 typename internal::DecayArray<T6>::type,
919 typename internal::DecayArray<T7>::type,
920 typename internal::DecayArray<T8>::type> >
922 const T5& e5,
const T6& e6,
const T7& e7,
const T8& e8) {
923 typedef ::testing::tuple<
924 typename internal::DecayArray<T1>::type,
925 typename internal::DecayArray<T2>::type,
926 typename internal::DecayArray<T3>::type,
927 typename internal::DecayArray<T4>::type,
928 typename internal::DecayArray<T5>::type,
929 typename internal::DecayArray<T6>::type,
930 typename internal::DecayArray<T7>::type,
931 typename internal::DecayArray<T8>::type>
Args;
936 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
937 typename T6,
typename T7,
typename T8,
typename T9>
940 typename internal::DecayArray<T1>::type,
941 typename internal::DecayArray<T2>::type,
942 typename internal::DecayArray<T3>::type,
943 typename internal::DecayArray<T4>::type,
944 typename internal::DecayArray<T5>::type,
945 typename internal::DecayArray<T6>::type,
946 typename internal::DecayArray<T7>::type,
947 typename internal::DecayArray<T8>::type,
948 typename internal::DecayArray<T9>::type> >
950 const T5& e5,
const T6& e6,
const T7& e7,
const T8& e8,
const T9& e9) {
951 typedef ::testing::tuple<
952 typename internal::DecayArray<T1>::type,
953 typename internal::DecayArray<T2>::type,
954 typename internal::DecayArray<T3>::type,
955 typename internal::DecayArray<T4>::type,
956 typename internal::DecayArray<T5>::type,
957 typename internal::DecayArray<T6>::type,
958 typename internal::DecayArray<T7>::type,
959 typename internal::DecayArray<T8>::type,
960 typename internal::DecayArray<T9>::type>
Args;
965 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
966 typename T6,
typename T7,
typename T8,
typename T9,
typename T10>
969 typename internal::DecayArray<T1>::type,
970 typename internal::DecayArray<T2>::type,
971 typename internal::DecayArray<T3>::type,
972 typename internal::DecayArray<T4>::type,
973 typename internal::DecayArray<T5>::type,
974 typename internal::DecayArray<T6>::type,
975 typename internal::DecayArray<T7>::type,
976 typename internal::DecayArray<T8>::type,
977 typename internal::DecayArray<T9>::type,
980 const T5& e5,
const T6& e6,
const T7& e7,
const T8& e8,
const T9& e9,
982 typedef ::testing::tuple<
983 typename internal::DecayArray<T1>::type,
984 typename internal::DecayArray<T2>::type,
985 typename internal::DecayArray<T3>::type,
986 typename internal::DecayArray<T4>::type,
987 typename internal::DecayArray<T5>::type,
988 typename internal::DecayArray<T6>::type,
989 typename internal::DecayArray<T7>::type,
990 typename internal::DecayArray<T8>::type,
991 typename internal::DecayArray<T9>::type,
994 e6, e7, e8, e9, e10));
1000 template <
typename M1,
typename M2>
1002 AllOf(M1 m1, M2 m2) {
1008 template <
typename M1,
typename M2,
typename M3>
1010 AllOf(M1 m1, M2 m2, M3 m3) {
1016 template <
typename M1,
typename M2,
typename M3,
typename M4>
1018 AllOf(M1 m1, M2 m2, M3 m3, M4 m4) {
1024 template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5>
1026 AllOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5) {
1032 template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
1035 AllOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6) {
1041 template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
1042 typename M6,
typename M7>
1044 AllOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7) {
1050 template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
1051 typename M6,
typename M7,
typename M8>
1053 AllOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8) {
1059 template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
1060 typename M6,
typename M7,
typename M8,
typename M9>
1062 AllOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9) {
1069 template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
1070 typename M6,
typename M7,
typename M8,
typename M9,
typename M10>
1073 AllOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1083 template <
typename M1,
typename M2>
1085 AnyOf(M1 m1, M2 m2) {
1091 template <
typename M1,
typename M2,
typename M3>
1093 AnyOf(M1 m1, M2 m2, M3 m3) {
1099 template <
typename M1,
typename M2,
typename M3,
typename M4>
1101 AnyOf(M1 m1, M2 m2, M3 m3, M4 m4) {
1107 template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5>
1109 AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5) {
1115 template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
1118 AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6) {
1124 template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
1125 typename M6,
typename M7>
1127 AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7) {
1133 template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
1134 typename M6,
typename M7,
typename M8>
1136 AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8) {
1142 template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
1143 typename M6,
typename M7,
typename M8,
typename M9>
1145 AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9) {
1152 template <
typename M1,
typename M2,
typename M3,
typename M4,
typename M5,
1153 typename M6,
typename M7,
typename M8,
typename M9,
typename M10>
1156 AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
1381 #define MATCHER(name, description)\ 1382 class name##Matcher {\ 1384 template <typename arg_type>\ 1385 class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\ 1389 virtual bool MatchAndExplain(\ 1390 arg_type arg, ::testing::MatchResultListener* result_listener) const;\ 1391 virtual void DescribeTo(::std::ostream* gmock_os) const {\ 1392 *gmock_os << FormatDescription(false);\ 1394 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\ 1395 *gmock_os << FormatDescription(true);\ 1398 ::testing::internal::string FormatDescription(bool negation) const {\ 1399 const ::testing::internal::string gmock_description = (description);\ 1400 if (!gmock_description.empty())\ 1401 return gmock_description;\ 1402 return ::testing::internal::FormatMatcherDescription(\ 1404 ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ 1405 ::testing::tuple<>()));\ 1407 GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ 1409 template <typename arg_type>\ 1410 operator ::testing::Matcher<arg_type>() const {\ 1411 return ::testing::Matcher<arg_type>(\ 1412 new gmock_Impl<arg_type>());\ 1417 GTEST_DISALLOW_ASSIGN_(name##Matcher);\ 1419 inline name##Matcher name() {\ 1420 return name##Matcher();\ 1422 template <typename arg_type>\ 1423 bool name##Matcher::gmock_Impl<arg_type>::MatchAndExplain(\ 1425 ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\ 1428 #define MATCHER_P(name, p0, description)\ 1429 template <typename p0##_type>\ 1430 class name##MatcherP {\ 1432 template <typename arg_type>\ 1433 class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\ 1435 explicit gmock_Impl(p0##_type gmock_p0)\ 1437 virtual bool MatchAndExplain(\ 1438 arg_type arg, ::testing::MatchResultListener* result_listener) const;\ 1439 virtual void DescribeTo(::std::ostream* gmock_os) const {\ 1440 *gmock_os << FormatDescription(false);\ 1442 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\ 1443 *gmock_os << FormatDescription(true);\ 1447 ::testing::internal::string FormatDescription(bool negation) const {\ 1448 const ::testing::internal::string gmock_description = (description);\ 1449 if (!gmock_description.empty())\ 1450 return gmock_description;\ 1451 return ::testing::internal::FormatMatcherDescription(\ 1453 ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ 1454 ::testing::tuple<p0##_type>(p0)));\ 1456 GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ 1458 template <typename arg_type>\ 1459 operator ::testing::Matcher<arg_type>() const {\ 1460 return ::testing::Matcher<arg_type>(\ 1461 new gmock_Impl<arg_type>(p0));\ 1463 explicit name##MatcherP(p0##_type gmock_p0) : p0(gmock_p0) {\ 1467 GTEST_DISALLOW_ASSIGN_(name##MatcherP);\ 1469 template <typename p0##_type>\ 1470 inline name##MatcherP<p0##_type> name(p0##_type p0) {\ 1471 return name##MatcherP<p0##_type>(p0);\ 1473 template <typename p0##_type>\ 1474 template <typename arg_type>\ 1475 bool name##MatcherP<p0##_type>::gmock_Impl<arg_type>::MatchAndExplain(\ 1477 ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\ 1480 #define MATCHER_P2(name, p0, p1, description)\ 1481 template <typename p0##_type, typename p1##_type>\ 1482 class name##MatcherP2 {\ 1484 template <typename arg_type>\ 1485 class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\ 1487 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1)\ 1488 : p0(gmock_p0), p1(gmock_p1) {}\ 1489 virtual bool MatchAndExplain(\ 1490 arg_type arg, ::testing::MatchResultListener* result_listener) const;\ 1491 virtual void DescribeTo(::std::ostream* gmock_os) const {\ 1492 *gmock_os << FormatDescription(false);\ 1494 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\ 1495 *gmock_os << FormatDescription(true);\ 1500 ::testing::internal::string FormatDescription(bool negation) const {\ 1501 const ::testing::internal::string gmock_description = (description);\ 1502 if (!gmock_description.empty())\ 1503 return gmock_description;\ 1504 return ::testing::internal::FormatMatcherDescription(\ 1506 ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ 1507 ::testing::tuple<p0##_type, p1##_type>(p0, p1)));\ 1509 GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ 1511 template <typename arg_type>\ 1512 operator ::testing::Matcher<arg_type>() const {\ 1513 return ::testing::Matcher<arg_type>(\ 1514 new gmock_Impl<arg_type>(p0, p1));\ 1516 name##MatcherP2(p0##_type gmock_p0, p1##_type gmock_p1) : p0(gmock_p0), \ 1522 GTEST_DISALLOW_ASSIGN_(name##MatcherP2);\ 1524 template <typename p0##_type, typename p1##_type>\ 1525 inline name##MatcherP2<p0##_type, p1##_type> name(p0##_type p0, \ 1527 return name##MatcherP2<p0##_type, p1##_type>(p0, p1);\ 1529 template <typename p0##_type, typename p1##_type>\ 1530 template <typename arg_type>\ 1531 bool name##MatcherP2<p0##_type, \ 1532 p1##_type>::gmock_Impl<arg_type>::MatchAndExplain(\ 1534 ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\ 1537 #define MATCHER_P3(name, p0, p1, p2, description)\ 1538 template <typename p0##_type, typename p1##_type, typename p2##_type>\ 1539 class name##MatcherP3 {\ 1541 template <typename arg_type>\ 1542 class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\ 1544 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2)\ 1545 : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2) {}\ 1546 virtual bool MatchAndExplain(\ 1547 arg_type arg, ::testing::MatchResultListener* result_listener) const;\ 1548 virtual void DescribeTo(::std::ostream* gmock_os) const {\ 1549 *gmock_os << FormatDescription(false);\ 1551 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\ 1552 *gmock_os << FormatDescription(true);\ 1558 ::testing::internal::string FormatDescription(bool negation) const {\ 1559 const ::testing::internal::string gmock_description = (description);\ 1560 if (!gmock_description.empty())\ 1561 return gmock_description;\ 1562 return ::testing::internal::FormatMatcherDescription(\ 1564 ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ 1565 ::testing::tuple<p0##_type, p1##_type, p2##_type>(p0, p1, \ 1568 GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ 1570 template <typename arg_type>\ 1571 operator ::testing::Matcher<arg_type>() const {\ 1572 return ::testing::Matcher<arg_type>(\ 1573 new gmock_Impl<arg_type>(p0, p1, p2));\ 1575 name##MatcherP3(p0##_type gmock_p0, p1##_type gmock_p1, \ 1576 p2##_type gmock_p2) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2) {\ 1582 GTEST_DISALLOW_ASSIGN_(name##MatcherP3);\ 1584 template <typename p0##_type, typename p1##_type, typename p2##_type>\ 1585 inline name##MatcherP3<p0##_type, p1##_type, p2##_type> name(p0##_type p0, \ 1586 p1##_type p1, p2##_type p2) {\ 1587 return name##MatcherP3<p0##_type, p1##_type, p2##_type>(p0, p1, p2);\ 1589 template <typename p0##_type, typename p1##_type, typename p2##_type>\ 1590 template <typename arg_type>\ 1591 bool name##MatcherP3<p0##_type, p1##_type, \ 1592 p2##_type>::gmock_Impl<arg_type>::MatchAndExplain(\ 1594 ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\ 1597 #define MATCHER_P4(name, p0, p1, p2, p3, description)\ 1598 template <typename p0##_type, typename p1##_type, typename p2##_type, \ 1599 typename p3##_type>\ 1600 class name##MatcherP4 {\ 1602 template <typename arg_type>\ 1603 class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\ 1605 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ 1606 p3##_type gmock_p3)\ 1607 : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3) {}\ 1608 virtual bool MatchAndExplain(\ 1609 arg_type arg, ::testing::MatchResultListener* result_listener) const;\ 1610 virtual void DescribeTo(::std::ostream* gmock_os) const {\ 1611 *gmock_os << FormatDescription(false);\ 1613 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\ 1614 *gmock_os << FormatDescription(true);\ 1621 ::testing::internal::string FormatDescription(bool negation) const {\ 1622 const ::testing::internal::string gmock_description = (description);\ 1623 if (!gmock_description.empty())\ 1624 return gmock_description;\ 1625 return ::testing::internal::FormatMatcherDescription(\ 1627 ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ 1628 ::testing::tuple<p0##_type, p1##_type, p2##_type, \ 1629 p3##_type>(p0, p1, p2, p3)));\ 1631 GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ 1633 template <typename arg_type>\ 1634 operator ::testing::Matcher<arg_type>() const {\ 1635 return ::testing::Matcher<arg_type>(\ 1636 new gmock_Impl<arg_type>(p0, p1, p2, p3));\ 1638 name##MatcherP4(p0##_type gmock_p0, p1##_type gmock_p1, \ 1639 p2##_type gmock_p2, p3##_type gmock_p3) : p0(gmock_p0), p1(gmock_p1), \ 1640 p2(gmock_p2), p3(gmock_p3) {\ 1647 GTEST_DISALLOW_ASSIGN_(name##MatcherP4);\ 1649 template <typename p0##_type, typename p1##_type, typename p2##_type, \ 1650 typename p3##_type>\ 1651 inline name##MatcherP4<p0##_type, p1##_type, p2##_type, \ 1652 p3##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, \ 1654 return name##MatcherP4<p0##_type, p1##_type, p2##_type, p3##_type>(p0, \ 1657 template <typename p0##_type, typename p1##_type, typename p2##_type, \ 1658 typename p3##_type>\ 1659 template <typename arg_type>\ 1660 bool name##MatcherP4<p0##_type, p1##_type, p2##_type, \ 1661 p3##_type>::gmock_Impl<arg_type>::MatchAndExplain(\ 1663 ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\ 1666 #define MATCHER_P5(name, p0, p1, p2, p3, p4, description)\ 1667 template <typename p0##_type, typename p1##_type, typename p2##_type, \ 1668 typename p3##_type, typename p4##_type>\ 1669 class name##MatcherP5 {\ 1671 template <typename arg_type>\ 1672 class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\ 1674 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ 1675 p3##_type gmock_p3, p4##_type gmock_p4)\ 1676 : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), \ 1678 virtual bool MatchAndExplain(\ 1679 arg_type arg, ::testing::MatchResultListener* result_listener) const;\ 1680 virtual void DescribeTo(::std::ostream* gmock_os) const {\ 1681 *gmock_os << FormatDescription(false);\ 1683 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\ 1684 *gmock_os << FormatDescription(true);\ 1692 ::testing::internal::string FormatDescription(bool negation) const {\ 1693 const ::testing::internal::string gmock_description = (description);\ 1694 if (!gmock_description.empty())\ 1695 return gmock_description;\ 1696 return ::testing::internal::FormatMatcherDescription(\ 1698 ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ 1699 ::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \ 1700 p4##_type>(p0, p1, p2, p3, p4)));\ 1702 GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ 1704 template <typename arg_type>\ 1705 operator ::testing::Matcher<arg_type>() const {\ 1706 return ::testing::Matcher<arg_type>(\ 1707 new gmock_Impl<arg_type>(p0, p1, p2, p3, p4));\ 1709 name##MatcherP5(p0##_type gmock_p0, p1##_type gmock_p1, \ 1710 p2##_type gmock_p2, p3##_type gmock_p3, \ 1711 p4##_type gmock_p4) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ 1712 p3(gmock_p3), p4(gmock_p4) {\ 1720 GTEST_DISALLOW_ASSIGN_(name##MatcherP5);\ 1722 template <typename p0##_type, typename p1##_type, typename p2##_type, \ 1723 typename p3##_type, typename p4##_type>\ 1724 inline name##MatcherP5<p0##_type, p1##_type, p2##_type, p3##_type, \ 1725 p4##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \ 1727 return name##MatcherP5<p0##_type, p1##_type, p2##_type, p3##_type, \ 1728 p4##_type>(p0, p1, p2, p3, p4);\ 1730 template <typename p0##_type, typename p1##_type, typename p2##_type, \ 1731 typename p3##_type, typename p4##_type>\ 1732 template <typename arg_type>\ 1733 bool name##MatcherP5<p0##_type, p1##_type, p2##_type, p3##_type, \ 1734 p4##_type>::gmock_Impl<arg_type>::MatchAndExplain(\ 1736 ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\ 1739 #define MATCHER_P6(name, p0, p1, p2, p3, p4, p5, description)\ 1740 template <typename p0##_type, typename p1##_type, typename p2##_type, \ 1741 typename p3##_type, typename p4##_type, typename p5##_type>\ 1742 class name##MatcherP6 {\ 1744 template <typename arg_type>\ 1745 class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\ 1747 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ 1748 p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5)\ 1749 : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), \ 1750 p4(gmock_p4), p5(gmock_p5) {}\ 1751 virtual bool MatchAndExplain(\ 1752 arg_type arg, ::testing::MatchResultListener* result_listener) const;\ 1753 virtual void DescribeTo(::std::ostream* gmock_os) const {\ 1754 *gmock_os << FormatDescription(false);\ 1756 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\ 1757 *gmock_os << FormatDescription(true);\ 1766 ::testing::internal::string FormatDescription(bool negation) const {\ 1767 const ::testing::internal::string gmock_description = (description);\ 1768 if (!gmock_description.empty())\ 1769 return gmock_description;\ 1770 return ::testing::internal::FormatMatcherDescription(\ 1772 ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ 1773 ::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \ 1774 p4##_type, p5##_type>(p0, p1, p2, p3, p4, p5)));\ 1776 GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ 1778 template <typename arg_type>\ 1779 operator ::testing::Matcher<arg_type>() const {\ 1780 return ::testing::Matcher<arg_type>(\ 1781 new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5));\ 1783 name##MatcherP6(p0##_type gmock_p0, p1##_type gmock_p1, \ 1784 p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \ 1785 p5##_type gmock_p5) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ 1786 p3(gmock_p3), p4(gmock_p4), p5(gmock_p5) {\ 1795 GTEST_DISALLOW_ASSIGN_(name##MatcherP6);\ 1797 template <typename p0##_type, typename p1##_type, typename p2##_type, \ 1798 typename p3##_type, typename p4##_type, typename p5##_type>\ 1799 inline name##MatcherP6<p0##_type, p1##_type, p2##_type, p3##_type, \ 1800 p4##_type, p5##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, \ 1801 p3##_type p3, p4##_type p4, p5##_type p5) {\ 1802 return name##MatcherP6<p0##_type, p1##_type, p2##_type, p3##_type, \ 1803 p4##_type, p5##_type>(p0, p1, p2, p3, p4, p5);\ 1805 template <typename p0##_type, typename p1##_type, typename p2##_type, \ 1806 typename p3##_type, typename p4##_type, typename p5##_type>\ 1807 template <typename arg_type>\ 1808 bool name##MatcherP6<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \ 1809 p5##_type>::gmock_Impl<arg_type>::MatchAndExplain(\ 1811 ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\ 1814 #define MATCHER_P7(name, p0, p1, p2, p3, p4, p5, p6, description)\ 1815 template <typename p0##_type, typename p1##_type, typename p2##_type, \ 1816 typename p3##_type, typename p4##_type, typename p5##_type, \ 1817 typename p6##_type>\ 1818 class name##MatcherP7 {\ 1820 template <typename arg_type>\ 1821 class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\ 1823 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ 1824 p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ 1825 p6##_type gmock_p6)\ 1826 : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), \ 1827 p4(gmock_p4), p5(gmock_p5), p6(gmock_p6) {}\ 1828 virtual bool MatchAndExplain(\ 1829 arg_type arg, ::testing::MatchResultListener* result_listener) const;\ 1830 virtual void DescribeTo(::std::ostream* gmock_os) const {\ 1831 *gmock_os << FormatDescription(false);\ 1833 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\ 1834 *gmock_os << FormatDescription(true);\ 1844 ::testing::internal::string FormatDescription(bool negation) const {\ 1845 const ::testing::internal::string gmock_description = (description);\ 1846 if (!gmock_description.empty())\ 1847 return gmock_description;\ 1848 return ::testing::internal::FormatMatcherDescription(\ 1850 ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ 1851 ::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \ 1852 p4##_type, p5##_type, p6##_type>(p0, p1, p2, p3, p4, p5, \ 1855 GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ 1857 template <typename arg_type>\ 1858 operator ::testing::Matcher<arg_type>() const {\ 1859 return ::testing::Matcher<arg_type>(\ 1860 new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5, p6));\ 1862 name##MatcherP7(p0##_type gmock_p0, p1##_type gmock_p1, \ 1863 p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \ 1864 p5##_type gmock_p5, p6##_type gmock_p6) : p0(gmock_p0), p1(gmock_p1), \ 1865 p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), \ 1876 GTEST_DISALLOW_ASSIGN_(name##MatcherP7);\ 1878 template <typename p0##_type, typename p1##_type, typename p2##_type, \ 1879 typename p3##_type, typename p4##_type, typename p5##_type, \ 1880 typename p6##_type>\ 1881 inline name##MatcherP7<p0##_type, p1##_type, p2##_type, p3##_type, \ 1882 p4##_type, p5##_type, p6##_type> name(p0##_type p0, p1##_type p1, \ 1883 p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \ 1885 return name##MatcherP7<p0##_type, p1##_type, p2##_type, p3##_type, \ 1886 p4##_type, p5##_type, p6##_type>(p0, p1, p2, p3, p4, p5, p6);\ 1888 template <typename p0##_type, typename p1##_type, typename p2##_type, \ 1889 typename p3##_type, typename p4##_type, typename p5##_type, \ 1890 typename p6##_type>\ 1891 template <typename arg_type>\ 1892 bool name##MatcherP7<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \ 1893 p5##_type, p6##_type>::gmock_Impl<arg_type>::MatchAndExplain(\ 1895 ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\ 1898 #define MATCHER_P8(name, p0, p1, p2, p3, p4, p5, p6, p7, description)\ 1899 template <typename p0##_type, typename p1##_type, typename p2##_type, \ 1900 typename p3##_type, typename p4##_type, typename p5##_type, \ 1901 typename p6##_type, typename p7##_type>\ 1902 class name##MatcherP8 {\ 1904 template <typename arg_type>\ 1905 class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\ 1907 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ 1908 p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ 1909 p6##_type gmock_p6, p7##_type gmock_p7)\ 1910 : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), \ 1911 p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7) {}\ 1912 virtual bool MatchAndExplain(\ 1913 arg_type arg, ::testing::MatchResultListener* result_listener) const;\ 1914 virtual void DescribeTo(::std::ostream* gmock_os) const {\ 1915 *gmock_os << FormatDescription(false);\ 1917 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\ 1918 *gmock_os << FormatDescription(true);\ 1929 ::testing::internal::string FormatDescription(bool negation) const {\ 1930 const ::testing::internal::string gmock_description = (description);\ 1931 if (!gmock_description.empty())\ 1932 return gmock_description;\ 1933 return ::testing::internal::FormatMatcherDescription(\ 1935 ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ 1936 ::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \ 1937 p4##_type, p5##_type, p6##_type, p7##_type>(p0, p1, p2, \ 1938 p3, p4, p5, p6, p7)));\ 1940 GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ 1942 template <typename arg_type>\ 1943 operator ::testing::Matcher<arg_type>() const {\ 1944 return ::testing::Matcher<arg_type>(\ 1945 new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5, p6, p7));\ 1947 name##MatcherP8(p0##_type gmock_p0, p1##_type gmock_p1, \ 1948 p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \ 1949 p5##_type gmock_p5, p6##_type gmock_p6, \ 1950 p7##_type gmock_p7) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ 1951 p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \ 1963 GTEST_DISALLOW_ASSIGN_(name##MatcherP8);\ 1965 template <typename p0##_type, typename p1##_type, typename p2##_type, \ 1966 typename p3##_type, typename p4##_type, typename p5##_type, \ 1967 typename p6##_type, typename p7##_type>\ 1968 inline name##MatcherP8<p0##_type, p1##_type, p2##_type, p3##_type, \ 1969 p4##_type, p5##_type, p6##_type, p7##_type> name(p0##_type p0, \ 1970 p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \ 1971 p6##_type p6, p7##_type p7) {\ 1972 return name##MatcherP8<p0##_type, p1##_type, p2##_type, p3##_type, \ 1973 p4##_type, p5##_type, p6##_type, p7##_type>(p0, p1, p2, p3, p4, p5, \ 1976 template <typename p0##_type, typename p1##_type, typename p2##_type, \ 1977 typename p3##_type, typename p4##_type, typename p5##_type, \ 1978 typename p6##_type, typename p7##_type>\ 1979 template <typename arg_type>\ 1980 bool name##MatcherP8<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \ 1981 p5##_type, p6##_type, \ 1982 p7##_type>::gmock_Impl<arg_type>::MatchAndExplain(\ 1984 ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\ 1987 #define MATCHER_P9(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, description)\ 1988 template <typename p0##_type, typename p1##_type, typename p2##_type, \ 1989 typename p3##_type, typename p4##_type, typename p5##_type, \ 1990 typename p6##_type, typename p7##_type, typename p8##_type>\ 1991 class name##MatcherP9 {\ 1993 template <typename arg_type>\ 1994 class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\ 1996 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ 1997 p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ 1998 p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8)\ 1999 : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), \ 2000 p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \ 2002 virtual bool MatchAndExplain(\ 2003 arg_type arg, ::testing::MatchResultListener* result_listener) const;\ 2004 virtual void DescribeTo(::std::ostream* gmock_os) const {\ 2005 *gmock_os << FormatDescription(false);\ 2007 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\ 2008 *gmock_os << FormatDescription(true);\ 2020 ::testing::internal::string FormatDescription(bool negation) const {\ 2021 const ::testing::internal::string gmock_description = (description);\ 2022 if (!gmock_description.empty())\ 2023 return gmock_description;\ 2024 return ::testing::internal::FormatMatcherDescription(\ 2026 ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ 2027 ::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \ 2028 p4##_type, p5##_type, p6##_type, p7##_type, \ 2029 p8##_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8)));\ 2031 GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ 2033 template <typename arg_type>\ 2034 operator ::testing::Matcher<arg_type>() const {\ 2035 return ::testing::Matcher<arg_type>(\ 2036 new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8));\ 2038 name##MatcherP9(p0##_type gmock_p0, p1##_type gmock_p1, \ 2039 p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \ 2040 p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \ 2041 p8##_type gmock_p8) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ 2042 p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \ 2055 GTEST_DISALLOW_ASSIGN_(name##MatcherP9);\ 2057 template <typename p0##_type, typename p1##_type, typename p2##_type, \ 2058 typename p3##_type, typename p4##_type, typename p5##_type, \ 2059 typename p6##_type, typename p7##_type, typename p8##_type>\ 2060 inline name##MatcherP9<p0##_type, p1##_type, p2##_type, p3##_type, \ 2061 p4##_type, p5##_type, p6##_type, p7##_type, \ 2062 p8##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \ 2063 p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, \ 2065 return name##MatcherP9<p0##_type, p1##_type, p2##_type, p3##_type, \ 2066 p4##_type, p5##_type, p6##_type, p7##_type, p8##_type>(p0, p1, p2, \ 2067 p3, p4, p5, p6, p7, p8);\ 2069 template <typename p0##_type, typename p1##_type, typename p2##_type, \ 2070 typename p3##_type, typename p4##_type, typename p5##_type, \ 2071 typename p6##_type, typename p7##_type, typename p8##_type>\ 2072 template <typename arg_type>\ 2073 bool name##MatcherP9<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \ 2074 p5##_type, p6##_type, p7##_type, \ 2075 p8##_type>::gmock_Impl<arg_type>::MatchAndExplain(\ 2077 ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\ 2080 #define MATCHER_P10(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, description)\ 2081 template <typename p0##_type, typename p1##_type, typename p2##_type, \ 2082 typename p3##_type, typename p4##_type, typename p5##_type, \ 2083 typename p6##_type, typename p7##_type, typename p8##_type, \ 2084 typename p9##_type>\ 2085 class name##MatcherP10 {\ 2087 template <typename arg_type>\ 2088 class gmock_Impl : public ::testing::MatcherInterface<arg_type> {\ 2090 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ 2091 p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ 2092 p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8, \ 2093 p9##_type gmock_p9)\ 2094 : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), \ 2095 p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \ 2096 p8(gmock_p8), p9(gmock_p9) {}\ 2097 virtual bool MatchAndExplain(\ 2098 arg_type arg, ::testing::MatchResultListener* result_listener) const;\ 2099 virtual void DescribeTo(::std::ostream* gmock_os) const {\ 2100 *gmock_os << FormatDescription(false);\ 2102 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\ 2103 *gmock_os << FormatDescription(true);\ 2116 ::testing::internal::string FormatDescription(bool negation) const {\ 2117 const ::testing::internal::string gmock_description = (description);\ 2118 if (!gmock_description.empty())\ 2119 return gmock_description;\ 2120 return ::testing::internal::FormatMatcherDescription(\ 2122 ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ 2123 ::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \ 2124 p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, \ 2125 p9##_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)));\ 2127 GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ 2129 template <typename arg_type>\ 2130 operator ::testing::Matcher<arg_type>() const {\ 2131 return ::testing::Matcher<arg_type>(\ 2132 new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9));\ 2134 name##MatcherP10(p0##_type gmock_p0, p1##_type gmock_p1, \ 2135 p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \ 2136 p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \ 2137 p8##_type gmock_p8, p9##_type gmock_p9) : p0(gmock_p0), p1(gmock_p1), \ 2138 p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \ 2139 p7(gmock_p7), p8(gmock_p8), p9(gmock_p9) {\ 2152 GTEST_DISALLOW_ASSIGN_(name##MatcherP10);\ 2154 template <typename p0##_type, typename p1##_type, typename p2##_type, \ 2155 typename p3##_type, typename p4##_type, typename p5##_type, \ 2156 typename p6##_type, typename p7##_type, typename p8##_type, \ 2157 typename p9##_type>\ 2158 inline name##MatcherP10<p0##_type, p1##_type, p2##_type, p3##_type, \ 2159 p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, \ 2160 p9##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \ 2161 p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8, \ 2163 return name##MatcherP10<p0##_type, p1##_type, p2##_type, p3##_type, \ 2164 p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, p9##_type>(p0, \ 2165 p1, p2, p3, p4, p5, p6, p7, p8, p9);\ 2167 template <typename p0##_type, typename p1##_type, typename p2##_type, \ 2168 typename p3##_type, typename p4##_type, typename p5##_type, \ 2169 typename p6##_type, typename p7##_type, typename p8##_type, \ 2170 typename p9##_type>\ 2171 template <typename arg_type>\ 2172 bool name##MatcherP10<p0##_type, p1##_type, p2##_type, p3##_type, \ 2173 p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, \ 2174 p9##_type>::gmock_Impl<arg_type>::MatchAndExplain(\ 2176 ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\ 2179 #endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_ virtual void DescribeNegationTo(::std::ostream *os) const
testing::internal::TupleFields< Tuple, k0, k1, k2, k3, k4,-1,-1,-1,-1,-1 >::GetSelectedFields static type GetSelectedFields(const Tuple &t)
BothOfMatcher< typename AllOfResult3< M1, M2, M3 >::type, typename AllOfResult3< M4, M5, M6 >::type > type
EitherOfMatcher< typename AnyOfResult3< M1, M2, M3 >::type, typename AnyOfResult3< M4, M5, M6 >::type > type
testing::internal::TupleFields< Tuple, k0, k1, k2, k3,-1,-1,-1,-1,-1,-1 >::GetSelectedFields static type GetSelectedFields(const Tuple &t)
BothOfMatcher< typename AllOfResult4< M1, M2, M3, M4 >::type, typename AllOfResult4< M5, M6, M7, M8 >::type > type
::std::string PrintToString(const T &value)
::std::ostream * stream()
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 >::type ::testing::tuple< typename::testing::tuple_element< k0, Tuple >::type > type
static void PrintIndices(::std::ostream *os)
testing::internal::TupleFields< Tuple, k0, k1,-1,-1,-1,-1,-1,-1,-1,-1 >::type ::testing::tuple< typename::testing::tuple_element< k0, Tuple >::type, typename::testing::tuple_element< k1, Tuple >::type > type
Matcher< const SelectedArgs & > MonomorphicInnerMatcher
virtual bool MatchAndExplain(ArgsTuple args, MatchResultListener *listener) const
internal::string str() const
EitherOfMatcher< typename AnyOfResult2< M1, M2 >::type, typename AnyOfResult3< M3, M4, M5 >::type > type
testing::internal::TupleFields< Tuple, k0, k1, k2, k3, k4, k5, k6, k7, k8,-1 >::GetSelectedFields static type GetSelectedFields(const Tuple &t)
bool IsInterested() const
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,-1,-1,-1,-1,-1,-1,-1,-1 >::GetSelectedFields static type GetSelectedFields(const Tuple &t)
internal::ArgsMatcher< InnerMatcher > Args(const InnerMatcher &matcher)
testing::internal::TupleFields< Tuple, k0, k1, k2,-1,-1,-1,-1,-1,-1,-1 >::type ::testing::tuple< typename::testing::tuple_element< k0, Tuple >::type, typename::testing::tuple_element< k1, Tuple >::type, typename::testing::tuple_element< k2, Tuple >::type > type
testing::internal::TupleFields< Tuple, k0, k1, k2, k3, k4,-1,-1,-1,-1,-1 >::type ::testing::tuple< typename::testing::tuple_element< k0, Tuple >::type, typename::testing::tuple_element< k1, Tuple >::type, typename::testing::tuple_element< k2, Tuple >::type, typename::testing::tuple_element< k3, Tuple >::type, typename::testing::tuple_element< k4, Tuple >::type > type
EitherOfMatcher< typename AnyOfResult5< M1, M2, M3, M4, M5 >::type, typename AnyOfResult5< M6, M7, M8, M9, M10 >::type > type
internal::AllOfResult2< M1, M2 >::type AllOf(M1 m1, M2 m2)
internal::TupleFields< RawArgsTuple, k0, k1, k2, k3, k4, k5, k6, k7, k8, k9 >::type SelectedArgs
EitherOfMatcher< typename AnyOfResult2< M1, M2 >::type, typename AnyOfResult2< M3, M4 >::type > type
#define GTEST_DISALLOW_ASSIGN_(type)
testing::internal::TupleFields< Tuple, k0, k1, k2, k3,-1,-1,-1,-1,-1,-1 >::type ::testing::tuple< typename::testing::tuple_element< k0, Tuple >::type, typename::testing::tuple_element< k1, Tuple >::type, typename::testing::tuple_element< k2, Tuple >::type, typename::testing::tuple_element< k3, Tuple >::type > type
BothOfMatcher< typename AllOfResult2< M1, M2 >::type, typename AllOfResult3< M3, M4, M5 >::type > type
testing::internal::TupleFields< Tuple, k0, k1, k2, k3, k4, k5, k6,-1,-1,-1 >::type ::testing::tuple< typename::testing::tuple_element< k0, Tuple >::type, typename::testing::tuple_element< k1, Tuple >::type, typename::testing::tuple_element< k2, Tuple >::type, typename::testing::tuple_element< k3, Tuple >::type, typename::testing::tuple_element< k4, Tuple >::type, typename::testing::tuple_element< k5, Tuple >::type, typename::testing::tuple_element< k6, Tuple >::type > type
BothOfMatcher< typename AllOfResult5< M1, M2, M3, M4, M5 >::type, typename AllOfResult5< M6, M7, M8, M9, M10 >::type > type
internal::UnorderedElementsAreMatcher< ::testing::tuple<> > UnorderedElementsAre()
static type GetSelectedFields(const Tuple &t)
::testing::tuple< typename::testing::tuple_element< k0, Tuple >::type, typename::testing::tuple_element< k1, Tuple >::type, typename::testing::tuple_element< k2, Tuple >::type, typename::testing::tuple_element< k3, Tuple >::type, typename::testing::tuple_element< k4, Tuple >::type, typename::testing::tuple_element< k5, Tuple >::type, typename::testing::tuple_element< k6, Tuple >::type, typename::testing::tuple_element< k7, Tuple >::type, typename::testing::tuple_element< k8, Tuple >::type, typename::testing::tuple_element< k9, Tuple >::type > type
void PrintIfNotEmpty(const internal::string &explanation,::std::ostream *os)
internal::AnyOfResult2< M1, M2 >::type AnyOf(M1 m1, M2 m2)
Matcher< T > MakeMatcher(const MatcherInterface< T > *impl)
Matcher< T > SafeMatcherCast(const M &polymorphic_matcher)
EitherOfMatcher< typename AnyOfResult4< M1, M2, M3, M4 >::type, typename AnyOfResult5< M5, M6, M7, M8, M9 >::type > type
testing::internal::TupleFields< Tuple, k0,-1,-1,-1,-1,-1,-1,-1,-1,-1 >::GetSelectedFields static type GetSelectedFields(const Tuple &t)
static SelectedArgs GetSelectedArgs(ArgsTuple args)
BothOfMatcher< typename AllOfResult4< M1, M2, M3, M4 >::type, typename AllOfResult5< M5, M6, M7, M8, M9 >::type > type
EitherOfMatcher< typename AnyOfResult3< M1, M2, M3 >::type, typename AnyOfResult4< M4, M5, M6, M7 >::type > type
ArgsMatcher(const InnerMatcher &inner_matcher)
testing::internal::TupleFields< Tuple, k0, k1, k2, k3, k4, k5, k6, k7, k8,-1 >::type ::testing::tuple< typename::testing::tuple_element< k0, Tuple >::type, typename::testing::tuple_element< k1, Tuple >::type, typename::testing::tuple_element< k2, Tuple >::type, typename::testing::tuple_element< k3, Tuple >::type, typename::testing::tuple_element< k4, Tuple >::type, typename::testing::tuple_element< k5, Tuple >::type, typename::testing::tuple_element< k6, Tuple >::type, typename::testing::tuple_element< k7, Tuple >::type, typename::testing::tuple_element< k8, Tuple >::type > type
EitherOfMatcher< typename AnyOfResult1< M1 >::type, typename AnyOfResult2< M2, M3 >::type > type
#define GTEST_REMOVE_REFERENCE_AND_CONST_(T)
testing::internal::TupleFields< Tuple, k0, k1, k2, k3, k4, k5, k6,-1,-1,-1 >::GetSelectedFields static type GetSelectedFields(const Tuple &t)
virtual void DescribeTo(::std::ostream *os) const
BothOfMatcher< typename AllOfResult3< M1, M2, M3 >::type, typename AllOfResult4< M4, M5, M6, M7 >::type > type
BothOfMatcher< typename AllOfResult2< M1, M2 >::type, typename AllOfResult2< M3, M4 >::type > type
EitherOfMatcher< typename AnyOfResult1< M1 >::type, typename AnyOfResult1< M2 >::type > type
BothOfMatcher< typename AllOfResult1< M1 >::type, typename AllOfResult1< M2 >::type > type
BothOfMatcher< typename AllOfResult1< M1 >::type, typename AllOfResult2< M2, M3 >::type > type
testing::internal::TupleFields< Tuple, k0, k1, k2, k3, k4, k5,-1,-1,-1,-1 >::type ::testing::tuple< typename::testing::tuple_element< k0, Tuple >::type, typename::testing::tuple_element< k1, Tuple >::type, typename::testing::tuple_element< k2, Tuple >::type, typename::testing::tuple_element< k3, Tuple >::type, typename::testing::tuple_element< k4, Tuple >::type, typename::testing::tuple_element< k5, Tuple >::type > type
testing::internal::TupleFields< Tuple, k0, k1, k2, k3, k4, k5, k6, k7,-1,-1 >::type ::testing::tuple< typename::testing::tuple_element< k0, Tuple >::type, typename::testing::tuple_element< k1, Tuple >::type, typename::testing::tuple_element< k2, Tuple >::type, typename::testing::tuple_element< k3, Tuple >::type, typename::testing::tuple_element< k4, Tuple >::type, typename::testing::tuple_element< k5, Tuple >::type, typename::testing::tuple_element< k6, Tuple >::type, typename::testing::tuple_element< k7, Tuple >::type > type
testing::internal::TupleFields< Tuple,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 >::type ::testing::tuple type
EitherOfMatcher< typename AnyOfResult4< M1, M2, M3, M4 >::type, typename AnyOfResult4< M5, M6, M7, M8 >::type > type
testing::internal::TupleFields< Tuple, k0, k1, k2, k3, k4, k5, k6, k7,-1,-1 >::GetSelectedFields static type GetSelectedFields(const Tuple &t)
internal::ElementsAreMatcher< ::testing::tuple<> > ElementsAre()
ArgsMatcherImpl(const InnerMatcher &inner_matcher)
testing::internal::TupleFields< Tuple, k0, k1, k2, k3, k4, k5,-1,-1,-1,-1 >::GetSelectedFields static type GetSelectedFields(const Tuple &t)
#define GMOCK_FIELD_TYPE_(Tuple, i)