Home | History | Annotate | Download | only in gmock

Lines Matching defs:const

289   IgnoredValue(const T& /* ignored */) {}  // NOLINT(runtime/explicit)
514 GTEST_API_ string ConvertIdentifierNameToWords(const char* id_name);
534 inline const typename Pointer::element_type* GetRawPointer(const Pointer& p) {
544 bool operator()(const ::testing::internal::linked_ptr<T>& lhs,
545 const ::testing::internal::linked_ptr<T>& rhs) const {
727 virtual void ReportFailure(FailureType type, const char* file, int line,
728 const string& message) = 0;
739 inline void Assert(bool condition, const char* file, int line,
740 const string& msg) {
746 inline void Assert(bool condition, const char* file, int line) {
752 inline void Expect(bool condition, const char* file, int line,
753 const string& msg) {
759 inline void Expect(bool condition, const char* file, int line) {
772 const char kInfoVerbosity[] = "info";
774 const char kWarningVerbosity[] = "warning";
776 const char kErrorVerbosity[] = "error";
790 const string& message,
809 // DecayArray<T>::type turns an array type U[N] to const U* and preserves
813 typedef const T* type;
816 // (e.g. extern const char kNamePrefix[]). This specialization covers that
819 typedef const T* type;
834 // Given a raw type (i.e. having no top-level reference or const
841 // - const_reference is a type that provides a reference to a const
843 // - ConstReference(raw_container) returns a const reference to an STL-style
854 typedef const type& const_reference;
856 static const_reference ConstReference(const RawContainer& container) {
857 // Ensures that RawContainer is not a const type.
862 static type Copy(const RawContainer& container) { return container; }
872 // reference (selected by a constructor argument), so 'const type'
873 // can be used to reference a const native array. We cannot
874 // 'typedef const type& const_reference' here, as that would mean
876 typedef const type const_reference;
878 static const_reference ConstReference(const Element (&array)[N]) {
879 // Ensures that Element is not a const type.
885 // {lval} const char *[4], long, testing::internal::RelationToSource)'
888 // char *const *, unsigned int, testing::internal::RelationToSource)'
890 // <const char * (&)[4]>::Matches(const char * (&)[4]) const')
892 // ConstReference(const char * (&)[4])')
900 static type Copy(const Element (&array)[N]) {
917 typedef const type const_reference;
920 const ::std::tr1::tuple<ElementPointer, Size>& array) {
924 static type Copy(const ::std::tr1::tuple<ElementPointer, Size>& array) {
942 // Partially specialized to remove constness from std::pair<const K, V>.
944 struct RemoveConstFromKey<std::pair<const K, V> > {
963 // const FooAction*.
994 // default value for T and const T.
996 class BuiltInDefaultValue<const T> {
1103 static const T* value_;
1153 const T* DefaultValue<T>::value_ = NULL;
1169 // Performs the action. This method is not const, as in general an
1173 virtual Result Perform(const ArgumentTuple& args) = 0;
1182 // linked_ptr to const ActionInterface<T>, so copying is fairly cheap.
1203 Action(const Action& action) : impl_(action.impl_) {}
1210 explicit Action(const Action<Func>& action);
1213 bool IsDoDefault() const { return impl_.get() == NULL; }
1215 // Performs the action. Note that this method is const even though
1217 // is that a const Action<F> means that it cannot be re-bound to
1219 // cannot change state. (Think of the difference between a const
1220 // pointer and a pointer to const.)
1221 Result Perform(const ArgumentTuple& args) const {
1249 // Result Perform(const ArgumentTuple& args) const {
1263 explicit PolymorphicAction(const Impl& impl) : impl_(impl) {}
1266 operator Action<F>() const {
1277 explicit MonomorphicImpl(const Impl& impl) : impl_(impl) {}
1279 virtual Result Perform(const ArgumentTuple& args) {
1309 inline PolymorphicAction<Impl> MakePolymorphicAction(const Impl& impl) {
1323 explicit ActionAdaptor(const Action<F2>& from) : impl_(from.impl_) {}
1325 virtual Result Perform(const ArgumentTuple& args) {
1330 const internal::linked_ptr<ActionInterface<F2> > impl_;
1363 // 'value' is passed by value instead of by const reference in order
1370 operator Action<F>() const {
1404 virtual Result Perform(const ArgumentTuple&) { return value_; }
1424 static Result Perform(const ArgumentTuple&) {
1436 static void Perform(const ArgumentTuple&) {
1453 operator Action<F>() const {
1473 virtual Result Perform(const ArgumentTuple&) {
1496 explicit ReturnRefOfCopyAction(const T& value) : value_(value) {} // NOLINT
1501 operator Action<F>() const {
1520 explicit Impl(const T& value) : value_(value) {} // NOLINT
1522 virtual Result Perform(const ArgumentTuple&) {
1532 const T value_;
1543 operator Action<F>() const { return Action<F>(NULL); }
1554 void Perform(const ArgumentTuple& /* args */) const {
1559 T1* const ptr_;
1560 const T2 value_;
1576 Result Perform(const ArgumentTuple& /* args */) const {
1582 const int errno_;
1583 const T result_;
1599 explicit SetArgumentPointeeAction(const A& value) : value_(value) {}
1602 void Perform(const ArgumentTuple& args) const {
1608 const A value_;
1620 explicit SetArgumentPointeeAction(const Proto& proto) : proto_(new Proto) {
1625 void Perform(const ArgumentTuple& args) const {
1631 const internal::linked_ptr<Proto> proto_;
1652 Result Perform(const ArgumentTuple&) { return function_impl_(); }
1668 Result Perform(const ArgumentTuple&) const {
1673 Class* const obj_ptr_;
1674 const MethodPtr method_ptr_;
1683 explicit IgnoreResultAction(const A& action) : action_(action) {}
1686 operator Action<F>() const {
1710 explicit Impl(const A& action) : action_(action) {}
1712 virtual void Perform(const ArgumentTuple& args) {
1723 const Action<OriginalFunction> action_;
1728 const A action_;
1734 // which can be either const or not. It can be explicitly converted
1748 operator T&() const { return *pointer_; }
1755 void PrintTo(const ReferenceWrapper<T>& ref, ::std::ostream* os) {
1771 operator Action<F>() const {
1784 Impl(const Action<VoidResult>& action1, const Action<F>& action2)
1787 virtual Result Perform(const ArgumentTuple& args) {
1793 const Action<VoidResult> action1_;
1794 const Action<F> action2_;
1811 // MOCK_METHOD3(Foo, double(const string& label, double x, double y));
1816 // double DistanceToOriginWithLabel(const string& label, double x, double y) {
1845 Action<To>::Action(const Action<From>& from)
1849 // instead of const reference - otherwise Return("string literal")
1876 inline internal::ReturnRefOfCopyAction<R> ReturnRefOfCopy(const R& x) {
1891 SetArgPointee(const T& x) {
1902 internal::SetArgumentPointeeAction<N, const char*, false> >
1903 SetArgPointee(const char* p) {
1905 N, const char*, false>(p));
1910 internal::SetArgumentPointeeAction<N, const wchar_t*, false> >
1911 SetArgPointee(const wchar_t* p) {
1913 N, const wchar_t*, false>(p));
1922 SetArgumentPointee(const T& x) {
1969 inline internal::IgnoreResultAction<A> IgnoreResult(const A& an_action) {
1976 // would wrap a Derived&. If you want to wrap a const Base& instead,
1979 // ByRef<const Base>(derived)
2037 // const FooCardinality*.
2050 virtual int ConservativeLowerBound() const { return 0; }
2051 virtual int ConservativeUpperBound() const { return INT_MAX; }
2054 virtual bool IsSatisfiedByCallCount(int call_count) const = 0;
2057 virtual bool IsSaturatedByCallCount(int call_count) const = 0;
2060 virtual void DescribeTo(::std::ostream* os) const = 0;
2066 // to const CardinalityInterface, so copying is fairly cheap.
2075 explicit Cardinality(const CardinalityInterface* impl) : impl_(impl) {}
2079 int ConservativeLowerBound() const { return impl_->ConservativeLowerBound(); }
2080 int ConservativeUpperBound() const { return impl_->ConservativeUpperBound(); }
2083 bool IsSatisfiedByCallCount(int call_count) const {
2088 bool IsSaturatedByCallCount(int call_count) const {
2094 bool IsOverSaturatedByCallCount(int call_count) const {
2100 void DescribeTo(::std::ostream* os) const { impl_->DescribeTo(os); }
2107 internal::linked_ptr<const CardinalityInterface> impl_;
2126 inline Cardinality MakeCardinality(const CardinalityInterface* c) {
2187 static R Invoke(Function function, const ::std::tr1::tuple<>&) {
2194 const ::std::tr1::tuple<>&) {
2203 static R Invoke(Function function, const ::std::tr1::tuple<A1>& args) {
2211 const ::std::tr1::tuple<A1>& args) {
2221 static R Invoke(Function function, const ::std::tr1::tuple<A1, A2>& args) {
2229 const ::std::tr1::tuple<A1, A2>& args) {
2239 static R Invoke(Function function, const ::std::tr1::tuple<A1, A2,
2248 const ::std::tr1::tuple<A1, A2, A3>& args) {
2258 static R Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3,
2267 const ::std::tr1::tuple<A1, A2, A3, A4>& args) {
2279 static R Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3, A4,
2289 const ::std::tr1::tuple<A1, A2, A3, A4, A5>& args) {
2301 static R Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3, A4,
2311 const ::std::tr1::tuple<A1, A2, A3, A4, A5, A6>& args) {
2323 static R Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3, A4,
2333 const ::std::tr1::tuple<A1, A2, A3, A4, A5, A6,
2346 static R Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3, A4,
2356 const ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7,
2369 static R Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3, A4,
2379 const ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8,
2395 static R Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3, A4,
2406 const ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8,
2434 // We deliberately pass a1 by value instead of const reference here
2436 // parameter as 'const A1& a1' and write Call(function, "Hi"), the
2440 // is 'const char*' when it sees Call(function, "Hi").
2550 static SelectedArgs Select(const ArgumentTuple& args) {
2564 static SelectedArgs Select(const ArgumentTuple& /* args */) {
2576 static SelectedArgs Select(const ArgumentTuple& args) {
2589 static SelectedArgs Select(const ArgumentTuple& args) {
2602 static SelectedArgs Select(const ArgumentTuple& args) {
2617 static SelectedArgs Select(const ArgumentTuple& args) {
2633 static SelectedArgs Select(const ArgumentTuple& args) {
2650 static SelectedArgs Select(const ArgumentTuple& args) {
2667 static SelectedArgs Select(const ArgumentTuple& args) {
2685 static SelectedArgs Select(const ArgumentTuple& args) {
2704 static SelectedArgs Select(const ArgumentTuple& args) {
2720 explicit WithArgsAction(const InnerAction& action) : action_(action) {}
2723 operator Action<F>() const { return MakeAction(new Impl<F>(action_)); }
2732 explicit Impl(const InnerAction& action) : action_(action) {}
2734 virtual Result Perform(const ArgumentTuple& args) {
2746 const InnerAction action_;
2771 static Result Perform(Impl* impl, const ::std::tr1::tuple<>& args) {
2780 static Result Perform(Impl* impl, const ::std::tr1::tuple<A0>& args) {
2789 static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1>& args) {
2798 static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2>& args) {
2807 static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2,
2817 static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2, A3,
2828 static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2, A3, A4,
2839 static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2, A3, A4,
2850 static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2, A3, A4,
2861 static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2, A3, A4,
2872 static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2, A3, A4,
2893 WithArgs(const InnerAction& action) {
2899 WithArgs(const InnerAction& action) {
2905 WithArgs(const InnerAction& action) {
2911 WithArgs(const InnerAction& action) {
2917 WithArgs(const InnerAction& action) {
2923 WithArgs(const InnerAction& action) {
2930 WithArgs(const InnerAction& action) {
2938 WithArgs(const InnerAction& action) {
2946 WithArgs(const InnerAction& action) {
2955 WithArgs(const InnerAction& action) {
3150 const args_type& args GTEST_ATTRIBUTE_UNUSED_, \
3527 virtual return_type Perform(const args_type& args) {\
3535 return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
3538 arg9_type arg9) const;\
3543 template <typename F> operator ::testing::Action<F>() const {\
3574 GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
3588 virtual return_type Perform(const args_type& args) {\
3596 return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
3599 arg9_type arg9) const;\
3603 template <typename F> operator ::testing::Action<F>() const {\
3619 GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
3634 virtual return_type Perform(const args_type& args) {\
3642 return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
3645 arg9_type arg9) const;\
3650 template <typename F> operator ::testing::Action<F>() const {\
3669 const
3686 virtual return_type Perform(const args_type& args) {\
3694 return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
3697 arg9_type arg9) const;\
3703 template <typename F> operator ::testing::Action<F>() const {\
3724 GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
3741 virtual return_type Perform(const args_type& args) {\
3749 return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
3752 arg9_type arg9) const;\
3759 template <typename F> operator ::testing::Action<F>() const {\
3782 GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
3802 virtual return_type Perform(const args_type& args) {\
3810 return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
3813 arg9_type arg9) const;\
3821 template <typename F> operator ::testing::Action<F>() const {\
3849 GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
3870 virtual return_type Perform(const args_type& args) {\
3878 return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
3881 arg9_type arg9) const;\
3890 template <typename F> operator ::testing::Action<F>() const {\
3919 GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
3941 virtual return_type Perform(const args_type& args) {\
3949 return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
3952 arg9_type arg9) const;\
3962 template <typename F> operator ::testing::Action<F>() const {\
3992 GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
4016 virtual return_type Perform(const args_type& args) {\
4024 return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
4027 const;\
4038 template <typename F> operator ::testing::Action<F>() const {\
4073 GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
4099 virtual return_type Perform(const args_type& args) {\
4107 return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
4110 arg9_type arg9) const;\
4122 template <typename F> operator ::testing::Action<F>() const {\
4160 GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
4187 virtual return_type Perform(const args_type& args) {\
4195 return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
4198 arg9_type arg9) const;\
4211 template <typename F> operator ::testing::Action<F>() const {\
4251 GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
4279 virtual return_type Perform(const args_type& args) {\
4287 return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
4290 arg9_type arg9) const;\
4304 template <typename F> operator ::testing::Action<F>() const {\
4347 GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
4381 // argument of the mock function takes a const string&, the action
4733 // bool InterestedInWhy(bool result) const;
4747 MatchResultListener& operator<<(const T& x) {
4760 bool IsInterested() const { return stream_ != NULL; }
4763 ::std::ostream* const stream_;
4782 virtual void DescribeTo(::std::ostream* os) const = 0;
4790 virtual void DescribeNegationTo(::std::ostream* os) const {
4832 virtual bool MatchAndExplain(T x, MatchResultListener* listener) const = 0;
4835 // virtual void DescribeTo(::std::ostream* os) const = 0;
4836 // virtual void DescribeNegationTo(::std::ostream* os) const;
4845 internal::string str() const { return ss_.str(); }
4887 bool MatchAndExplain(T x, MatchResultListener* listener) const {
4892 bool Matches(T x) const {
4898 void DescribeTo(::std::ostream* os) const { impl_->DescribeTo(os); }
4901 void DescribeNegationTo(::std::ostream* os) const {
4906 void ExplainMatchResultTo(T x, ::std::ostream* os) const {
4914 const MatcherDescriberInterface* GetDescriber() const {
4922 explicit MatcherBase(const MatcherInterface<T>* impl)
4939 ::testing::internal::linked_ptr<const MatcherInterface<T> > impl_;
4946 // implementation of Matcher<T> is just a linked_ptr to const
4958 explicit Matcher(const MatcherInterface<T>* impl)
4970 class GTEST_API_ Matcher<const internal::string&>
4971 : public internal::MatcherBase<const internal::string&> {
4975 explicit Matcher(const MatcherInterface<const internal::string&>* impl)
4976 : internal::MatcherBase<const internal::string&>(impl) {}
4980 Matcher(const internal::string& s); // NOLINT
4983 Matcher(const char* s); // NOLINT
4992 explicit Matcher(const MatcherInterface<internal::string>* impl)
4997 Matcher(const internal::string& s); // NOLINT
5000 Matcher(const char* s); // NOLINT
5008 class GTEST_API_ Matcher<const StringPiece&>
5009 : public internal::MatcherBase<const StringPiece&> {
5013 explicit Matcher(const MatcherInterface<const StringPiece&>* impl)
5014 : internal::MatcherBase<const StringPiece&>(impl) {}
5018 Matcher(const internal::string& s); // NOLINT
5021 Matcher(const char* s); // NOLINT
5033 explicit Matcher(const MatcherInterface<StringPiece>* impl)
5038 Matcher(const internal::string& s); // NOLINT
5041 Matcher(const char* s); // NOLINT
5056 // bool MatchAndExplain(const Value& value,
5057 // MatchResultListener* listener) const;
5063 explicit PolymorphicMatcher(const Impl& an_impl) : impl_(an_impl) {}
5071 const Impl& impl() const { return impl_; }
5074 operator Matcher<T>() const {
5082 explicit MonomorphicImpl(const Impl& impl) : impl_(impl) {}
5084 virtual void DescribeTo(::std::ostream* os) const {
5088 virtual void DescribeNegationTo(::std::ostream* os) const {
5092 virtual bool MatchAndExplain(T x, MatchResultListener* listener) const {
5097 const Impl impl_;
5113 // Matcher<const string&>(foo);
5115 inline Matcher<T> MakeMatcher(const MatcherInterface<T>* impl) {
5127 inline PolymorphicMatcher<Impl> MakePolymorphicMatcher(const Impl& impl) {
5196 static Matcher<T> Cast(const Matcher<U>& source_matcher) {
5203 explicit Impl(const Matcher<U>& source_matcher)
5207 virtual bool MatchAndExplain(T x, MatchResultListener* listener) const {
5211 virtual void DescribeTo(::std::ostream* os) const {
5215 virtual void DescribeNegationTo(::std::ostream* os) const {
5220 const Matcher<U> source_matcher_;
5231 static Matcher<T> Cast(const Matcher<T>& matcher) { return matcher; }
5250 // template <T, U> ... (const Matcher<U>&)
5272 static inline Matcher<T> Cast(const Matcher<U>& matcher) {
5285 const bool kTIsOther = GMOCK_KIND_OF_(RawT) == internal::kOther;
5286 const bool kUIsOther = GMOCK_KIND_OF_(RawU) == internal::kOther;
5296 inline Matcher<T> SafeMatcherCast(const M& polymorphic_matcher) {
5309 inline void PrintIfNotEmpty(const internal::string& explanation,
5319 inline bool IsReadableTypeName(const string& type_name) {
5329 // Value cannot be passed by const reference, because some matchers take a
5330 // non-const argument.
5332 bool MatchPrintAndExplain(Value& value, const Matcher<T>& matcher,
5341 const bool match = matcher.MatchAndExplain(value, &inner_listener);
5345 const string& type_name = GetTypeName<Value>();
5363 static bool Matches(const MatcherTuple& matcher_tuple,
5364 const ValueTuple& value_tuple) {
5375 static void ExplainMatchFailuresTo(const MatcherTuple& matchers,
5376 const ValueTuple& values,
5414 static bool Matches(const MatcherTuple& /* matcher_tuple */,
5415 const ValueTuple& /* value_tuple */) {
5420 static void ExplainMatchFailuresTo(const MatcherTuple& /* matchers */,
5421 const ValueTuple& /* values */,
5431 bool TupleMatches(const MatcherTuple& matcher_tuple,
5432 const ValueTuple& value_tuple) {
5446 void ExplainMatchFailureTupleTo(const MatcherTuple& matchers,
5447 const ValueTuple& values,
5466 static OutIter Run(Func f, const Tuple& t, OutIter out) {
5473 OutIter operator() (Func f, const Tup& t, OutIter out) const {
5480 OutIter operator() (Func /* f */, const Tup& /* t */, OutIter out) const {
5490 OutIter TransformTupleValues(Func f, const Tuple& t, OutIter out) {
5499 T /* x */, MatchResultListener* /* listener */) const { return true; }
5500 virtual void DescribeTo(::std::ostream* os) const { *os << "is anything"; }
5501 virtual void DescribeNegationTo(::std::ostream* os) const {
5516 operator Matcher<T>() const { return A<T>(); }
5531 // a "bare" type (i.e. neither 'const T' nor 'T&').
5536 explicit name##Matcher(const Rhs& rhs) : rhs_(rhs) {} \
5538 operator Matcher<Lhs>() const { \
5545 explicit Impl(const Rhs& rhs) : rhs_(rhs) {} \
5547 Lhs lhs, MatchResultListener* /* listener */) const { \
5550 virtual void DescribeTo(::std::ostream* os) const { \
5554 virtual void DescribeNegationTo(::std::ostream* os) const { \
5582 bool MatchAndExplain(const Pointer& p,
5583 MatchResultListener* /* listener */) const {
5587 void DescribeTo(::std::ostream* os) const { *os << "is NULL"; }
5588 void DescribeNegationTo(::std::ostream* os) const {
5598 bool MatchAndExplain(const Pointer& p,
5599 MatchResultListener* /* listener */) const {
5603 void DescribeTo(::std::ostream* os) const { *os << "isn't NULL"; }
5604 void DescribeNegationTo(::std::ostream* os) const {
5628 // mocking any function types, including those that take non-const
5630 // Super below) can be instantiated to either a const type or a
5631 // non-const type.
5633 // RefMatcher() takes a T& instead of const T&, as we want the
5635 // non-const reference.
5639 operator Matcher<Super&>() const {
5643 // non-const reference, as you cannot implicitly convert a const
5644 // reference to a non-const reference.
5654 // MatchAndExplain() takes a Super& (as opposed to const Super&)
5657 Super& x, MatchResultListener* listener) const {
5658 *listener << "which is located @" << static_cast<const void*>(&x);
5662 virtual void DescribeTo(::std::ostream* os) const {
5667 virtual void DescribeNegationTo(::std::ostream* os) const {
5673 const Super& object_;
5684 inline bool CaseInsensitiveCStringEquals(const char* lhs, const char* rhs) {
5688 inline bool CaseInsensitiveCStringEquals(const wchar_t* lhs,
5689 const wchar_t* rhs) {
5696 bool CaseInsensitiveStringEquals(const StringType& s1,
5697 const StringType& s2) {
5704 const typename StringType::value_type nul = 0;
5705 const size_t i1 = s1.find(nul), i2 = s2.find(nul);
5722 StrEqualityMatcher(const StringType& str, bool expect_eq,
5727 // const char*
5729 // const wchar_t*
5732 bool MatchAndExplain(CharType* s, MatchResultListener* listener) const {
5741 const StringType&,
5744 bool MatchAndExplain(const MatcheeStringType& s,
5745 MatchResultListener* /* listener */) const {
5746 const StringType& s2(s);
5747 const bool eq = case_sensitive_ ? s2 == string_ :
5752 void DescribeTo(::std::ostream* os) const {
5756 void DescribeNegationTo(::std::ostream* os) const {
5761 void DescribeToHelper(bool expect_eq, ::std::ostream* os) const {
5770 const StringType string_;
5771 const bool expect_eq_;
5772 const bool case_sensitive_;
5783 explicit HasSubstrMatcher(const StringType& substring)
5787 // const char*
5789 // const wchar_t*
5792 bool MatchAndExplain(CharType* s, MatchResultListener* listener) const {
5798 // This is a template, not just a plain function with const StringType&,
5801 bool MatchAndExplain(const MatcheeStringType& s,
5802 MatchResultListener* /* listener */) const {
5803 const StringType& s2(s);
5808 void DescribeTo(::std::ostream* os) const {
5813 void DescribeNegationTo(::std::ostream* os) const {
5819 const StringType substring_;
5830 explicit StartsWithMatcher(const StringType& prefix) : prefix_(prefix) {
5834 // const char*
5836 // const wchar_t*
5839 bool MatchAndExplain(CharType* s, MatchResultListener* listener) const {
5845 // This is a template, not just a plain function with const StringType&,
5848 bool MatchAndExplain(const MatcheeStringType& s,
5849 MatchResultListener* /* listener */) const {
5850 const StringType& s2(s);
5855 void DescribeTo(::std::ostream* os) const {
5860 void DescribeNegationTo(::std::ostream* os) const {
5866 const StringType prefix_;
5877 explicit EndsWithMatcher(const StringType& suffix) : suffix_(suffix) {}
5880 // const char*
5882 // const wchar_t*
5885 bool MatchAndExplain(CharType* s, MatchResultListener* listener) const {
5891 // This is a template, not just a plain function with const StringType&,
5894 bool MatchAndExplain(const MatcheeStringType& s,
5895 MatchResultListener* /* listener */) const {
5896 const StringType& s2(s);
5901 void DescribeTo(::std::ostream* os) const {
5906 void DescribeNegationTo(::std::ostream* os) const {
5912 const StringType suffix_;
5922 MatchesRegexMatcher(const RE* regex, bool full_match)
5926 // const char*
5928 // const wchar_t*
5931 bool MatchAndExplain(CharType* s, MatchResultListener* listener) const {
5937 // This is a template, not just a plain function with const internal::string&,
5940 bool MatchAndExplain(const MatcheeStringType& s,
5941 MatchResultListener* /* listener */) const {
5942 const internal::string& s2(s);
5947 void DescribeTo(::std::ostream* os) const {
5953 void DescribeNegationTo(::std::ostream* os) const {
5960 const internal::linked_ptr<const RE> regex_;
5961 const bool full_match_;
5971 // used to match a tuple<int, short>, a tuple<const long&, double>,
5981 operator Matcher< ::std::tr1::tuple<T1, T2> >() const { \
5985 operator Matcher<const ::std::tr1::tuple<T1, T2>&>() const { \
5986 return MakeMatcher(new Impl<const ::std::tr1::tuple<T1, T2>&>); \
5994 MatchResultListener* /* listener */) const { \
5997 virtual void DescribeTo(::std::ostream* os) const { \
6000 virtual void DescribeNegationTo(::std::ostream* os) const { \
6027 explicit NotMatcherImpl(const Matcher<T>& matcher)
6030 virtual bool MatchAndExplain(T x, MatchResultListener* listener) const {
6034 virtual void DescribeTo(::std::ostream* os) const {
6038 virtual void DescribeNegationTo(::std::ostream* os) const {
6043 const Matcher<T> matcher_;
6058 operator Matcher<T>() const {
6075 BothOfMatcherImpl(const Matcher<T>& matcher1, const Matcher<T>& matcher2)
6078 virtual void DescribeTo(::std::ostream* os) const {
6086 virtual void DescribeNegationTo(::std::ostream* os) const {
6094 virtual bool MatchAndExplain(T x, MatchResultListener* listener) const {
6110 const internal::string s1 = listener1.str();
6111 const internal::string s2 = listener2.str();
6125 const Matcher<T> matcher1_;
6126 const Matcher<T> matcher2_;
6148 static ListType BuildList(const Head& matcher, const Tail&... tail) {
6157 static Matcher<T> CreateMatcher(const ListType& matchers) {
6171 static ListType BuildList(const Matcher1& matcher1,
6172 const Matcher2& matcher2) {
6177 static Matcher<T> CreateMatcher(const ListType& matchers) {
6191 VariadicMatcher(const Args&... matchers) // NOLINT
6198 operator Matcher<T>() const {
6206 const typename MatcherListType::ListType matchers_;
6228 operator Matcher<T>() const {
6247 EitherOfMatcherImpl(const Matcher<T>& matcher1, const Matcher<T>& matcher2)
6250 virtual void DescribeTo(::std::ostream* os) const {
6258 virtual void DescribeNegationTo(::std::ostream* os) const {
6266 virtual bool MatchAndExplain(T x, MatchResultListener* listener) const {
6282 const internal::string s1 = listener1.str();
6283 const internal::string s2 = listener2.str();
6297 const Matcher<T> matcher1_;
6298 const Matcher<T> matcher2_;
6323 operator Matcher<T>() const {
6348 MatchResultListener* /* listener */) const {
6360 void DescribeTo(::std::ostream* os) const {
6364 void DescribeNegationTo(::std::ostream* os) const {
6388 bool operator()(const T& x) const {
6395 // compile when matcher_ has type Matcher<const T&>; if we write
6396 // Matcher<const T&>(matcher_).Matches(x) here, it won't compile
6401 // MatcherCast<const T&>() is necessary for making the code work
6403 return MatcherCast<const T&>(matcher_).Matches(x);
6417 explicit PredicateFormatterFromMatcher(const M& m) : matcher_(m) {}
6423 AssertionResult operator()(const char* value_text, const T& x) const {
6424 // We convert matcher_ to a Matcher<const T&> *now* instead of
6430 // We write SafeMatcherCast<const T&>(matcher_) instead of
6431 // Matcher<const T&>(matcher_), as the latter won't compile when
6433 // We don't write MatcherCast<const T&> either, as that allows
6435 const Matcher<const T&> matcher = SafeMatcherCast<const T&>(matcher_);
6449 const M matcher_;
6459 MakePredicateFormatterFromMatcher(const M& matcher) {
6497 MatchResultListener* /* listener */) const {
6498 const FloatingPoint<FloatType> lhs(value), rhs(rhs_);
6519 virtual void DescribeTo(::std::ostream* os) const {
6523 const ::std::streamsize old_precision = os->precision(
6540 virtual void DescribeNegationTo(::std::ostream* os) const {
6542 const ::std::streamsize old_precision = os->precision(
6561 bool HasMaxAbsError() const {
6565 const FloatType rhs_;
6566 const bool nan_eq_nan_;
6568 const FloatType max_abs_error_;
6575 // Matcher<const float&>, or a Matcher<float&>, but nothing else.
6577 // by non-const reference, we may see them in code not conforming to
6579 operator Matcher<FloatType>() const {
6583 operator Matcher<const FloatType&>() const {
6585 new Impl<const FloatType&>(rhs_, nan_eq_nan_, max_abs_error_));
6588 operator Matcher<FloatType&>() const {
6593 const FloatType rhs_;
6594 const bool nan_eq_nan_;
6596 const FloatType max_abs_error_;
6606 explicit PointeeMatcher(const InnerMatcher& matcher) : matcher_(matcher) {}
6617 operator Matcher<Pointer>() const {
6629 explicit Impl(const InnerMatcher& matcher)
6630 : matcher_(MatcherCast<const Pointee&>(matcher)) {}
6632 virtual void DescribeTo(::std::ostream* os) const {
6637 virtual void DescribeNegationTo(::std::ostream* os) const {
6643 MatchResultListener* listener) const {
6652 const Matcher<const Pointee&> matcher_;
6657 const InnerMatcher matcher_;
6668 const Matcher<const FieldType&>& matcher)
6671 void DescribeTo(::std::ostream* os) const {
6676 void DescribeNegationTo(::std::ostream* os) const {
6682 bool MatchAndExplain(const T& value, MatchResultListener* listener) const {
6693 bool MatchAndExplainImpl(false_type /* is_not_pointer */, const Class& obj,
6694 MatchResultListener* listener) const {
6699 bool MatchAndExplainImpl(true_type /* is_pointer */, const Class* p,
6700 MatchResultListener* listener) const {
6711 const FieldType Class::*field_;
6712 const Matcher<const FieldType&> matcher_;
6722 // The property may have a reference type, so 'const PropertyType&'
6728 PropertyMatcher(PropertyType (Class::*property)() const,
6729 const Matcher<RefToConstProperty>& matcher)
6732 void DescribeTo(::std::ostream* os) const {
6737 void DescribeNegationTo(::std::ostream* os) const {
6743 bool MatchAndExplain(const T&value, MatchResultListener* listener) const {
6754 bool MatchAndExplainImpl(false_type /* is_not_pointer */, const Class& obj,
6755 MatchResultListener* listener) const {
6758 // which takes a non-const reference as argument.
6763 bool MatchAndExplainImpl(true_type /* is_pointer */, const Class* p,
6764 MatchResultListener* listener) const {
6775 PropertyType (Class::*property_)() const;
6776 const Matcher<RefToConstProperty> matcher_;
6818 ResultOfMatcher(Callable callable, const Matcher<ResultType>& matcher)
6824 operator Matcher<T>() const {
6834 Impl(CallableStorageType callable, const Matcher<ResultType>& matcher)
6837 virtual void DescribeTo(::std::ostream* os) const {
6842 virtual void DescribeNegationTo(::std::ostream* os) const {
6847 virtual bool MatchAndExplain(T obj, MatchResultListener* listener) const {
6850 // MatchPrintAndExplain, which takes a non-const reference as argument.
6857 // Functors often define operator() as non-const method even though
6859 // 'this' is a const pointer. It's the user's responsibility not to
6863 const Matcher<ResultType> matcher_;
6868 const CallableStorageType callable_;
6869 const Matcher<ResultType> matcher_;
6878 explicit SizeIsMatcher(const SizeMatcher& size_matcher)
6883 operator Matcher<Container>() const {
6893 explicit Impl(const SizeMatcher& size_matcher)
6896 virtual void DescribeTo(::std::ostream* os) const {
6900 virtual void DescribeNegationTo(::std::ostream* os) const {
6906 MatchResultListener* listener) const {
6909 const bool result = size_matcher_.MatchAndExplain(size, &size_listener);
6917 const Matcher<SizeType> size_matcher_;
6922 const SizeMatcher size_matcher_;
6945 explicit ContainerEqMatcher(const Container& rhs) : rhs_(View::Copy(rhs)) {
6947 // with a const or reference type.
6952 void DescribeTo(::std::ostream* os) const {
6956 void DescribeNegationTo(::std::ostream* os) const {
6962 bool MatchAndExplain(const LhsContainer& lhs,
6963 MatchResultListener* listener) const {
6965 // that causes LhsContainer to be a const type sometimes.
6973 ::std::ostream* const os = listener->stream();
7015 const StlContainer rhs_;
7023 bool operator()(const T& lhs, const U& rhs) const { return lhs < rhs; }
7030 WhenSortedByMatcher(const Comparator& comparator,
7031 const ContainerMatcher& matcher)
7035 operator Matcher<LhsContainer>() const {
7046 // Transforms std::pair<const Key, Value> into std::pair<Key, Value>
7051 Impl(const Comparator& comparator, const ContainerMatcher& matcher)
7054 virtual void DescribeTo(::std::ostream* os) const {
7059 virtual void DescribeNegationTo(::std::ostream* os) const {
7065 MatchResultListener* listener) const {
7083 const bool match = matcher_.MatchAndExplain(sorted_container,
7090 const Comparator comparator_;
7091 const Matcher<const ::std::vector<LhsValue>&> matcher_;
7097 const Comparator comparator_;
7098 const ContainerMatcher matcher_;
7104 // must be able to be safely cast to Matcher<tuple<const T1&, const
7116 PointwiseMatcher(const TupleMatcher& tuple_matcher, const RhsContainer& rhs)
7119 // with a const or reference type.
7125 operator Matcher<LhsContainer>() const {
7141 typedef ::std::tr1::tuple<const LhsValue&, const RhsValue&> InnerMatcherArg;
7143 Impl(const TupleMatcher& tuple_matcher, const RhsStlContainer& rhs)
7148 virtual void DescribeTo(::std::ostream* os) const {
7155 const {
7165 MatchResultListener* listener) const {
7167 const size_t actual_size = lhs_stl_container.size();
7176 const InnerMatcherArg value_pair(*left, *right);
7200 const Matcher<InnerMatcherArg> mono_tuple_matcher_;
7201 const RhsStlContainer rhs_;
7207 const TupleMatcher tuple_matcher_;
7208 const RhsStlContainer rhs_;
7226 testing::SafeMatcherCast<const Element&>(inner_matcher)) {}
7233 MatchResultListener* listener) const {
7239 const bool matches = inner_matcher_.MatchAndExplain(*it, &inner_listener);
7252 const Matcher<const Element&> inner_matcher_;
7267 virtual void DescribeTo(::std::ostream* os) const {
7272 virtual void DescribeNegationTo(::std::ostream* os) const {
7278 MatchResultListener* listener) const {
7296 virtual void DescribeTo(::std::ostream* os) const {
7301 virtual void DescribeNegationTo(::std::ostream* os) const {
7307 MatchResultListener* listener) const {
7322 operator Matcher<Container>() const {
7327 const M inner_matcher_;
7339 operator Matcher<Container>() const {
7344 const M inner_matcher_;
7362 testing::SafeMatcherCast<const KeyType&>(inner_matcher)) {
7367 MatchResultListener* listener) const {
7369 const bool match = inner_matcher_.MatchAndExplain(key_value.first,
7371 const internal::string explanation = inner_listener.str();
7379 virtual void DescribeTo(::std::ostream* os) const {
7385 virtual void DescribeNegationTo(::std::ostream* os) const {
7391 const Matcher<const KeyType&> inner_matcher_;
7403 operator Matcher<PairType>() const {
7408 const M matcher_for_key_;
7425 testing::SafeMatcherCast<const FirstType&>(first_matcher)),
7427 testing::SafeMatcherCast<const SecondType&>(second_matcher)) {
7431 virtual void DescribeTo(::std::ostream* os) const {
7439 virtual void DescribeNegationTo(::std::ostream* os) const {
7449 MatchResultListener* listener) const {
7476 void ExplainSuccess(const internal::string& first_explanation,
7477 const internal::string& second_explanation,
7478 MatchResultListener* listener) const {
7494 const Matcher<const FirstType&> first_matcher_;
7495 const Matcher<const SecondType&> second_matcher_;
7508 operator Matcher<PairType> () const {
7515 const FirstMatcher first_matcher_;
7516 const SecondMatcher second_matcher_;
7536 matchers_.push_back(MatcherCast<const Element&>(*first++));
7541 virtual void DescribeTo(::std::ostream* os) const {
7560 virtual void DescribeNegationTo(::std::ostream* os) const {
7577 MatchResultListener* listener) const {
7581 const bool listener_interested = listener->IsInterested();
7643 const internal::string& s = explanations[i];
7661 size_t count() const { return matchers_.size(); }
7663 ::std::vector<Matcher<const Element&> > matchers_;
7680 size_t LhsSize() const { return num_elements_; }
7681 size_t RhsSize() const { return num_matchers_; }
7682 bool HasEdge(size_t ilhs, size_t irhs) const {
7696 string DebugString() const;
7699 size_t SpaceIndex(size_t ilhs, size_t irhs) const {
7718 FindMaxBipartiteMatching(const MatchMatrix& g);
7720 GTEST_API_ bool FindPairing(const MatchMatrix& matrix,
7731 typedef ::std::vector<const MatcherDescriberInterface*> MatcherDescriberVec;
7734 void DescribeToImpl(::std::ostream* os) const;
7737 void DescribeNegationToImpl(::std::ostream* os) const;
7740 const ::std::vector<string>& element_printouts,
7741 const MatchMatrix& matrix,
7742 MatchResultListener* listener) const;
7776 matchers_.push_back(MatcherCast<const Element&>(*first));
7782 virtual void DescribeTo(::std::ostream* os) const {
7787 virtual void DescribeNegationTo(::std::ostream* os) const {
7792 MatchResultListener* listener) const {
7800 const size_t actual_count = matrix.LhsSize();
7821 typedef ::std::vector<Matcher<const Element&> > MatcherVec;
7826 MatchResultListener* listener) const {
7859 Matcher<Target> operator()(const Arg& a) const {
7868 explicit UnorderedElementsAreMatcher(const MatcherTuple& args)
7872 operator Matcher<Container>() const {
7876 typedef ::std::vector<Matcher<const Element&> > MatcherVec;
7879 TransformTupleValues(CastAndAppendTransform<const Element&>(), matchers_,
7886 const MatcherTuple matchers_;
7894 explicit ElementsAreMatcher(const MatcherTuple& args) : matchers_(args) {}
7897 operator Matcher<Container>() const {
7901 typedef ::std::vector<Matcher<const Element&> > MatcherVec;
7904 TransformTupleValues(CastAndAppendTransform<const Element&>(), matchers_,
7911 const MatcherTuple matchers_;
7926 operator Matcher<Container>() const {
7946 operator Matcher<Container>() const {
7952 const ::std::vector<T> matchers_;
7963 const char* matcher_name,
7964 const Strings& param_values);
7993 const T* pointer, size_t count) {
7999 const T (&array)[N]) {
8005 const ::std::vector<T, A>& vec) {
8035 UnorderedElementsAreArray(const T* pointer, size_t count) {
8041 UnorderedElementsAreArray(const T (&array)[N]) {
8047 UnorderedElementsAreArray(const ::std::vector<T, A>& vec) {
8068 const internal::AnythingMatcher _ = {};
8078 // Note: if the parameter of Eq() were declared as const T&, Eq("foo")
8101 inline Matcher<Lhs> TypedEq(const Rhs& rhs) { return Eq(rhs); }
8212 const InnerMatcher& inner_matcher) {
8223 FieldType Class::*field, const FieldMatcher& matcher) {
8226 field, MatcherCast<const FieldType&>(matcher)));
8240 PropertyType (Class::*property)() const, const PropertyMatcher& matcher) {
8266 Callable callable, const ResultOfMatcher& matcher) {
8281 StrEq(const internal::string& str) {
8288 StrNe(const internal::string& str) {
8295 StrCaseEq(const internal::string& str) {
8302 StrCaseNe(const internal::string& str) {
8310 HasSubstr(const internal::string& substring) {
8317 StartsWith(const internal::string& prefix) {
8324 EndsWith(const internal::string& suffix) {
8332 const internal::RE* regex) {
8336 const internal::string& regex) {
8343 const internal::RE* regex) {
8347 const internal::string& regex) {
8356 StrEq(const internal::wstring& str) {
8363 StrNe(const internal::wstring& str) {
8370 StrCaseEq(const internal::wstring& str) {
8377 StrCaseNe(const internal::wstring& str) {
8385 HasSubstr(const internal::wstring& substring) {
8392 StartsWith(const internal::wstring& prefix) {
8399 EndsWith(const internal::wstring& suffix) {
8454 SizeIs(const SizeMatcher& size_matcher) {
8465 ContainerEq(const Container& rhs) {
8467 // which causes Container to be a const type sometimes.
8477 WhenSortedBy(const Comparator& comparator,
8478 const ContainerMatcher& container_matcher) {
8487 WhenSorted(const ContainerMatcher& container_matcher) {
8496 // TupleMatcher must be able to be safely cast to Matcher<tuple<const
8497 // T1&, const T2&> >, where T1 and T2 are the types of elements in the
8502 Pointwise(const TupleMatcher& tuple_matcher, const Container& rhs) {
8504 // which causes Container to be a const type sometimes.
8524 // Contains(::std::pair<const int, size_t>(1, 100)));
8526 // const char* user_ids[] = { "joe", "mike", "tom" };
8558 // const char* user_ids[] = { "joe", "mike", "tom" };
8594 inline bool Value(const T& value, M matcher) {
8602 M matcher, const T& value, MatchResultListener* listener) {
8603 return SafeMatcherCast<const T&>(matcher).MatchAndExplain(value, listener);
8610 inline internal::AllOfMatcher<Args...> AllOf(const Args&... matchers) {
8615 inline internal::AnyOfMatcher<Args...> AnyOf(const Args&... matchers) {
8629 inline InnerMatcher AllArgs(const InnerMatcher& matcher) { return matcher; }
8715 const void* untyped_args,
8716 const string& call_description) const = 0;
8722 const void* untyped_action,
8723 const void* untyped_args) const = 0;
8729 const void* untyped_args,
8730 ::std::ostream* os) const
8739 virtual const ExpectationBase* UntypedFindMatchingExpectation(
8740 const void* untyped_args,
8741 const void** untyped_action, bool* is_excessive,
8746 virtual void UntypedPrintArgs(const void* untyped_args,
8747 ::std::ostream* os) const = 0;
8754 void RegisterOwner(const void* mock_obj)
8760 void SetOwnerAndName(const void* mock_obj, const char* name)
8766 const void* MockObject() const
8771 const char* Name() const
8778 const UntypedActionResultHolderBase* UntypedInvokeWith(
8779 const void* untyped_args)
8783 typedef std::vector<const void*> UntypedOnCallSpecs;
8795 const void* mock_obj_; // Protected by g_gmock_mutex.
8799 const char* name_; // Protected by g_gmock_mutex.
8812 UntypedOnCallSpecBase(const char* a_file, int a_line)
8816 const char* file() const { return file_; }
8817 int line() const { return line_; }
8830 void AssertSpecProperty(bool property, const string& failure_message) const {
8835 void ExpectSpecProperty(bool property, const string& failure_message) const {
8839 const char* file_;
8856 OnCallSpec(const char* a_file, int a_line,
8857 const ArgumentMatcherTuple& matchers)
8863 // overloaded constructors of Matcher<const ArgumentTuple&>).
8864 extra_matcher_(A<const ArgumentTuple&>()) {
8868 OnCallSpec& With(const Matcher<const ArgumentTuple&>& m) {
8880 OnCallSpec& WillByDefault(const Action<F>& action) {
8893 bool Matches(const ArgumentTuple& args) const {
8898 const Action<F>& GetAction() const {
8920 Matcher<const ArgumentTuple&> extra_matcher_;
8941 static void AllowLeak(const void* mock_obj)
8975 static void AllowUninterestingCalls(const void* mock_obj)
8980 static void WarnUninterestingCalls(const void* mock_obj)
8985 static void FailUninterestingCalls(const void* mock_obj)
8990 static void UnregisterCallReaction(const void* mock_obj)
8996 const void* mock_obj)
9011 const void* mock_obj,
9019 const void* mock_obj, const char* file, int line)
9042 // - Constness is shallow: a const Expectation object itself cannot
9063 // Expectation objects, and needs to call the non-const Retire()
9065 // Expectation must receive a *non-const* reference to the
9073 bool operator==(const Expectation& rhs) const {
9077 bool operator!=(const Expectation& rhs) const { return !(*this == rhs); }
9094 bool operator()(const Expectation& lhs, const Expectation& rhs) const {
9102 const internal::linked_ptr<internal::ExpectationBase>& expectation_base);
9105 const internal::linked_ptr<internal::ExpectationBase>&
9106 expectation_base() const {
9129 // A bidirectional iterator that can read a const element in the set.
9148 ExpectationSet(const Expectation& e) { // NOLINT
9157 bool operator==(const ExpectationSet& rhs) const {
9161 bool operator!=(const ExpectationSet& rhs) const { return !(*this == rhs); }
9165 ExpectationSet& operator+=(const Expectation& e) {
9170 int size() const { return static_cast<int>(expectations_.size()); }
9172 const_iterator begin() const { return expectations_.begin(); }
9173 const_iterator end() const { return expectations_.end(); }
9190 void AddExpectation(const Expectation& expectation) const;
9257 ExpectationBase(const char* file, int line, const string& source_text);
9262 const char* file() const { return file_; }
9263 int line() const { return line_; }
9264 const char* source_text() const { return source_text_.c_str(); }
9266 const Cardinality& cardinality() const { return cardinality_; }
9269 void DescribeLocationTo(::std::ostream* os) const {
9275 void DescribeCallCountTo(::std::ostream* os) const
9298 typedef std::vector<const void*> UntypedActions;
9305 void AssertSpecProperty(bool property, const string& failure_message) const {
9310 void ExpectSpecProperty(bool property, const string& failure_message) const {
9316 void SpecifyCardinality(const Cardinality& cardinality);
9320 bool cardinality_specified() const { return cardinality_specified_; }
9323 void set_cardinality(const Cardinality& a_cardinality) {
9336 bool is_retired() const
9350 bool IsSatisfied() const
9357 bool IsSaturated() const
9364 bool IsOverSaturated() const
9371 bool AllPrerequisitesAreSatisfied() const
9375 void FindUnsatisfiedPrerequisites(ExpectationSet* result) const
9379 int call_count() const
9396 void CheckActionCountIfNotDone() const
9406 void UntypedTimes(const Cardinality& a_cardinality);
9410 const char* file_; // The file that contains the expectation.
9412 const string source_text_; // The EXPECT_CALL(...) source text.
9448 const char* a_file, int a_line, const string& a_source_text,
9449 const ArgumentMatcherTuple& m)
9456 // overloaded constructors of Matcher<const ArgumentTuple&>).
9457 extra_matcher_(A<const ArgumentTuple&>()),
9466 delete static_cast<const Action<F>*>(*it);
9471 TypedExpectation& With(const Matcher<const ArgumentTuple&>& m) {
9489 TypedExpectation& Times(const Cardinality& a_cardinality) {
9500 TypedExpectation& InSequence(const Sequence& s) {
9510 TypedExpectation& InSequence(const Sequence& s1, const Sequence& s2) {
9513 TypedExpectation& InSequence(const Sequence& s1, const Sequence& s2,
9514 const Sequence& s3) {
9517 TypedExpectation& InSequence(const Sequence& s1, const Sequence& s2,
9518 const Sequence& s3, const Sequence& s4) {
9521 TypedExpectation& InSequence(const Sequence& s1, const Sequence& s2,
9522 const Sequence& s3, const Sequence& s4,
9523 const Sequence& s5) {
9528 TypedExpectation& After(const ExpectationSet& s) {
9540 TypedExpectation& After(const ExpectationSet& s1, const ExpectationSet& s2) {
9543 TypedExpectation& After(const ExpectationSet& s1, const ExpectationSet& s2,
9544 const ExpectationSet& s3) {
9547 TypedExpectation& After(const ExpectationSet& s1, const ExpectationSet& s2,
9548 const ExpectationSet& s3, const ExpectationSet& s4) {
9551 TypedExpectation& After(const ExpectationSet& s1, const ExpectationSet& s2,
9552 const ExpectationSet& s3, const ExpectationSet& s4,
9553 const ExpectationSet& s5) {
9558 TypedExpectation& WillOnce(const Action<F>& action) {
9572 TypedExpectation& WillRepeatedly(const Action<F>& action) {
9612 const ArgumentMatcherTuple& matchers() const {
9617 const Matcher<const ArgumentTuple&>& extra_matcher() const {
9622 const Action<F>& repeated_action() const { return repeated_action_; }
9649 bool Matches(const ArgumentTuple& args) const
9656 bool ShouldHandleArguments(const ArgumentTuple& args) const
9671 const ArgumentTuple& args,
9672 ::std::ostream* os) const
9715 const Action<F>& GetCurrentAction(
9716 const FunctionMockerBase<F>* mocker,
9717 const ArgumentTuple& args) const
9720 const int count = call_count();
9725 const int action_count = static_cast<int>(untyped_actions_.size());
9741 *static_cast<const Action<F>*>(untyped_actions_[count - 1]) :
9749 // Mock does it to 'why'. This method is not const as it calls
9752 const Action<F>* GetActionForArguments(
9753 const FunctionMockerBase<F>* mocker,
9754 const ArgumentTuple& args,
9786 FunctionMockerBase<F>* const owner_;
9788 Matcher<const ArgumentTuple&> extra_matcher_;
9806 const char* file, int line,
9807 const string& message);
9824 const char* file, int line, const char* obj, const char* call) {
9833 const char* file, int line, const char* obj, const char* call) {
9834 const string source_text(string("EXPECT_CALL(") + obj + ", " + call + ")");
9844 void SetMatchers(const ArgumentMatcherTuple& matchers) {
9849 internal::FunctionMockerBase<F>* const function_mocker_;
9880 virtual void PrintAsActionResult(::std::ostream* os) const = 0;
9893 T GetValueAndDelete() const {
9900 virtual void PrintAsActionResult(::std::ostream* os) const {
9910 const FunctionMockerBase<F>* func_mocker,
9911 const typename Function<F>::ArgumentTuple& args,
9912 const string& call_description) {
9921 PerformAction(const Action<F>& action,
9922 const typename Function<F>::ArgumentTuple& args) {
9937 void GetValueAndDelete() const { delete this; }
9939 virtual void PrintAsActionResult(::std::ostream* /* os */) const {}
9944 const FunctionMockerBase<F>* func_mocker,
9945 const typename Function<F>::ArgumentTuple& args,
9946 const string& call_description) {
9954 const Action<F>& action,
9955 const typename Function<F>::ArgumentTuple& args) {
9987 const OnCallSpec<F>* FindOnCallSpec(
9988 const ArgumentTuple& args) const {
9992 const OnCallSpec<F>* spec = static_cast<const OnCallSpec<F>*>(*it);
10007 Result PerformDefaultAction(const ArgumentTuple& args,
10008 const string& call_description) const {
10009 const OnCallSpec<F>* const spec =
10014 const string message = call_description +
10033 const void* untyped_args, // must point to an ArgumentTuple
10034 const string& call_description) const {
10035 const ArgumentTuple& args =
10036 *static_cast<const ArgumentTuple*>(untyped_args);
10045 const void* untyped_action, const void* untyped_args) const {
10048 const Action<F> action = *static_cast<const Action<F>*>(untyped_action);
10049 const ArgumentTuple& args =
10050 *static_cast<const ArgumentTuple*>(untyped_args);
10074 delete static_cast<const OnCallSpec<F>*>(*it);
10091 Result InvokeWith(const ArgumentTuple& args)
10093 const ResultHolder *rh = static_cast<const ResultHolder*>(
10100 const char* file, int line,
10101 const ArgumentMatcherTuple& m)
10104 OnCallSpec<F>* const on_call_spec = new OnCallSpec<F>(file, line, m);
10111 const char* file,
10113 const string& source_text,
10114 const ArgumentMatcherTuple& m)
10117 TypedExpectation<F>* const expectation =
10119 const linked_ptr<ExpectationBase> untyped_expectation(expectation);
10123 Sequence* const implicit_sequence = g_gmock_implicit_sequence.get();
10143 void DescribeDefaultActionTo(const ArgumentTuple& args,
10144 ::std::ostream* os) const {
10145 const OnCallSpec<F>* const spec = FindOnCallSpec(args);
10161 const void* untyped_args,
10162 ::std::ostream* os) const
10164 const ArgumentTuple& args =
10165 *static_cast<const ArgumentTuple*>(untyped_args);
10188 virtual const ExpectationBase* UntypedFindMatchingExpectation(
10189 const void* untyped_args,
10190 const void** untyped_action, bool* is_excessive,
10193 const ArgumentTuple& args =
10194 *static_cast<const ArgumentTuple*>(untyped_args);
10206 const Action<F>* action = exp->GetActionForArguments(this, args, what, why);
10214 virtual void UntypedPrintArgs(const void* untyped_args,
10215 ::std::ostream* os) const {
10216 const ArgumentTuple& args =
10217 *static_cast<const ArgumentTuple*>(untyped_args);
10224 const ArgumentTuple& args) const
10230 TypedExpectation<F>* const exp =
10241 const ArgumentTuple& args,
10243 ::std::ostream* why) const
10254 const ArgumentTuple& args,
10255 ::std::ostream* why) const
10258 const int count = static_cast<int>(untyped_expectations_.size());
10264 TypedExpectation<F>* const expectation =
10290 // MockFoo(const MockFoo& src) {}
10308 void ReportUninterestingCall(CallReaction reaction, const string& msg);
10319 // Const(x) is a convenient function for obtaining a const reference
10321 // const mock method, e.g.
10330 // // Expects a call to non-const MockFoo::Bar().
10332 // // Expects a call to const MockFoo::Bar().
10333 // EXPECT_CALL(Const(foo), Bar());
10335 inline const T& Const(const T& x) { return x; }
10399 MockSpec<F>& With(const Matcher<A1>& m1) {
10420 MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2) {
10441 MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
10442 const Matcher<A3>& m3) {
10463 MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
10464 const Matcher<A3>& m3, const Matcher<A4>& m4) {
10486 MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
10487 const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5) {
10510 MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
10511 const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5,
10512 const Matcher<A6>& m6) {
10535 MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
10536 const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5,
10537 const Matcher<A6>& m6, const Matcher<A7>& m7) {
10560 MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
10561 const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5,
10562 const Matcher<A6>& m6, const Matcher<A7>& m7, const Matcher<A8>& m8) {
10585 MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
10586 const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5,
10587 const Matcher<A6>& m6, const Matcher<A7>& m7, const Matcher<A8>& m8,
10588 const Matcher<A9>& m9) {
10612 MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
10613 const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5,
10614 const Matcher<A6>& m6, const Matcher<A7>& m7, const Matcher<A8>& m8,
10615 const Matcher<A9>& m9, const Matcher<A10>& m10) {
10657 const ::testing::Matcher<GMOCK_ARG_(tn, N, __VA_ARGS__)>&
10996 #define MOCK_CONST_METHOD0(m, ...) GMOCK_METHOD0_(, const, , m, __VA_ARGS__)
10997 #define MOCK_CONST_METHOD1(m, ...) GMOCK_METHOD1_(, const, , m, __VA_ARGS__)
10998 #define MOCK_CONST_METHOD2(m, ...) GMOCK_METHOD2_(, const, , m, __VA_ARGS__)
10999 #define MOCK_CONST_METHOD3(m, ...) GMOCK_METHOD3_(, const, , m, __VA_ARGS__)
11000 #define MOCK_CONST_METHOD4(m, ...) GMOCK_METHOD4_(, const, , m, __VA_ARGS__)
11001 #define MOCK_CONST_METHOD5(m, ...) GMOCK_METHOD5_(, const, , m, __VA_ARGS__)
11002 #define MOCK_CONST_METHOD6(m, ...) GMOCK_METHOD6_(, const, , m, __VA_ARGS__)
11003 #define MOCK_CONST_METHOD7(m, ...) GMOCK_METHOD7_(, const, , m, __VA_ARGS__)
11004 #define MOCK_CONST_METHOD8(m, ...) GMOCK_METHOD8_(, const, , m, __VA_ARGS__)
11005 #define MOCK_CONST_METHOD9(m, ...) GMOCK_METHOD9_(, const, , m, __VA_ARGS__)
11006 #define MOCK_CONST_METHOD10(m, ...) GMOCK_METHOD10_(, const, , m, __VA_ARGS__)
11021 GMOCK_METHOD0_(typename, const, , m, __VA_ARGS__)
11023 GMOCK_METHOD1_(typename, const, , m, __VA_ARGS__)
11025 GMOCK_METHOD2_(typename, const, , m, __VA_ARGS__)
11027 GMOCK_METHOD3_(typename, const, , m, __VA_ARGS__)
11029 GMOCK_METHOD4_(typename, const, , m, __VA_ARGS__)
11031 GMOCK_METHOD5_(typename, const, , m, __VA_ARGS__)
11033 GMOCK_METHOD6_(typename, const, , m, __VA_ARGS__)
11035 GMOCK_METHOD7_(typename, const, , m, __VA_ARGS__)
11037 GMOCK_METHOD8_(typename, const, , m, __VA_ARGS__)
11039 GMOCK_METHOD9_(typename, const, , m, __VA_ARGS__)
11041 GMOCK_METHOD10_(typename, const, , m, __VA_ARGS__)
11067 GMOCK_METHOD0_(, const, ct, m, __VA_ARGS__)
11069 GMOCK_METHOD1_(, const, ct, m, __VA_ARGS__)
11071 GMOCK_METHOD2_(, const, ct, m, __VA_ARGS__)
11073 GMOCK_METHOD3_(, const, ct, m, __VA_ARGS__)
11075 GMOCK_METHOD4_(, const, ct, m, __VA_ARGS__)
11077 GMOCK_METHOD5_(, const, ct, m, __VA_ARGS__)
11079 GMOCK_METHOD6_(, const, ct, m, __VA_ARGS__)
11081 GMOCK_METHOD7_(, const, ct, m, __VA_ARGS__)
11083 GMOCK_METHOD8_(, const, ct, m, __VA_ARGS__)
11085 GMOCK_METHOD9_(, const, ct, m, __VA_ARGS__)
11087 GMOCK_METHOD10_(, const, ct, m, __VA_ARGS__)
11113 GMOCK_METHOD0_(typename, const, ct, m, __VA_ARGS__)
11115 GMOCK_METHOD1_(typename, const, ct, m, __VA_ARGS__)
11117 GMOCK_METHOD2_(typename, const, ct, m, __VA_ARGS__)
11119 GMOCK_METHOD3_(typename, const, ct, m, __VA_ARGS__)
11121 GMOCK_METHOD4_(typename, const, ct, m, __VA_ARGS__)
11123 GMOCK_METHOD5_(typename, const, ct, m, __VA_ARGS__)
11125 GMOCK_METHOD6_(typename, const, ct, m, __VA_ARGS__)
11127 GMOCK_METHOD7_(typename, const, ct, m, __VA_ARGS__)
11129 GMOCK_METHOD8_(typename, const, ct, m, __VA_ARGS__)
11131 GMOCK_METHOD9_(typename, const, ct, m, __VA_ARGS__)
11133 GMOCK_METHOD10_(typename, const, ct, m, __VA_ARGS__)
11359 // where MockFoo has a constructor that accepts (int, const char*),
11371 // cannot have arguments passed by non-const reference, which are
11393 explicit NiceMock(const A1& a1) : MockClass(a1) {
11398 NiceMock(const A1& a1, const A2& a2) : MockClass(a1, a2) {
11404 NiceMock(const A1& a1, const A2& a2, const A3& a3) : MockClass(a1, a2, a3) {
11410 NiceMock(const A1& a1, const A2& a2, const A3& a3,
11411 const A4& a4) : MockClass(a1, a2, a3, a4) {
11417 NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
11418 const A5& a5) : MockClass(a1, a2, a3, a4, a5) {
11425 NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
11426 const A5& a5, const A6& a6) : MockClass(a1, a2, a3, a4, a5, a6) {
11433 NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
11434 const A5& a5, const A6& a6, const A7& a7) : MockClass(a1, a2, a3, a4, a5,
11442 NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
11443 const A5& a5, const A6& a6, const A7& a7, const A8& a8) : MockClass(a1,
11451 NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
11452 const A5& a5, const A6& a6, const A7& a7, const A8& a8,
11453 const A9& a9) : MockClass(a1, a2, a3, a4, a5, a6, a7, a8, a9) {
11460 NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
11461 const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9,
11462 const A10& a10) : MockClass(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) {
11489 explicit NaggyMock(const A1& a1) : MockClass(a1) {
11494 NaggyMock(const A1& a1, const A2& a2) : MockClass(a1, a2) {
11500 NaggyMock(const A1& a1, const A2& a2, const A3& a3) : MockClass(a1, a2, a3) {
11506 NaggyMock(const A1& a1, const A2& a2, const A3& a3,
11507 const A4& a4) : MockClass(a1, a2, a3, a4) {
11513 NaggyMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
11514 const A5& a5) : MockClass(a1, a2, a3, a4, a5) {
11521 NaggyMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
11522 const A5& a5, const A6& a6) : MockClass(a1, a2, a3, a4, a5, a6) {
11529 NaggyMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
11530 const A5& a5, const A6& a6, const A7& a7) : MockClass(a1, a2, a3, a4, a5,
11538 NaggyMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
11539 const A5& a5, const A6& a6, const A7& a7, const A8& a8) : MockClass(a1,
11547 NaggyMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
11548 const A5& a5, const A6& a6, const A7& a7, const A8& a8,
11549 const A9& a9) : MockClass(a1, a2, a3, a4, a5, a6, a7, a8, a9) {
11556 NaggyMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
11557 const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9,
11558 const A10& a10) : MockClass(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) {
11585 explicit StrictMock(const A1& a1) : MockClass(a1) {
11590 StrictMock(const A1& a1, const A2& a2) : MockClass(a1, a2) {
11596 StrictMock(const A1& a1, const A2& a2, const A3& a3) : MockClass(a1, a2, a3) {
11602 StrictMock(const A1& a1, const A2& a2, const A3& a3,
11603 const A4& a4) : MockClass(a1, a2, a3, a4) {
11609 StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
11610 const A5& a5) : MockClass(a1, a2, a3, a4, a5) {
11617 StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
11618 const A5& a5, const A6& a6) : MockClass(a1, a2, a3, a4, a5, a6) {
11625 StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
11626 const A5& a5, const A6& a6, const A7& a7) : MockClass(a1, a2, a3, a4, a5,
11634 StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
11635 const A5& a5, const A6& a6, const A7& a7, const A8& a8) : MockClass(a1,
11643 StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
11644 const A5& a5, const A6& a6, const A7& a7, const A8& a8,
11645 const A9& a9) : MockClass(a1, a2, a3, a4, a5, a6, a7, a8, a9) {
11652 StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
11653 const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9,
11654 const A10& a10) : MockClass(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) {
11778 static type GetSelectedFields(const Tuple& t) {
11791 static type GetSelectedFields(const Tuple& /* t */) {
11801 static type GetSelectedFields(const Tuple& t) {
11812 static type GetSelectedFields(const Tuple& t) {
11823 static type GetSelectedFields(const Tuple& t) {
11835 static type GetSelectedFields(const Tuple& t) {
11847 static type GetSelectedFields(const Tuple& t) {
11860 static type GetSelectedFields(const Tuple& t) {
11874 static type GetSelectedFields(const Tuple& t) {
11890 static type GetSelectedFields(const Tuple& t) {
11906 static type GetSelectedFields(const Tuple& t) {
11921 // ArgsTuple may have top-level const or reference modifiers.
11925 typedef Matcher<const SelectedArgs&> MonomorphicInnerMatcher;
11928 explicit ArgsMatcherImpl(const InnerMatcher& inner_matcher)
11929 : inner_matcher_(SafeMatcherCast<const SelectedArgs&>(inner_matcher)) {}
11932 MatchResultListener* listener) const {
11933 const SelectedArgs& selected_args = GetSelectedArgs(args);
11941 const bool match = inner_matcher_.MatchAndExplain(selected_args,
11947 virtual void DescribeTo(::std::ostream* os) const {
11953 virtual void DescribeNegationTo(::std::ostream* os) const {
11968 const int indices[10] = { k0, k1, k2, k3, k4, k5, k6, k7, k8, k9 };
11981 const MonomorphicInnerMatcher inner_matcher_;
11991 explicit ArgsMatcher(const InnerMatcher& inner_matcher)
11995 operator Matcher<ArgsTuple>() const {
12001 const InnerMatcher inner_matcher_;
12189 Args(const InnerMatcher& matcher) {
12195 Args(const InnerMatcher& matcher) {
12201 Args(const InnerMatcher& matcher) {
12207 Args(const InnerMatcher& matcher) {
12213 Args(const InnerMatcher& matcher) {
12219 Args(const InnerMatcher& matcher) {
12225 Args(const InnerMatcher& matcher) {
12232 Args(const InnerMatcher& matcher) {
12240 Args(const InnerMatcher& matcher) {
12248 Args(const InnerMatcher& matcher) {
12257 Args(const
12269 // to accept string literals, whose type is const char[N], but we
12270 // want to treat them as const char*.
12287 ElementsAre(const T1& e1) {
12298 ElementsAre(const T1& e1, const T2& e2) {
12311 ElementsAre(const T1& e1, const T2& e2, const T3& e3) {
12326 ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4) {
12343 ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
12344 const T5& e5) {
12364 ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
12365 const T5& e5, const T6& e6) {
12387 ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
12388 const T5& e5, const T6& e6, const T7& e7) {
12412 ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
12413 const T5& e5, const T6& e6, const T7& e7, const T8& e8) {
12440 ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
12441 const T5& e5, const T6& e6, const T7& e7, const T8& e8, const T9& e9) {
12470 ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
12471 const T5& e5, const T6& e6, const T7& e7, const T8& e8, const T9& e9,
12472 const T10& e10) {
12502 UnorderedElementsAre(const T1& e1) {
12513 UnorderedElementsAre(const T1& e1, const T2& e2) {
12526 UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3) {
12541 UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4) {
12558 UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
12559 const T5& e5) {
12579 UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
12580 const T5& e5, const T6& e6) {
12603 UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
12604 const T5& e5, const T6& e6, const T7& e7) {
12629 UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
12630 const T5& e5, const T6& e6, const T7& e7, const T8& e8) {
12657 UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
12658 const T5& e5, const T6& e6, const T7& e7, const T8& e8, const T9& e9) {
12687 UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
12688 const T5& e5, const T6& e6, const T7& e7, const T8& e8, const T9& e9,
12689 const T10& e10) {
13098 arg_type arg, ::testing::MatchResultListener* result_listener) const;\
13099 virtual void DescribeTo(::std::ostream* gmock_os) const {\
13102 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
13106 ::testing::internal::string FormatDescription(bool negation) const {\
13107 const ::testing::internal::string gmock_description = (description);\
13118 operator ::testing::Matcher<arg_type>() const {\
13134 const
13146 arg_type arg, ::testing::MatchResultListener* result_listener) const;\
13147 virtual void DescribeTo(::std::ostream* gmock_os) const {\
13150 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
13155 ::testing::internal::string FormatDescription(bool negation) const {\
13156 const ::testing::internal::string gmock_description = (description);\
13167 operator ::testing::Matcher<arg_type>() const {\
13186 const
13198 arg_type arg, ::testing::MatchResultListener* result_listener) const;\
13199 virtual void DescribeTo(::std::ostream* gmock_os) const {\
13202 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
13208 ::testing::internal::string FormatDescription(bool negation) const {\
13209 const ::testing::internal::string gmock_description = (description);\
13220 operator ::testing::Matcher<arg_type>() const {\
13243 const
13255 arg_type arg, ::testing::MatchResultListener* result_listener) const;\
13256 virtual void DescribeTo(::std::ostream* gmock_os) const {\
13259 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
13266 ::testing::internal::string FormatDescription(bool negation) const {\
13267 const ::testing::internal::string gmock_description = (description);\
13279 operator ::testing::Matcher<arg_type>() const {\
13303 const
13317 arg_type arg, ::testing::MatchResultListener* result_listener) const;\
13318 virtual void DescribeTo(::std::ostream* gmock_os) const {\
13321 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
13329 ::testing::internal::string FormatDescription(bool negation) const {\
13330 const ::testing::internal::string gmock_description = (description);\
13342 operator ::testing::Matcher<arg_type>() const {\
13372 const
13387 arg_type arg, ::testing::MatchResultListener* result_listener) const;\
13388 virtual void DescribeTo(::std::ostream* gmock_os) const {\
13391 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
13400 ::testing::internal::string FormatDescription(bool negation) const {\
13401 const ::testing::internal::string gmock_description = (description);\
13413 operator ::testing::Matcher<arg_type>() const {\
13445 const
13460 arg_type arg, ::testing::MatchResultListener* result_listener) const;\
13461 virtual void DescribeTo(::std::ostream* gmock_os) const {\
13464 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
13474 ::testing::internal::string FormatDescription(bool negation) const {\
13475 const ::testing::internal::string gmock_description = (description);\
13487 operator ::testing::Matcher<arg_type>() const {\
13520 const
13537 arg_type arg, ::testing::MatchResultListener* result_listener) const;\
13538 virtual void DescribeTo(::std::ostream* gmock_os) const {\
13541 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
13552 ::testing::internal::string FormatDescription(bool negation) const {\
13553 const ::testing::internal::string gmock_description = (description);\
13566 operator ::testing::Matcher<arg_type>() const {\
13604 const
13621 arg_type arg, ::testing::MatchResultListener* result_listener) const;\
13622 virtual void DescribeTo(::std::ostream* gmock_os) const {\
13625 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
13637 ::testing::internal::string FormatDescription(bool negation) const {\
13638 const ::testing::internal::string gmock_description = (description);\
13651 operator ::testing::Matcher<arg_type>() const {\
13693 const
13711 arg_type arg, ::testing::MatchResultListener* result_listener) const;\
13712 virtual void DescribeTo(::std::ostream* gmock_os) const {\
13715 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
13728 ::testing::internal::string FormatDescription(bool negation) const {\
13729 const ::testing::internal::string gmock_description = (description);\
13742 operator ::testing::Matcher<arg_type>() const {\
13786 const
13806 arg_type arg, ::testing::MatchResultListener* result_listener) const;\
13807 virtual void DescribeTo(::std::ostream* gmock_os) const {\
13810 virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\
13824 ::testing::internal::string FormatDescription(bool negation) const {\
13825 const ::testing::internal::string gmock_description = (description);\
13838 operator ::testing::Matcher<arg_type>() const {\
13885 const
13946 Result Perform(const ArgumentTuple& args) {
13964 Result Perform(const ArgumentTuple& args) const {
13970 Class* const obj_ptr_;
13971 const MethodPtr method_ptr_;
14004 WithoutArgs(const InnerAction& action) {
14015 WithArg(const InnerAction& action) {