Index: testing/gmock_mutant.h |
=================================================================== |
--- testing/gmock_mutant.h (revision 31033) |
+++ testing/gmock_mutant.h (working copy) |
@@ -2,6 +2,9 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
+// This file automatically generated by testing/generate_gmock_mutant.py. |
+// DO NOT EDIT. |
+ |
#ifndef TESTING_GMOCK_MUTANT_H_ |
#define TESTING_GMOCK_MUTANT_H_ |
@@ -11,11 +14,13 @@ |
// Mutant supports both pre-bound arguments (like Task) and call-time |
// arguments (like Callback) - hence the name. :-) |
// |
-// DispatchToMethod supports two sets of arguments: pre-bound (P) and |
+// DispatchToMethod/Function supports two sets of arguments: pre-bound (P) and |
// call-time (C). The arguments as well as the return type are templatized. |
-// DispatchToMethod will also try to call the selected method even if provided |
-// pre-bound arguments does not match exactly with the function signature |
-// hence the X1, X2 ... XN parameters in CreateFunctor. |
+// DispatchToMethod/Function will also try to call the selected method or |
+// function even if provided pre-bound arguments does not match exactly with |
+// the function signature hence the X1, X2 ... XN parameters in CreateFunctor. |
+// DispatchToMethod will try to invoke method that may not belong to the |
+// object's class itself but to the object's class base class. |
// |
// Additionally you can bind the object at calltime by binding a pointer to |
// pointer to the object at creation time - before including this file you |
@@ -110,6 +115,12 @@ |
const Tuple0& c) { |
return (obj->*method)(); |
} |
+template <typename R, typename Function> |
+inline R DispatchToFunction(Function function, |
+ const Tuple0& p, |
+ const Tuple0& c) { |
+ return (*function)(); |
+} |
// 0 - 1 |
template <typename R, typename T, typename Method, typename C1> |
@@ -118,6 +129,12 @@ |
const Tuple1<C1>& c) { |
return (obj->*method)(c.a); |
} |
+template <typename R, typename Function, typename C1> |
+inline R DispatchToFunction(Function function, |
+ const Tuple0& p, |
+ const Tuple1<C1>& c) { |
+ return (*function)(c.a); |
+} |
// 0 - 2 |
template <typename R, typename T, typename Method, typename C1, typename C2> |
@@ -126,6 +143,12 @@ |
const Tuple2<C1, C2>& c) { |
return (obj->*method)(c.a, c.b); |
} |
+template <typename R, typename Function, typename C1, typename C2> |
+inline R DispatchToFunction(Function function, |
+ const Tuple0& p, |
+ const Tuple2<C1, C2>& c) { |
+ return (*function)(c.a, c.b); |
+} |
// 0 - 3 |
template <typename R, typename T, typename Method, typename C1, typename C2, |
@@ -135,6 +158,12 @@ |
const Tuple3<C1, C2, C3>& c) { |
return (obj->*method)(c.a, c.b, c.c); |
} |
+template <typename R, typename Function, typename C1, typename C2, typename C3> |
+inline R DispatchToFunction(Function function, |
+ const Tuple0& p, |
+ const Tuple3<C1, C2, C3>& c) { |
+ return (*function)(c.a, c.b, c.c); |
+} |
// 0 - 4 |
template <typename R, typename T, typename Method, typename C1, typename C2, |
@@ -144,6 +173,13 @@ |
const Tuple4<C1, C2, C3, C4>& c) { |
return (obj->*method)(c.a, c.b, c.c, c.d); |
} |
+template <typename R, typename Function, typename C1, typename C2, typename C3, |
+ typename C4> |
+inline R DispatchToFunction(Function function, |
+ const Tuple0& p, |
+ const Tuple4<C1, C2, C3, C4>& c) { |
+ return (*function)(c.a, c.b, c.c, c.d); |
+} |
// 1 - 0 |
template <typename R, typename T, typename Method, typename P1> |
@@ -152,6 +188,12 @@ |
const Tuple0& c) { |
return (obj->*method)(p.a); |
} |
+template <typename R, typename Function, typename P1> |
+inline R DispatchToFunction(Function function, |
+ const Tuple1<P1>& p, |
+ const Tuple0& c) { |
+ return (*function)(p.a); |
+} |
// 1 - 1 |
template <typename R, typename T, typename Method, typename P1, typename C1> |
@@ -160,6 +202,12 @@ |
const Tuple1<C1>& c) { |
return (obj->*method)(p.a, c.a); |
} |
+template <typename R, typename Function, typename P1, typename C1> |
+inline R DispatchToFunction(Function function, |
+ const Tuple1<P1>& p, |
+ const Tuple1<C1>& c) { |
+ return (*function)(p.a, c.a); |
+} |
// 1 - 2 |
template <typename R, typename T, typename Method, typename P1, typename C1, |
@@ -169,6 +217,12 @@ |
const Tuple2<C1, C2>& c) { |
return (obj->*method)(p.a, c.a, c.b); |
} |
+template <typename R, typename Function, typename P1, typename C1, typename C2> |
+inline R DispatchToFunction(Function function, |
+ const Tuple1<P1>& p, |
+ const Tuple2<C1, C2>& c) { |
+ return (*function)(p.a, c.a, c.b); |
+} |
// 1 - 3 |
template <typename R, typename T, typename Method, typename P1, typename C1, |
@@ -178,6 +232,13 @@ |
const Tuple3<C1, C2, C3>& c) { |
return (obj->*method)(p.a, c.a, c.b, c.c); |
} |
+template <typename R, typename Function, typename P1, typename C1, typename C2, |
+ typename C3> |
+inline R DispatchToFunction(Function function, |
+ const Tuple1<P1>& p, |
+ const Tuple3<C1, C2, C3>& c) { |
+ return (*function)(p.a, c.a, c.b, c.c); |
+} |
// 1 - 4 |
template <typename R, typename T, typename Method, typename P1, typename C1, |
@@ -187,6 +248,13 @@ |
const Tuple4<C1, C2, C3, C4>& c) { |
return (obj->*method)(p.a, c.a, c.b, c.c, c.d); |
} |
+template <typename R, typename Function, typename P1, typename C1, typename C2, |
+ typename C3, typename C4> |
+inline R DispatchToFunction(Function function, |
+ const Tuple1<P1>& p, |
+ const Tuple4<C1, C2, C3, C4>& c) { |
+ return (*function)(p.a, c.a, c.b, c.c, c.d); |
+} |
// 2 - 0 |
template <typename R, typename T, typename Method, typename P1, typename P2> |
@@ -195,6 +263,12 @@ |
const Tuple0& c) { |
return (obj->*method)(p.a, p.b); |
} |
+template <typename R, typename Function, typename P1, typename P2> |
+inline R DispatchToFunction(Function function, |
+ const Tuple2<P1, P2>& p, |
+ const Tuple0& c) { |
+ return (*function)(p.a, p.b); |
+} |
// 2 - 1 |
template <typename R, typename T, typename Method, typename P1, typename P2, |
@@ -204,6 +278,12 @@ |
const Tuple1<C1>& c) { |
return (obj->*method)(p.a, p.b, c.a); |
} |
+template <typename R, typename Function, typename P1, typename P2, typename C1> |
+inline R DispatchToFunction(Function function, |
+ const Tuple2<P1, P2>& p, |
+ const Tuple1<C1>& c) { |
+ return (*function)(p.a, p.b, c.a); |
+} |
// 2 - 2 |
template <typename R, typename T, typename Method, typename P1, typename P2, |
@@ -213,6 +293,13 @@ |
const Tuple2<C1, C2>& c) { |
return (obj->*method)(p.a, p.b, c.a, c.b); |
} |
+template <typename R, typename Function, typename P1, typename P2, typename C1, |
+ typename C2> |
+inline R DispatchToFunction(Function function, |
+ const Tuple2<P1, P2>& p, |
+ const Tuple2<C1, C2>& c) { |
+ return (*function)(p.a, p.b, c.a, c.b); |
+} |
// 2 - 3 |
template <typename R, typename T, typename Method, typename P1, typename P2, |
@@ -222,6 +309,13 @@ |
const Tuple3<C1, C2, C3>& c) { |
return (obj->*method)(p.a, p.b, c.a, c.b, c.c); |
} |
+template <typename R, typename Function, typename P1, typename P2, typename C1, |
+ typename C2, typename C3> |
+inline R DispatchToFunction(Function function, |
+ const Tuple2<P1, P2>& p, |
+ const Tuple3<C1, C2, C3>& c) { |
+ return (*function)(p.a, p.b, c.a, c.b, c.c); |
+} |
// 2 - 4 |
template <typename R, typename T, typename Method, typename P1, typename P2, |
@@ -231,6 +325,13 @@ |
const Tuple4<C1, C2, C3, C4>& c) { |
return (obj->*method)(p.a, p.b, c.a, c.b, c.c, c.d); |
} |
+template <typename R, typename Function, typename P1, typename P2, typename C1, |
+ typename C2, typename C3, typename C4> |
+inline R DispatchToFunction(Function function, |
+ const Tuple2<P1, P2>& p, |
+ const Tuple4<C1, C2, C3, C4>& c) { |
+ return (*function)(p.a, p.b, c.a, c.b, c.c, c.d); |
+} |
// 3 - 0 |
template <typename R, typename T, typename Method, typename P1, typename P2, |
@@ -240,6 +341,12 @@ |
const Tuple0& c) { |
return (obj->*method)(p.a, p.b, p.c); |
} |
+template <typename R, typename Function, typename P1, typename P2, typename P3> |
+inline R DispatchToFunction(Function function, |
+ const Tuple3<P1, P2, P3>& p, |
+ const Tuple0& c) { |
+ return (*function)(p.a, p.b, p.c); |
+} |
// 3 - 1 |
template <typename R, typename T, typename Method, typename P1, typename P2, |
@@ -249,6 +356,13 @@ |
const Tuple1<C1>& c) { |
return (obj->*method)(p.a, p.b, p.c, c.a); |
} |
+template <typename R, typename Function, typename P1, typename P2, typename P3, |
+ typename C1> |
+inline R DispatchToFunction(Function function, |
+ const Tuple3<P1, P2, P3>& p, |
+ const Tuple1<C1>& c) { |
+ return (*function)(p.a, p.b, p.c, c.a); |
+} |
// 3 - 2 |
template <typename R, typename T, typename Method, typename P1, typename P2, |
@@ -258,6 +372,13 @@ |
const Tuple2<C1, C2>& c) { |
return (obj->*method)(p.a, p.b, p.c, c.a, c.b); |
} |
+template <typename R, typename Function, typename P1, typename P2, typename P3, |
+ typename C1, typename C2> |
+inline R DispatchToFunction(Function function, |
+ const Tuple3<P1, P2, P3>& p, |
+ const Tuple2<C1, C2>& c) { |
+ return (*function)(p.a, p.b, p.c, c.a, c.b); |
+} |
// 3 - 3 |
template <typename R, typename T, typename Method, typename P1, typename P2, |
@@ -267,6 +388,13 @@ |
const Tuple3<C1, C2, C3>& c) { |
return (obj->*method)(p.a, p.b, p.c, c.a, c.b, c.c); |
} |
+template <typename R, typename Function, typename P1, typename P2, typename P3, |
+ typename C1, typename C2, typename C3> |
+inline R DispatchToFunction(Function function, |
+ const Tuple3<P1, P2, P3>& p, |
+ const Tuple3<C1, C2, C3>& c) { |
+ return (*function)(p.a, p.b, p.c, c.a, c.b, c.c); |
+} |
// 3 - 4 |
template <typename R, typename T, typename Method, typename P1, typename P2, |
@@ -276,6 +404,13 @@ |
const Tuple4<C1, C2, C3, C4>& c) { |
return (obj->*method)(p.a, p.b, p.c, c.a, c.b, c.c, c.d); |
} |
+template <typename R, typename Function, typename P1, typename P2, typename P3, |
+ typename C1, typename C2, typename C3, typename C4> |
+inline R DispatchToFunction(Function function, |
+ const Tuple3<P1, P2, P3>& p, |
+ const Tuple4<C1, C2, C3, C4>& c) { |
+ return (*function)(p.a, p.b, p.c, c.a, c.b, c.c, c.d); |
+} |
// 4 - 0 |
template <typename R, typename T, typename Method, typename P1, typename P2, |
@@ -285,6 +420,13 @@ |
const Tuple0& c) { |
return (obj->*method)(p.a, p.b, p.c, p.d); |
} |
+template <typename R, typename Function, typename P1, typename P2, typename P3, |
+ typename P4> |
+inline R DispatchToFunction(Function function, |
+ const Tuple4<P1, P2, P3, P4>& p, |
+ const Tuple0& c) { |
+ return (*function)(p.a, p.b, p.c, p.d); |
+} |
// 4 - 1 |
template <typename R, typename T, typename Method, typename P1, typename P2, |
@@ -294,6 +436,13 @@ |
const Tuple1<C1>& c) { |
return (obj->*method)(p.a, p.b, p.c, p.d, c.a); |
} |
+template <typename R, typename Function, typename P1, typename P2, typename P3, |
+ typename P4, typename C1> |
+inline R DispatchToFunction(Function function, |
+ const Tuple4<P1, P2, P3, P4>& p, |
+ const Tuple1<C1>& c) { |
+ return (*function)(p.a, p.b, p.c, p.d, c.a); |
+} |
// 4 - 2 |
template <typename R, typename T, typename Method, typename P1, typename P2, |
@@ -303,6 +452,13 @@ |
const Tuple2<C1, C2>& c) { |
return (obj->*method)(p.a, p.b, p.c, p.d, c.a, c.b); |
} |
+template <typename R, typename Function, typename P1, typename P2, typename P3, |
+ typename P4, typename C1, typename C2> |
+inline R DispatchToFunction(Function function, |
+ const Tuple4<P1, P2, P3, P4>& p, |
+ const Tuple2<C1, C2>& c) { |
+ return (*function)(p.a, p.b, p.c, p.d, c.a, c.b); |
+} |
// 4 - 3 |
template <typename R, typename T, typename Method, typename P1, typename P2, |
@@ -312,6 +468,13 @@ |
const Tuple3<C1, C2, C3>& c) { |
return (obj->*method)(p.a, p.b, p.c, p.d, c.a, c.b, c.c); |
} |
+template <typename R, typename Function, typename P1, typename P2, typename P3, |
+ typename P4, typename C1, typename C2, typename C3> |
+inline R DispatchToFunction(Function function, |
+ const Tuple4<P1, P2, P3, P4>& p, |
+ const Tuple3<C1, C2, C3>& c) { |
+ return (*function)(p.a, p.b, p.c, p.d, c.a, c.b, c.c); |
+} |
// 4 - 4 |
template <typename R, typename T, typename Method, typename P1, typename P2, |
@@ -322,6 +485,13 @@ |
const Tuple4<C1, C2, C3, C4>& c) { |
return (obj->*method)(p.a, p.b, p.c, p.d, c.a, c.b, c.c, c.d); |
} |
+template <typename R, typename Function, typename P1, typename P2, typename P3, |
+ typename P4, typename C1, typename C2, typename C3, typename C4> |
+inline R DispatchToFunction(Function function, |
+ const Tuple4<P1, P2, P3, P4>& p, |
+ const Tuple4<C1, C2, C3, C4>& c) { |
+ return (*function)(p.a, p.b, p.c, p.d, c.a, c.b, c.c, c.d); |
+} |
// Interface that is exposed to the consumer, that does the actual calling |
// of the method. |
@@ -353,6 +523,22 @@ |
PreBound pb_; |
}; |
+template <typename R, typename Function, typename PreBound, typename Params> |
+class MutantFunction : public MutantRunner<R, Params> { |
+ public: |
+ MutantFunction(Function function, const PreBound& pb) |
+ : function_(function), pb_(pb) { |
+ } |
+ |
+ // MutantRunner implementation |
+ virtual R RunWithParams(const Params& params) { |
+ return DispatchToFunction<R>(function_, pb_, params); |
+ } |
+ |
+ Function function_; |
+ PreBound pb_; |
+}; |
+ |
#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
// MutantLateBind is like Mutant, but you bind a pointer to a pointer |
// to the object. This way you can create actions for an object |
@@ -421,684 +607,1294 @@ |
linked_ptr<MutantRunner<R, Params> > impl_; |
}; |
- |
- |
// 0 - 0 |
-template <typename R, typename T> |
+template <typename R, typename T, typename U> |
inline MutantFunctor<R, Tuple0> |
-CreateFunctor(T* obj, R (T::*method)()) { |
- MutantRunner<R, Tuple0> *t = |
- new Mutant<R, T, R (T::*)(), |
+CreateFunctor(T* obj, R (U::*method)()) { |
+ MutantRunner<R, Tuple0>* t = |
+ new Mutant<R, T, R (U::*)(), |
Tuple0, Tuple0> |
(obj, method, MakeTuple()); |
return MutantFunctor<R, Tuple0>(t); |
} |
+template <typename R> |
+inline MutantFunctor<R, Tuple0> |
+CreateFunctor(R (*function)()) { |
+ MutantRunner<R, Tuple0>* t = |
+ new MutantFunction<R, R (*)(), |
+ Tuple0, Tuple0> |
+ (function, MakeTuple()); |
+ return MutantFunctor<R, Tuple0>(t); |
+} |
+ |
#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
-// 0 - 0 |
-template <typename R, typename T> |
+template <typename R, typename T, typename U> |
inline MutantFunctor<R, Tuple0> |
-CreateFunctor(T** obj, R (T::*method)()) { |
- MutantRunner<R, Tuple0> *t = |
- new MutantLateObjectBind<R, T, R (T::*)(), |
+CreateFunctor(T** obj, R (U::*method)()) { |
+ MutantRunner<R, Tuple0>* t = |
+ new MutantLateObjectBind<R, T, R (U::*)(), |
Tuple0, Tuple0> |
(obj, method, MakeTuple()); |
return MutantFunctor<R, Tuple0>(t); |
} |
-#endif |
+#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
+#if defined (OS_WIN) |
+template <typename R, typename T, typename U> |
+inline MutantFunctor<R, Tuple0> |
+CreateFunctor(T* obj, R (__stdcall U::*method)()) { |
+ MutantRunner<R, Tuple0>* t = |
+ new Mutant<R, T, R (__stdcall U::*)(), |
+ Tuple0, Tuple0> |
+ (obj, method, MakeTuple()); |
+ return MutantFunctor<R, Tuple0>(t); |
+} |
+#endif // OS_WIN |
+ |
// 0 - 1 |
-template <typename R, typename T, typename A1> |
+template <typename R, typename T, typename U, typename A1> |
inline MutantFunctor<R, Tuple1<A1> > |
-CreateFunctor(T* obj, R (T::*method)(A1)) { |
- MutantRunner<R, Tuple1<A1> > *t = |
- new Mutant<R, T, R (T::*)(A1), |
+CreateFunctor(T* obj, R (U::*method)(A1)) { |
+ MutantRunner<R, Tuple1<A1> >* t = |
+ new Mutant<R, T, R (U::*)(A1), |
Tuple0, Tuple1<A1> > |
(obj, method, MakeTuple()); |
return MutantFunctor<R, Tuple1<A1> >(t); |
} |
+template <typename R, typename A1> |
+inline MutantFunctor<R, Tuple1<A1> > |
+CreateFunctor(R (*function)(A1)) { |
+ MutantRunner<R, Tuple1<A1> >* t = |
+ new MutantFunction<R, R (*)(A1), |
+ Tuple0, Tuple1<A1> > |
+ (function, MakeTuple()); |
+ return MutantFunctor<R, Tuple1<A1> >(t); |
+} |
+ |
#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
-// 0 - 1 |
-template <typename R, typename T, typename A1> |
+template <typename R, typename T, typename U, typename A1> |
inline MutantFunctor<R, Tuple1<A1> > |
-CreateFunctor(T** obj, R (T::*method)(A1)) { |
- MutantRunner<R, Tuple1<A1> > *t = |
- new MutantLateObjectBind<R, T, R (T::*)(A1), |
+CreateFunctor(T** obj, R (U::*method)(A1)) { |
+ MutantRunner<R, Tuple1<A1> >* t = |
+ new MutantLateObjectBind<R, T, R (U::*)(A1), |
Tuple0, Tuple1<A1> > |
(obj, method, MakeTuple()); |
return MutantFunctor<R, Tuple1<A1> >(t); |
} |
-#endif |
+#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
+#if defined (OS_WIN) |
+template <typename R, typename T, typename U, typename A1> |
+inline MutantFunctor<R, Tuple1<A1> > |
+CreateFunctor(T* obj, R (__stdcall U::*method)(A1)) { |
+ MutantRunner<R, Tuple1<A1> >* t = |
+ new Mutant<R, T, R (__stdcall U::*)(A1), |
+ Tuple0, Tuple1<A1> > |
+ (obj, method, MakeTuple()); |
+ return MutantFunctor<R, Tuple1<A1> >(t); |
+} |
+#endif // OS_WIN |
+ |
// 0 - 2 |
-template <typename R, typename T, typename A1, typename A2> |
+template <typename R, typename T, typename U, typename A1, typename A2> |
inline MutantFunctor<R, Tuple2<A1, A2> > |
-CreateFunctor(T* obj, R (T::*method)(A1, A2)) { |
- MutantRunner<R, Tuple2<A1, A2> > *t = |
- new Mutant<R, T, R (T::*)(A1, A2), |
+CreateFunctor(T* obj, R (U::*method)(A1, A2)) { |
+ MutantRunner<R, Tuple2<A1, A2> >* t = |
+ new Mutant<R, T, R (U::*)(A1, A2), |
Tuple0, Tuple2<A1, A2> > |
(obj, method, MakeTuple()); |
return MutantFunctor<R, Tuple2<A1, A2> >(t); |
} |
+template <typename R, typename A1, typename A2> |
+inline MutantFunctor<R, Tuple2<A1, A2> > |
+CreateFunctor(R (*function)(A1, A2)) { |
+ MutantRunner<R, Tuple2<A1, A2> >* t = |
+ new MutantFunction<R, R (*)(A1, A2), |
+ Tuple0, Tuple2<A1, A2> > |
+ (function, MakeTuple()); |
+ return MutantFunctor<R, Tuple2<A1, A2> >(t); |
+} |
+ |
#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
-// 0 - 2 |
-template <typename R, typename T, typename A1, typename A2> |
+template <typename R, typename T, typename U, typename A1, typename A2> |
inline MutantFunctor<R, Tuple2<A1, A2> > |
-CreateFunctor(T** obj, R (T::*method)(A1, A2)) { |
- MutantRunner<R, Tuple2<A1, A2> > *t = |
- new MutantLateObjectBind<R, T, R (T::*)(A1, A2), |
+CreateFunctor(T** obj, R (U::*method)(A1, A2)) { |
+ MutantRunner<R, Tuple2<A1, A2> >* t = |
+ new MutantLateObjectBind<R, T, R (U::*)(A1, A2), |
Tuple0, Tuple2<A1, A2> > |
(obj, method, MakeTuple()); |
return MutantFunctor<R, Tuple2<A1, A2> >(t); |
} |
-#endif |
+#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
+#if defined (OS_WIN) |
+template <typename R, typename T, typename U, typename A1, typename A2> |
+inline MutantFunctor<R, Tuple2<A1, A2> > |
+CreateFunctor(T* obj, R (__stdcall U::*method)(A1, A2)) { |
+ MutantRunner<R, Tuple2<A1, A2> >* t = |
+ new Mutant<R, T, R (__stdcall U::*)(A1, A2), |
+ Tuple0, Tuple2<A1, A2> > |
+ (obj, method, MakeTuple()); |
+ return MutantFunctor<R, Tuple2<A1, A2> >(t); |
+} |
+#endif // OS_WIN |
+ |
// 0 - 3 |
-template <typename R, typename T, typename A1, typename A2, typename A3> |
+template <typename R, typename T, typename U, typename A1, typename A2, |
+ typename A3> |
inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
-CreateFunctor(T* obj, R (T::*method)(A1, A2, A3)) { |
- MutantRunner<R, Tuple3<A1, A2, A3> > *t = |
- new Mutant<R, T, R (T::*)(A1, A2, A3), |
+CreateFunctor(T* obj, R (U::*method)(A1, A2, A3)) { |
+ MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
+ new Mutant<R, T, R (U::*)(A1, A2, A3), |
Tuple0, Tuple3<A1, A2, A3> > |
(obj, method, MakeTuple()); |
return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
} |
+template <typename R, typename A1, typename A2, typename A3> |
+inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
+CreateFunctor(R (*function)(A1, A2, A3)) { |
+ MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
+ new MutantFunction<R, R (*)(A1, A2, A3), |
+ Tuple0, Tuple3<A1, A2, A3> > |
+ (function, MakeTuple()); |
+ return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
+} |
+ |
#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
-// 0 - 3 |
-template <typename R, typename T, typename A1, typename A2, typename A3> |
+template <typename R, typename T, typename U, typename A1, typename A2, |
+ typename A3> |
inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
-CreateFunctor(T** obj, R (T::*method)(A1, A2, A3)) { |
- MutantRunner<R, Tuple3<A1, A2, A3> > *t = |
- new MutantLateObjectBind<R, T, R (T::*)(A1, A2, A3), |
+CreateFunctor(T** obj, R (U::*method)(A1, A2, A3)) { |
+ MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
+ new MutantLateObjectBind<R, T, R (U::*)(A1, A2, A3), |
Tuple0, Tuple3<A1, A2, A3> > |
(obj, method, MakeTuple()); |
return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
} |
-#endif |
+#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
+#if defined (OS_WIN) |
+template <typename R, typename T, typename U, typename A1, typename A2, |
+ typename A3> |
+inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
+CreateFunctor(T* obj, R (__stdcall U::*method)(A1, A2, A3)) { |
+ MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
+ new Mutant<R, T, R (__stdcall U::*)(A1, A2, A3), |
+ Tuple0, Tuple3<A1, A2, A3> > |
+ (obj, method, MakeTuple()); |
+ return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
+} |
+#endif // OS_WIN |
+ |
// 0 - 4 |
-template <typename R, typename T, typename A1, typename A2, typename A3, |
- typename A4> |
+template <typename R, typename T, typename U, typename A1, typename A2, |
+ typename A3, typename A4> |
inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
-CreateFunctor(T* obj, R (T::*method)(A1, A2, A3, A4)) { |
- MutantRunner<R, Tuple4<A1, A2, A3, A4> > *t = |
- new Mutant<R, T, R (T::*)(A1, A2, A3, A4), |
+CreateFunctor(T* obj, R (U::*method)(A1, A2, A3, A4)) { |
+ MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
+ new Mutant<R, T, R (U::*)(A1, A2, A3, A4), |
Tuple0, Tuple4<A1, A2, A3, A4> > |
(obj, method, MakeTuple()); |
return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
} |
+template <typename R, typename A1, typename A2, typename A3, typename A4> |
+inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
+CreateFunctor(R (*function)(A1, A2, A3, A4)) { |
+ MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
+ new MutantFunction<R, R (*)(A1, A2, A3, A4), |
+ Tuple0, Tuple4<A1, A2, A3, A4> > |
+ (function, MakeTuple()); |
+ return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
+} |
+ |
#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
-// 0 - 4 |
-template <typename R, typename T, typename A1, typename A2, typename A3, |
- typename A4> |
+template <typename R, typename T, typename U, typename A1, typename A2, |
+ typename A3, typename A4> |
inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
-CreateFunctor(T** obj, R (T::*method)(A1, A2, A3, A4)) { |
- MutantRunner<R, Tuple4<A1, A2, A3, A4> > *t = |
- new MutantLateObjectBind<R, T, R (T::*)(A1, A2, A3, A4), |
+CreateFunctor(T** obj, R (U::*method)(A1, A2, A3, A4)) { |
+ MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
+ new MutantLateObjectBind<R, T, R (U::*)(A1, A2, A3, A4), |
Tuple0, Tuple4<A1, A2, A3, A4> > |
(obj, method, MakeTuple()); |
return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
} |
-#endif |
+#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
+#if defined (OS_WIN) |
+template <typename R, typename T, typename U, typename A1, typename A2, |
+ typename A3, typename A4> |
+inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
+CreateFunctor(T* obj, R (__stdcall U::*method)(A1, A2, A3, A4)) { |
+ MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
+ new Mutant<R, T, R (__stdcall U::*)(A1, A2, A3, A4), |
+ Tuple0, Tuple4<A1, A2, A3, A4> > |
+ (obj, method, MakeTuple()); |
+ return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
+} |
+#endif // OS_WIN |
+ |
// 1 - 0 |
-template <typename R, typename T, typename P1, typename X1> |
+template <typename R, typename T, typename U, typename P1, typename X1> |
inline MutantFunctor<R, Tuple0> |
-CreateFunctor(T* obj, R (T::*method)(X1), const P1& p1) { |
- MutantRunner<R, Tuple0> *t = |
- new Mutant<R, T, R (T::*)(X1), |
+CreateFunctor(T* obj, R (U::*method)(X1), const P1& p1) { |
+ MutantRunner<R, Tuple0>* t = |
+ new Mutant<R, T, R (U::*)(X1), |
Tuple1<P1>, Tuple0> |
(obj, method, MakeTuple(p1)); |
return MutantFunctor<R, Tuple0>(t); |
} |
+template <typename R, typename P1, typename X1> |
+inline MutantFunctor<R, Tuple0> |
+CreateFunctor(R (*function)(X1), const P1& p1) { |
+ MutantRunner<R, Tuple0>* t = |
+ new MutantFunction<R, R (*)(X1), |
+ Tuple1<P1>, Tuple0> |
+ (function, MakeTuple(p1)); |
+ return MutantFunctor<R, Tuple0>(t); |
+} |
+ |
#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
-// 1 - 0 |
-template <typename R, typename T, typename P1, typename X1> |
+template <typename R, typename T, typename U, typename P1, typename X1> |
inline MutantFunctor<R, Tuple0> |
-CreateFunctor(T** obj, R (T::*method)(X1), const P1& p1) { |
- MutantRunner<R, Tuple0> *t = |
- new MutantLateObjectBind<R, T, R (T::*)(X1), |
+CreateFunctor(T** obj, R (U::*method)(X1), const P1& p1) { |
+ MutantRunner<R, Tuple0>* t = |
+ new MutantLateObjectBind<R, T, R (U::*)(X1), |
Tuple1<P1>, Tuple0> |
(obj, method, MakeTuple(p1)); |
return MutantFunctor<R, Tuple0>(t); |
} |
-#endif |
+#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
+#if defined (OS_WIN) |
+template <typename R, typename T, typename U, typename P1, typename X1> |
+inline MutantFunctor<R, Tuple0> |
+CreateFunctor(T* obj, R (__stdcall U::*method)(X1), const P1& p1) { |
+ MutantRunner<R, Tuple0>* t = |
+ new Mutant<R, T, R (__stdcall U::*)(X1), |
+ Tuple1<P1>, Tuple0> |
+ (obj, method, MakeTuple(p1)); |
+ return MutantFunctor<R, Tuple0>(t); |
+} |
+#endif // OS_WIN |
+ |
// 1 - 1 |
-template <typename R, typename T, typename P1, typename A1, typename X1> |
+template <typename R, typename T, typename U, typename P1, typename A1, |
+ typename X1> |
inline MutantFunctor<R, Tuple1<A1> > |
-CreateFunctor(T* obj, R (T::*method)(X1, A1), const P1& p1) { |
- MutantRunner<R, Tuple1<A1> > *t = |
- new Mutant<R, T, R (T::*)(X1, A1), |
+CreateFunctor(T* obj, R (U::*method)(X1, A1), const P1& p1) { |
+ MutantRunner<R, Tuple1<A1> >* t = |
+ new Mutant<R, T, R (U::*)(X1, A1), |
Tuple1<P1>, Tuple1<A1> > |
(obj, method, MakeTuple(p1)); |
return MutantFunctor<R, Tuple1<A1> >(t); |
} |
+template <typename R, typename P1, typename A1, typename X1> |
+inline MutantFunctor<R, Tuple1<A1> > |
+CreateFunctor(R (*function)(X1, A1), const P1& p1) { |
+ MutantRunner<R, Tuple1<A1> >* t = |
+ new MutantFunction<R, R (*)(X1, A1), |
+ Tuple1<P1>, Tuple1<A1> > |
+ (function, MakeTuple(p1)); |
+ return MutantFunctor<R, Tuple1<A1> >(t); |
+} |
+ |
#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
-// 1 - 1 |
-template <typename R, typename T, typename P1, typename A1, typename X1> |
+template <typename R, typename T, typename U, typename P1, typename A1, |
+ typename X1> |
inline MutantFunctor<R, Tuple1<A1> > |
-CreateFunctor(T** obj, R (T::*method)(X1, A1), const P1& p1) { |
- MutantRunner<R, Tuple1<A1> > *t = |
- new MutantLateObjectBind<R, T, R (T::*)(X1, A1), |
+CreateFunctor(T** obj, R (U::*method)(X1, A1), const P1& p1) { |
+ MutantRunner<R, Tuple1<A1> >* t = |
+ new MutantLateObjectBind<R, T, R (U::*)(X1, A1), |
Tuple1<P1>, Tuple1<A1> > |
(obj, method, MakeTuple(p1)); |
return MutantFunctor<R, Tuple1<A1> >(t); |
} |
-#endif |
+#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
+#if defined (OS_WIN) |
+template <typename R, typename T, typename U, typename P1, typename A1, |
+ typename X1> |
+inline MutantFunctor<R, Tuple1<A1> > |
+CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1), const P1& p1) { |
+ MutantRunner<R, Tuple1<A1> >* t = |
+ new Mutant<R, T, R (__stdcall U::*)(X1, A1), |
+ Tuple1<P1>, Tuple1<A1> > |
+ (obj, method, MakeTuple(p1)); |
+ return MutantFunctor<R, Tuple1<A1> >(t); |
+} |
+#endif // OS_WIN |
+ |
// 1 - 2 |
-template <typename R, typename T, typename P1, typename A1, typename A2, |
- typename X1> |
+template <typename R, typename T, typename U, typename P1, typename A1, |
+ typename A2, typename X1> |
inline MutantFunctor<R, Tuple2<A1, A2> > |
-CreateFunctor(T* obj, R (T::*method)(X1, A1, A2), const P1& p1) { |
- MutantRunner<R, Tuple2<A1, A2> > *t = |
- new Mutant<R, T, R (T::*)(X1, A1, A2), |
+CreateFunctor(T* obj, R (U::*method)(X1, A1, A2), const P1& p1) { |
+ MutantRunner<R, Tuple2<A1, A2> >* t = |
+ new Mutant<R, T, R (U::*)(X1, A1, A2), |
Tuple1<P1>, Tuple2<A1, A2> > |
(obj, method, MakeTuple(p1)); |
return MutantFunctor<R, Tuple2<A1, A2> >(t); |
} |
+template <typename R, typename P1, typename A1, typename A2, typename X1> |
+inline MutantFunctor<R, Tuple2<A1, A2> > |
+CreateFunctor(R (*function)(X1, A1, A2), const P1& p1) { |
+ MutantRunner<R, Tuple2<A1, A2> >* t = |
+ new MutantFunction<R, R (*)(X1, A1, A2), |
+ Tuple1<P1>, Tuple2<A1, A2> > |
+ (function, MakeTuple(p1)); |
+ return MutantFunctor<R, Tuple2<A1, A2> >(t); |
+} |
+ |
#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
-// 1 - 2 |
-template <typename R, typename T, typename P1, typename A1, typename A2, |
- typename X1> |
+template <typename R, typename T, typename U, typename P1, typename A1, |
+ typename A2, typename X1> |
inline MutantFunctor<R, Tuple2<A1, A2> > |
-CreateFunctor(T** obj, R (T::*method)(X1, A1, A2), const P1& p1) { |
- MutantRunner<R, Tuple2<A1, A2> > *t = |
- new MutantLateObjectBind<R, T, R (T::*)(X1, A1, A2), |
+CreateFunctor(T** obj, R (U::*method)(X1, A1, A2), const P1& p1) { |
+ MutantRunner<R, Tuple2<A1, A2> >* t = |
+ new MutantLateObjectBind<R, T, R (U::*)(X1, A1, A2), |
Tuple1<P1>, Tuple2<A1, A2> > |
(obj, method, MakeTuple(p1)); |
return MutantFunctor<R, Tuple2<A1, A2> >(t); |
} |
-#endif |
+#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
+#if defined (OS_WIN) |
+template <typename R, typename T, typename U, typename P1, typename A1, |
+ typename A2, typename X1> |
+inline MutantFunctor<R, Tuple2<A1, A2> > |
+CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2), const P1& p1) { |
+ MutantRunner<R, Tuple2<A1, A2> >* t = |
+ new Mutant<R, T, R (__stdcall U::*)(X1, A1, A2), |
+ Tuple1<P1>, Tuple2<A1, A2> > |
+ (obj, method, MakeTuple(p1)); |
+ return MutantFunctor<R, Tuple2<A1, A2> >(t); |
+} |
+#endif // OS_WIN |
+ |
// 1 - 3 |
-template <typename R, typename T, typename P1, typename A1, typename A2, |
- typename A3, typename X1> |
+template <typename R, typename T, typename U, typename P1, typename A1, |
+ typename A2, typename A3, typename X1> |
inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
-CreateFunctor(T* obj, R (T::*method)(X1, A1, A2, A3), const P1& p1) { |
- MutantRunner<R, Tuple3<A1, A2, A3> > *t = |
- new Mutant<R, T, R (T::*)(X1, A1, A2, A3), |
+CreateFunctor(T* obj, R (U::*method)(X1, A1, A2, A3), const P1& p1) { |
+ MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
+ new Mutant<R, T, R (U::*)(X1, A1, A2, A3), |
Tuple1<P1>, Tuple3<A1, A2, A3> > |
(obj, method, MakeTuple(p1)); |
return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
} |
+template <typename R, typename P1, typename A1, typename A2, typename A3, |
+ typename X1> |
+inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
+CreateFunctor(R (*function)(X1, A1, A2, A3), const P1& p1) { |
+ MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
+ new MutantFunction<R, R (*)(X1, A1, A2, A3), |
+ Tuple1<P1>, Tuple3<A1, A2, A3> > |
+ (function, MakeTuple(p1)); |
+ return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
+} |
+ |
#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
-// 1 - 3 |
-template <typename R, typename T, typename P1, typename A1, typename A2, |
- typename A3, typename X1> |
+template <typename R, typename T, typename U, typename P1, typename A1, |
+ typename A2, typename A3, typename X1> |
inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
-CreateFunctor(T** obj, R (T::*method)(X1, A1, A2, A3), const P1& p1) { |
- MutantRunner<R, Tuple3<A1, A2, A3> > *t = |
- new MutantLateObjectBind<R, T, R (T::*)(X1, A1, A2, A3), |
+CreateFunctor(T** obj, R (U::*method)(X1, A1, A2, A3), const P1& p1) { |
+ MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
+ new MutantLateObjectBind<R, T, R (U::*)(X1, A1, A2, A3), |
Tuple1<P1>, Tuple3<A1, A2, A3> > |
(obj, method, MakeTuple(p1)); |
return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
} |
-#endif |
+#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
+#if defined (OS_WIN) |
+template <typename R, typename T, typename U, typename P1, typename A1, |
+ typename A2, typename A3, typename X1> |
+inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
+CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2, A3), const P1& p1) { |
+ MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
+ new Mutant<R, T, R (__stdcall U::*)(X1, A1, A2, A3), |
+ Tuple1<P1>, Tuple3<A1, A2, A3> > |
+ (obj, method, MakeTuple(p1)); |
+ return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
+} |
+#endif // OS_WIN |
+ |
// 1 - 4 |
-template <typename R, typename T, typename P1, typename A1, typename A2, |
- typename A3, typename A4, typename X1> |
+template <typename R, typename T, typename U, typename P1, typename A1, |
+ typename A2, typename A3, typename A4, typename X1> |
inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
-CreateFunctor(T* obj, R (T::*method)(X1, A1, A2, A3, A4), const P1& p1) { |
- MutantRunner<R, Tuple4<A1, A2, A3, A4> > *t = |
- new Mutant<R, T, R (T::*)(X1, A1, A2, A3, A4), |
+CreateFunctor(T* obj, R (U::*method)(X1, A1, A2, A3, A4), const P1& p1) { |
+ MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
+ new Mutant<R, T, R (U::*)(X1, A1, A2, A3, A4), |
Tuple1<P1>, Tuple4<A1, A2, A3, A4> > |
(obj, method, MakeTuple(p1)); |
return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
} |
+template <typename R, typename P1, typename A1, typename A2, typename A3, |
+ typename A4, typename X1> |
+inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
+CreateFunctor(R (*function)(X1, A1, A2, A3, A4), const P1& p1) { |
+ MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
+ new MutantFunction<R, R (*)(X1, A1, A2, A3, A4), |
+ Tuple1<P1>, Tuple4<A1, A2, A3, A4> > |
+ (function, MakeTuple(p1)); |
+ return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
+} |
+ |
#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
-// 1 - 4 |
-template <typename R, typename T, typename P1, typename A1, typename A2, |
- typename A3, typename A4, typename X1> |
+template <typename R, typename T, typename U, typename P1, typename A1, |
+ typename A2, typename A3, typename A4, typename X1> |
inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
-CreateFunctor(T** obj, R (T::*method)(X1, A1, A2, A3, A4), const P1& p1) { |
- MutantRunner<R, Tuple4<A1, A2, A3, A4> > *t = |
- new MutantLateObjectBind<R, T, R (T::*)(X1, A1, A2, A3, A4), |
+CreateFunctor(T** obj, R (U::*method)(X1, A1, A2, A3, A4), const P1& p1) { |
+ MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
+ new MutantLateObjectBind<R, T, R (U::*)(X1, A1, A2, A3, A4), |
Tuple1<P1>, Tuple4<A1, A2, A3, A4> > |
(obj, method, MakeTuple(p1)); |
return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
} |
-#endif |
+#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
+#if defined (OS_WIN) |
+template <typename R, typename T, typename U, typename P1, typename A1, |
+ typename A2, typename A3, typename A4, typename X1> |
+inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
+CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2, A3, A4), |
+ const P1& p1) { |
+ MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
+ new Mutant<R, T, R (__stdcall U::*)(X1, A1, A2, A3, A4), |
+ Tuple1<P1>, Tuple4<A1, A2, A3, A4> > |
+ (obj, method, MakeTuple(p1)); |
+ return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
+} |
+#endif // OS_WIN |
+ |
// 2 - 0 |
-template <typename R, typename T, typename P1, typename P2, typename X1, |
- typename X2> |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename X1, typename X2> |
inline MutantFunctor<R, Tuple0> |
-CreateFunctor(T* obj, R (T::*method)(X1, X2), const P1& p1, const P2& p2) { |
- MutantRunner<R, Tuple0> *t = |
- new Mutant<R, T, R (T::*)(X1, X2), |
+CreateFunctor(T* obj, R (U::*method)(X1, X2), const P1& p1, const P2& p2) { |
+ MutantRunner<R, Tuple0>* t = |
+ new Mutant<R, T, R (U::*)(X1, X2), |
Tuple2<P1, P2>, Tuple0> |
(obj, method, MakeTuple(p1, p2)); |
return MutantFunctor<R, Tuple0>(t); |
} |
+template <typename R, typename P1, typename P2, typename X1, typename X2> |
+inline MutantFunctor<R, Tuple0> |
+CreateFunctor(R (*function)(X1, X2), const P1& p1, const P2& p2) { |
+ MutantRunner<R, Tuple0>* t = |
+ new MutantFunction<R, R (*)(X1, X2), |
+ Tuple2<P1, P2>, Tuple0> |
+ (function, MakeTuple(p1, p2)); |
+ return MutantFunctor<R, Tuple0>(t); |
+} |
+ |
#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
-// 2 - 0 |
-template <typename R, typename T, typename P1, typename P2, typename X1, |
- typename X2> |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename X1, typename X2> |
inline MutantFunctor<R, Tuple0> |
-CreateFunctor(T** obj, R (T::*method)(X1, X2), const P1& p1, const P2& p2) { |
- MutantRunner<R, Tuple0> *t = |
- new MutantLateObjectBind<R, T, R (T::*)(X1, X2), |
+CreateFunctor(T** obj, R (U::*method)(X1, X2), const P1& p1, const P2& p2) { |
+ MutantRunner<R, Tuple0>* t = |
+ new MutantLateObjectBind<R, T, R (U::*)(X1, X2), |
Tuple2<P1, P2>, Tuple0> |
(obj, method, MakeTuple(p1, p2)); |
return MutantFunctor<R, Tuple0>(t); |
} |
-#endif |
+#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
+#if defined (OS_WIN) |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename X1, typename X2> |
+inline MutantFunctor<R, Tuple0> |
+CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2), const P1& p1, |
+ const P2& p2) { |
+ MutantRunner<R, Tuple0>* t = |
+ new Mutant<R, T, R (__stdcall U::*)(X1, X2), |
+ Tuple2<P1, P2>, Tuple0> |
+ (obj, method, MakeTuple(p1, p2)); |
+ return MutantFunctor<R, Tuple0>(t); |
+} |
+#endif // OS_WIN |
+ |
// 2 - 1 |
-template <typename R, typename T, typename P1, typename P2, typename A1, |
- typename X1, typename X2> |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename A1, typename X1, typename X2> |
inline MutantFunctor<R, Tuple1<A1> > |
-CreateFunctor(T* obj, R (T::*method)(X1, X2, A1), const P1& p1, const P2& p2) { |
- MutantRunner<R, Tuple1<A1> > *t = |
- new Mutant<R, T, R (T::*)(X1, X2, A1), |
+CreateFunctor(T* obj, R (U::*method)(X1, X2, A1), const P1& p1, const P2& p2) { |
+ MutantRunner<R, Tuple1<A1> >* t = |
+ new Mutant<R, T, R (U::*)(X1, X2, A1), |
Tuple2<P1, P2>, Tuple1<A1> > |
(obj, method, MakeTuple(p1, p2)); |
return MutantFunctor<R, Tuple1<A1> >(t); |
} |
+template <typename R, typename P1, typename P2, typename A1, typename X1, |
+ typename X2> |
+inline MutantFunctor<R, Tuple1<A1> > |
+CreateFunctor(R (*function)(X1, X2, A1), const P1& p1, const P2& p2) { |
+ MutantRunner<R, Tuple1<A1> >* t = |
+ new MutantFunction<R, R (*)(X1, X2, A1), |
+ Tuple2<P1, P2>, Tuple1<A1> > |
+ (function, MakeTuple(p1, p2)); |
+ return MutantFunctor<R, Tuple1<A1> >(t); |
+} |
+ |
#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
-// 2 - 1 |
-template <typename R, typename T, typename P1, typename P2, typename A1, |
- typename X1, typename X2> |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename A1, typename X1, typename X2> |
inline MutantFunctor<R, Tuple1<A1> > |
-CreateFunctor(T** obj, R (T::*method)(X1, X2, A1), const P1& p1, const P2& p2) { |
- MutantRunner<R, Tuple1<A1> > *t = |
- new MutantLateObjectBind<R, T, R (T::*)(X1, X2, A1), |
+CreateFunctor(T** obj, R (U::*method)(X1, X2, A1), const P1& p1, const P2& p2) { |
+ MutantRunner<R, Tuple1<A1> >* t = |
+ new MutantLateObjectBind<R, T, R (U::*)(X1, X2, A1), |
Tuple2<P1, P2>, Tuple1<A1> > |
(obj, method, MakeTuple(p1, p2)); |
return MutantFunctor<R, Tuple1<A1> >(t); |
} |
-#endif |
+#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
+#if defined (OS_WIN) |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename A1, typename X1, typename X2> |
+inline MutantFunctor<R, Tuple1<A1> > |
+CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1), const P1& p1, |
+ const P2& p2) { |
+ MutantRunner<R, Tuple1<A1> >* t = |
+ new Mutant<R, T, R (__stdcall U::*)(X1, X2, A1), |
+ Tuple2<P1, P2>, Tuple1<A1> > |
+ (obj, method, MakeTuple(p1, p2)); |
+ return MutantFunctor<R, Tuple1<A1> >(t); |
+} |
+#endif // OS_WIN |
+ |
// 2 - 2 |
-template <typename R, typename T, typename P1, typename P2, typename A1, |
- typename A2, typename X1, typename X2> |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename A1, typename A2, typename X1, typename X2> |
inline MutantFunctor<R, Tuple2<A1, A2> > |
-CreateFunctor(T* obj, R (T::*method)(X1, X2, A1, A2), const P1& p1, |
+CreateFunctor(T* obj, R (U::*method)(X1, X2, A1, A2), const P1& p1, |
const P2& p2) { |
- MutantRunner<R, Tuple2<A1, A2> > *t = |
- new Mutant<R, T, R (T::*)(X1, X2, A1, A2), |
+ MutantRunner<R, Tuple2<A1, A2> >* t = |
+ new Mutant<R, T, R (U::*)(X1, X2, A1, A2), |
Tuple2<P1, P2>, Tuple2<A1, A2> > |
(obj, method, MakeTuple(p1, p2)); |
return MutantFunctor<R, Tuple2<A1, A2> >(t); |
} |
+template <typename R, typename P1, typename P2, typename A1, typename A2, |
+ typename X1, typename X2> |
+inline MutantFunctor<R, Tuple2<A1, A2> > |
+CreateFunctor(R (*function)(X1, X2, A1, A2), const P1& p1, const P2& p2) { |
+ MutantRunner<R, Tuple2<A1, A2> >* t = |
+ new MutantFunction<R, R (*)(X1, X2, A1, A2), |
+ Tuple2<P1, P2>, Tuple2<A1, A2> > |
+ (function, MakeTuple(p1, p2)); |
+ return MutantFunctor<R, Tuple2<A1, A2> >(t); |
+} |
+ |
#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
-// 2 - 2 |
-template <typename R, typename T, typename P1, typename P2, typename A1, |
- typename A2, typename X1, typename X2> |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename A1, typename A2, typename X1, typename X2> |
inline MutantFunctor<R, Tuple2<A1, A2> > |
-CreateFunctor(T** obj, R (T::*method)(X1, X2, A1, A2), const P1& p1, |
+CreateFunctor(T** obj, R (U::*method)(X1, X2, A1, A2), const P1& p1, |
const P2& p2) { |
- MutantRunner<R, Tuple2<A1, A2> > *t = |
- new MutantLateObjectBind<R, T, R (T::*)(X1, X2, A1, A2), |
+ MutantRunner<R, Tuple2<A1, A2> >* t = |
+ new MutantLateObjectBind<R, T, R (U::*)(X1, X2, A1, A2), |
Tuple2<P1, P2>, Tuple2<A1, A2> > |
(obj, method, MakeTuple(p1, p2)); |
return MutantFunctor<R, Tuple2<A1, A2> >(t); |
} |
-#endif |
+#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
+#if defined (OS_WIN) |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename A1, typename A2, typename X1, typename X2> |
+inline MutantFunctor<R, Tuple2<A1, A2> > |
+CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1, A2), const P1& p1, |
+ const P2& p2) { |
+ MutantRunner<R, Tuple2<A1, A2> >* t = |
+ new Mutant<R, T, R (__stdcall U::*)(X1, X2, A1, A2), |
+ Tuple2<P1, P2>, Tuple2<A1, A2> > |
+ (obj, method, MakeTuple(p1, p2)); |
+ return MutantFunctor<R, Tuple2<A1, A2> >(t); |
+} |
+#endif // OS_WIN |
+ |
// 2 - 3 |
-template <typename R, typename T, typename P1, typename P2, typename A1, |
- typename A2, typename A3, typename X1, typename X2> |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename A1, typename A2, typename A3, typename X1, typename X2> |
inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
-CreateFunctor(T* obj, R (T::*method)(X1, X2, A1, A2, A3), const P1& p1, |
+CreateFunctor(T* obj, R (U::*method)(X1, X2, A1, A2, A3), const P1& p1, |
const P2& p2) { |
- MutantRunner<R, Tuple3<A1, A2, A3> > *t = |
- new Mutant<R, T, R (T::*)(X1, X2, A1, A2, A3), |
+ MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
+ new Mutant<R, T, R (U::*)(X1, X2, A1, A2, A3), |
Tuple2<P1, P2>, Tuple3<A1, A2, A3> > |
(obj, method, MakeTuple(p1, p2)); |
return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
} |
+template <typename R, typename P1, typename P2, typename A1, typename A2, |
+ typename A3, typename X1, typename X2> |
+inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
+CreateFunctor(R (*function)(X1, X2, A1, A2, A3), const P1& p1, const P2& p2) { |
+ MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
+ new MutantFunction<R, R (*)(X1, X2, A1, A2, A3), |
+ Tuple2<P1, P2>, Tuple3<A1, A2, A3> > |
+ (function, MakeTuple(p1, p2)); |
+ return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
+} |
+ |
#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
-// 2 - 3 |
-template <typename R, typename T, typename P1, typename P2, typename A1, |
- typename A2, typename A3, typename X1, typename X2> |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename A1, typename A2, typename A3, typename X1, typename X2> |
inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
-CreateFunctor(T** obj, R (T::*method)(X1, X2, A1, A2, A3), const P1& p1, |
+CreateFunctor(T** obj, R (U::*method)(X1, X2, A1, A2, A3), const P1& p1, |
const P2& p2) { |
- MutantRunner<R, Tuple3<A1, A2, A3> > *t = |
- new MutantLateObjectBind<R, T, R (T::*)(X1, X2, A1, A2, A3), |
+ MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
+ new MutantLateObjectBind<R, T, R (U::*)(X1, X2, A1, A2, A3), |
Tuple2<P1, P2>, Tuple3<A1, A2, A3> > |
(obj, method, MakeTuple(p1, p2)); |
return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
} |
-#endif |
+#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
+#if defined (OS_WIN) |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename A1, typename A2, typename A3, typename X1, typename X2> |
+inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
+CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3), |
+ const P1& p1, const P2& p2) { |
+ MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
+ new Mutant<R, T, R (__stdcall U::*)(X1, X2, A1, A2, A3), |
+ Tuple2<P1, P2>, Tuple3<A1, A2, A3> > |
+ (obj, method, MakeTuple(p1, p2)); |
+ return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
+} |
+#endif // OS_WIN |
+ |
// 2 - 4 |
-template <typename R, typename T, typename P1, typename P2, typename A1, |
- typename A2, typename A3, typename A4, typename X1, typename X2> |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename A1, typename A2, typename A3, typename A4, typename X1, |
+ typename X2> |
inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
-CreateFunctor(T* obj, R (T::*method)(X1, X2, A1, A2, A3, A4), const P1& p1, |
+CreateFunctor(T* obj, R (U::*method)(X1, X2, A1, A2, A3, A4), const P1& p1, |
const P2& p2) { |
- MutantRunner<R, Tuple4<A1, A2, A3, A4> > *t = |
- new Mutant<R, T, R (T::*)(X1, X2, A1, A2, A3, A4), |
+ MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
+ new Mutant<R, T, R (U::*)(X1, X2, A1, A2, A3, A4), |
Tuple2<P1, P2>, Tuple4<A1, A2, A3, A4> > |
(obj, method, MakeTuple(p1, p2)); |
return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
} |
+template <typename R, typename P1, typename P2, typename A1, typename A2, |
+ typename A3, typename A4, typename X1, typename X2> |
+inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
+CreateFunctor(R (*function)(X1, X2, A1, A2, A3, A4), const P1& p1, |
+ const P2& p2) { |
+ MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
+ new MutantFunction<R, R (*)(X1, X2, A1, A2, A3, A4), |
+ Tuple2<P1, P2>, Tuple4<A1, A2, A3, A4> > |
+ (function, MakeTuple(p1, p2)); |
+ return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
+} |
+ |
#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
-// 2 - 4 |
-template <typename R, typename T, typename P1, typename P2, typename A1, |
- typename A2, typename A3, typename A4, typename X1, typename X2> |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename A1, typename A2, typename A3, typename A4, typename X1, |
+ typename X2> |
inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
-CreateFunctor(T** obj, R (T::*method)(X1, X2, A1, A2, A3, A4), const P1& p1, |
+CreateFunctor(T** obj, R (U::*method)(X1, X2, A1, A2, A3, A4), const P1& p1, |
const P2& p2) { |
- MutantRunner<R, Tuple4<A1, A2, A3, A4> > *t = |
- new MutantLateObjectBind<R, T, R (T::*)(X1, X2, A1, A2, A3, A4), |
+ MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
+ new MutantLateObjectBind<R, T, R (U::*)(X1, X2, A1, A2, A3, A4), |
Tuple2<P1, P2>, Tuple4<A1, A2, A3, A4> > |
(obj, method, MakeTuple(p1, p2)); |
return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
} |
-#endif |
+#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
+#if defined (OS_WIN) |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename A1, typename A2, typename A3, typename A4, typename X1, |
+ typename X2> |
+inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
+CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3, A4), |
+ const P1& p1, const P2& p2) { |
+ MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
+ new Mutant<R, T, R (__stdcall U::*)(X1, X2, A1, A2, A3, A4), |
+ Tuple2<P1, P2>, Tuple4<A1, A2, A3, A4> > |
+ (obj, method, MakeTuple(p1, p2)); |
+ return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
+} |
+#endif // OS_WIN |
+ |
// 3 - 0 |
-template <typename R, typename T, typename P1, typename P2, typename P3, |
- typename X1, typename X2, typename X3> |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename P3, typename X1, typename X2, typename X3> |
inline MutantFunctor<R, Tuple0> |
-CreateFunctor(T* obj, R (T::*method)(X1, X2, X3), const P1& p1, const P2& p2, |
+CreateFunctor(T* obj, R (U::*method)(X1, X2, X3), const P1& p1, const P2& p2, |
const P3& p3) { |
- MutantRunner<R, Tuple0> *t = |
- new Mutant<R, T, R (T::*)(X1, X2, X3), |
+ MutantRunner<R, Tuple0>* t = |
+ new Mutant<R, T, R (U::*)(X1, X2, X3), |
Tuple3<P1, P2, P3>, Tuple0> |
(obj, method, MakeTuple(p1, p2, p3)); |
return MutantFunctor<R, Tuple0>(t); |
} |
+template <typename R, typename P1, typename P2, typename P3, typename X1, |
+ typename X2, typename X3> |
+inline MutantFunctor<R, Tuple0> |
+CreateFunctor(R (*function)(X1, X2, X3), const P1& p1, const P2& p2, |
+ const P3& p3) { |
+ MutantRunner<R, Tuple0>* t = |
+ new MutantFunction<R, R (*)(X1, X2, X3), |
+ Tuple3<P1, P2, P3>, Tuple0> |
+ (function, MakeTuple(p1, p2, p3)); |
+ return MutantFunctor<R, Tuple0>(t); |
+} |
+ |
#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
-// 3 - 0 |
-template <typename R, typename T, typename P1, typename P2, typename P3, |
- typename X1, typename X2, typename X3> |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename P3, typename X1, typename X2, typename X3> |
inline MutantFunctor<R, Tuple0> |
-CreateFunctor(T** obj, R (T::*method)(X1, X2, X3), const P1& p1, const P2& p2, |
+CreateFunctor(T** obj, R (U::*method)(X1, X2, X3), const P1& p1, const P2& p2, |
const P3& p3) { |
- MutantRunner<R, Tuple0> *t = |
- new MutantLateObjectBind<R, T, R (T::*)(X1, X2, X3), |
+ MutantRunner<R, Tuple0>* t = |
+ new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3), |
Tuple3<P1, P2, P3>, Tuple0> |
(obj, method, MakeTuple(p1, p2, p3)); |
return MutantFunctor<R, Tuple0>(t); |
} |
-#endif |
+#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
+#if defined (OS_WIN) |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename P3, typename X1, typename X2, typename X3> |
+inline MutantFunctor<R, Tuple0> |
+CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3), const P1& p1, |
+ const P2& p2, const P3& p3) { |
+ MutantRunner<R, Tuple0>* t = |
+ new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3), |
+ Tuple3<P1, P2, P3>, Tuple0> |
+ (obj, method, MakeTuple(p1, p2, p3)); |
+ return MutantFunctor<R, Tuple0>(t); |
+} |
+#endif // OS_WIN |
+ |
// 3 - 1 |
-template <typename R, typename T, typename P1, typename P2, typename P3, |
- typename A1, typename X1, typename X2, typename X3> |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename P3, typename A1, typename X1, typename X2, typename X3> |
inline MutantFunctor<R, Tuple1<A1> > |
-CreateFunctor(T* obj, R (T::*method)(X1, X2, X3, A1), const P1& p1, |
+CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1), const P1& p1, |
const P2& p2, const P3& p3) { |
- MutantRunner<R, Tuple1<A1> > *t = |
- new Mutant<R, T, R (T::*)(X1, X2, X3, A1), |
+ MutantRunner<R, Tuple1<A1> >* t = |
+ new Mutant<R, T, R (U::*)(X1, X2, X3, A1), |
Tuple3<P1, P2, P3>, Tuple1<A1> > |
(obj, method, MakeTuple(p1, p2, p3)); |
return MutantFunctor<R, Tuple1<A1> >(t); |
} |
+template <typename R, typename P1, typename P2, typename P3, typename A1, |
+ typename X1, typename X2, typename X3> |
+inline MutantFunctor<R, Tuple1<A1> > |
+CreateFunctor(R (*function)(X1, X2, X3, A1), const P1& p1, const P2& p2, |
+ const P3& p3) { |
+ MutantRunner<R, Tuple1<A1> >* t = |
+ new MutantFunction<R, R (*)(X1, X2, X3, A1), |
+ Tuple3<P1, P2, P3>, Tuple1<A1> > |
+ (function, MakeTuple(p1, p2, p3)); |
+ return MutantFunctor<R, Tuple1<A1> >(t); |
+} |
+ |
#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
-// 3 - 1 |
-template <typename R, typename T, typename P1, typename P2, typename P3, |
- typename A1, typename X1, typename X2, typename X3> |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename P3, typename A1, typename X1, typename X2, typename X3> |
inline MutantFunctor<R, Tuple1<A1> > |
-CreateFunctor(T** obj, R (T::*method)(X1, X2, X3, A1), const P1& p1, |
+CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1), const P1& p1, |
const P2& p2, const P3& p3) { |
- MutantRunner<R, Tuple1<A1> > *t = |
- new MutantLateObjectBind<R, T, R (T::*)(X1, X2, X3, A1), |
+ MutantRunner<R, Tuple1<A1> >* t = |
+ new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, A1), |
Tuple3<P1, P2, P3>, Tuple1<A1> > |
(obj, method, MakeTuple(p1, p2, p3)); |
return MutantFunctor<R, Tuple1<A1> >(t); |
} |
-#endif |
+#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
+#if defined (OS_WIN) |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename P3, typename A1, typename X1, typename X2, typename X3> |
+inline MutantFunctor<R, Tuple1<A1> > |
+CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1), const P1& p1, |
+ const P2& p2, const P3& p3) { |
+ MutantRunner<R, Tuple1<A1> >* t = |
+ new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, A1), |
+ Tuple3<P1, P2, P3>, Tuple1<A1> > |
+ (obj, method, MakeTuple(p1, p2, p3)); |
+ return MutantFunctor<R, Tuple1<A1> >(t); |
+} |
+#endif // OS_WIN |
+ |
// 3 - 2 |
-template <typename R, typename T, typename P1, typename P2, typename P3, |
- typename A1, typename A2, typename X1, typename X2, typename X3> |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename P3, typename A1, typename A2, typename X1, typename X2, |
+ typename X3> |
inline MutantFunctor<R, Tuple2<A1, A2> > |
-CreateFunctor(T* obj, R (T::*method)(X1, X2, X3, A1, A2), const P1& p1, |
+CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1, A2), const P1& p1, |
const P2& p2, const P3& p3) { |
- MutantRunner<R, Tuple2<A1, A2> > *t = |
- new Mutant<R, T, R (T::*)(X1, X2, X3, A1, A2), |
+ MutantRunner<R, Tuple2<A1, A2> >* t = |
+ new Mutant<R, T, R (U::*)(X1, X2, X3, A1, A2), |
Tuple3<P1, P2, P3>, Tuple2<A1, A2> > |
(obj, method, MakeTuple(p1, p2, p3)); |
return MutantFunctor<R, Tuple2<A1, A2> >(t); |
} |
+template <typename R, typename P1, typename P2, typename P3, typename A1, |
+ typename A2, typename X1, typename X2, typename X3> |
+inline MutantFunctor<R, Tuple2<A1, A2> > |
+CreateFunctor(R (*function)(X1, X2, X3, A1, A2), const P1& p1, const P2& p2, |
+ const P3& p3) { |
+ MutantRunner<R, Tuple2<A1, A2> >* t = |
+ new MutantFunction<R, R (*)(X1, X2, X3, A1, A2), |
+ Tuple3<P1, P2, P3>, Tuple2<A1, A2> > |
+ (function, MakeTuple(p1, p2, p3)); |
+ return MutantFunctor<R, Tuple2<A1, A2> >(t); |
+} |
+ |
#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
-// 3 - 2 |
-template <typename R, typename T, typename P1, typename P2, typename P3, |
- typename A1, typename A2, typename X1, typename X2, typename X3> |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename P3, typename A1, typename A2, typename X1, typename X2, |
+ typename X3> |
inline MutantFunctor<R, Tuple2<A1, A2> > |
-CreateFunctor(T** obj, R (T::*method)(X1, X2, X3, A1, A2), const P1& p1, |
+CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1, A2), const P1& p1, |
const P2& p2, const P3& p3) { |
- MutantRunner<R, Tuple2<A1, A2> > *t = |
- new MutantLateObjectBind<R, T, R (T::*)(X1, X2, X3, A1, A2), |
+ MutantRunner<R, Tuple2<A1, A2> >* t = |
+ new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, A1, A2), |
Tuple3<P1, P2, P3>, Tuple2<A1, A2> > |
(obj, method, MakeTuple(p1, p2, p3)); |
return MutantFunctor<R, Tuple2<A1, A2> >(t); |
} |
-#endif |
+#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
+#if defined (OS_WIN) |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename P3, typename A1, typename A2, typename X1, typename X2, |
+ typename X3> |
+inline MutantFunctor<R, Tuple2<A1, A2> > |
+CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2), |
+ const P1& p1, const P2& p2, const P3& p3) { |
+ MutantRunner<R, Tuple2<A1, A2> >* t = |
+ new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2), |
+ Tuple3<P1, P2, P3>, Tuple2<A1, A2> > |
+ (obj, method, MakeTuple(p1, p2, p3)); |
+ return MutantFunctor<R, Tuple2<A1, A2> >(t); |
+} |
+#endif // OS_WIN |
+ |
// 3 - 3 |
-template <typename R, typename T, typename P1, typename P2, typename P3, |
- typename A1, typename A2, typename A3, typename X1, typename X2, |
- typename X3> |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename P3, typename A1, typename A2, typename A3, typename X1, |
+ typename X2, typename X3> |
inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
-CreateFunctor(T* obj, R (T::*method)(X1, X2, X3, A1, A2, A3), const P1& p1, |
+CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1, A2, A3), const P1& p1, |
const P2& p2, const P3& p3) { |
- MutantRunner<R, Tuple3<A1, A2, A3> > *t = |
- new Mutant<R, T, R (T::*)(X1, X2, X3, A1, A2, A3), |
+ MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
+ new Mutant<R, T, R (U::*)(X1, X2, X3, A1, A2, A3), |
Tuple3<P1, P2, P3>, Tuple3<A1, A2, A3> > |
(obj, method, MakeTuple(p1, p2, p3)); |
return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
} |
+template <typename R, typename P1, typename P2, typename P3, typename A1, |
+ typename A2, typename A3, typename X1, typename X2, typename X3> |
+inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
+CreateFunctor(R (*function)(X1, X2, X3, A1, A2, A3), const P1& p1, const P2& p2, |
+ const P3& p3) { |
+ MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
+ new MutantFunction<R, R (*)(X1, X2, X3, A1, A2, A3), |
+ Tuple3<P1, P2, P3>, Tuple3<A1, A2, A3> > |
+ (function, MakeTuple(p1, p2, p3)); |
+ return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
+} |
+ |
#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
-// 3 - 3 |
-template <typename R, typename T, typename P1, typename P2, typename P3, |
- typename A1, typename A2, typename A3, typename X1, typename X2, |
- typename X3> |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename P3, typename A1, typename A2, typename A3, typename X1, |
+ typename X2, typename X3> |
inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
-CreateFunctor(T** obj, R (T::*method)(X1, X2, X3, A1, A2, A3), const P1& p1, |
+CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1, A2, A3), const P1& p1, |
const P2& p2, const P3& p3) { |
- MutantRunner<R, Tuple3<A1, A2, A3> > *t = |
- new MutantLateObjectBind<R, T, R (T::*)(X1, X2, X3, A1, A2, A3), |
+ MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
+ new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, A1, A2, A3), |
Tuple3<P1, P2, P3>, Tuple3<A1, A2, A3> > |
(obj, method, MakeTuple(p1, p2, p3)); |
return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
} |
-#endif |
+#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
+#if defined (OS_WIN) |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename P3, typename A1, typename A2, typename A3, typename X1, |
+ typename X2, typename X3> |
+inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
+CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3), |
+ const P1& p1, const P2& p2, const P3& p3) { |
+ MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
+ new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2, A3), |
+ Tuple3<P1, P2, P3>, Tuple3<A1, A2, A3> > |
+ (obj, method, MakeTuple(p1, p2, p3)); |
+ return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
+} |
+#endif // OS_WIN |
+ |
// 3 - 4 |
-template <typename R, typename T, typename P1, typename P2, typename P3, |
- typename A1, typename A2, typename A3, typename A4, typename X1, |
- typename X2, typename X3> |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename P3, typename A1, typename A2, typename A3, typename A4, |
+ typename X1, typename X2, typename X3> |
inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
-CreateFunctor(T* obj, R (T::*method)(X1, X2, X3, A1, A2, A3, A4), const P1& p1, |
+CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1, A2, A3, A4), const P1& p1, |
const P2& p2, const P3& p3) { |
- MutantRunner<R, Tuple4<A1, A2, A3, A4> > *t = |
- new Mutant<R, T, R (T::*)(X1, X2, X3, A1, A2, A3, A4), |
+ MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
+ new Mutant<R, T, R (U::*)(X1, X2, X3, A1, A2, A3, A4), |
Tuple3<P1, P2, P3>, Tuple4<A1, A2, A3, A4> > |
(obj, method, MakeTuple(p1, p2, p3)); |
return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
} |
+template <typename R, typename P1, typename P2, typename P3, typename A1, |
+ typename A2, typename A3, typename A4, typename X1, typename X2, |
+ typename X3> |
+inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
+CreateFunctor(R (*function)(X1, X2, X3, A1, A2, A3, A4), const P1& p1, |
+ const P2& p2, const P3& p3) { |
+ MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
+ new MutantFunction<R, R (*)(X1, X2, X3, A1, A2, A3, A4), |
+ Tuple3<P1, P2, P3>, Tuple4<A1, A2, A3, A4> > |
+ (function, MakeTuple(p1, p2, p3)); |
+ return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
+} |
+ |
#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
-// 3 - 4 |
-template <typename R, typename T, typename P1, typename P2, typename P3, |
- typename A1, typename A2, typename A3, typename A4, typename X1, |
- typename X2, typename X3> |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename P3, typename A1, typename A2, typename A3, typename A4, |
+ typename X1, typename X2, typename X3> |
inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
-CreateFunctor(T** obj, R (T::*method)(X1, X2, X3, A1, A2, A3, A4), const P1& p1, |
+CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1, A2, A3, A4), const P1& p1, |
const P2& p2, const P3& p3) { |
- MutantRunner<R, Tuple4<A1, A2, A3, A4> > *t = |
- new MutantLateObjectBind<R, T, R (T::*)(X1, X2, X3, A1, A2, A3, A4), |
+ MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
+ new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, A1, A2, A3, A4), |
Tuple3<P1, P2, P3>, Tuple4<A1, A2, A3, A4> > |
(obj, method, MakeTuple(p1, p2, p3)); |
return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
} |
-#endif |
+#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
+#if defined (OS_WIN) |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename P3, typename A1, typename A2, typename A3, typename A4, |
+ typename X1, typename X2, typename X3> |
+inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
+CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3, A4), |
+ const P1& p1, const P2& p2, const P3& p3) { |
+ MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
+ new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2, A3, A4), |
+ Tuple3<P1, P2, P3>, Tuple4<A1, A2, A3, A4> > |
+ (obj, method, MakeTuple(p1, p2, p3)); |
+ return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
+} |
+#endif // OS_WIN |
+ |
// 4 - 0 |
-template <typename R, typename T, typename P1, typename P2, typename P3, |
- typename P4, typename X1, typename X2, typename X3, typename X4> |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename P3, typename P4, typename X1, typename X2, typename X3, |
+ typename X4> |
inline MutantFunctor<R, Tuple0> |
-CreateFunctor(T* obj, R (T::*method)(X1, X2, X3, X4), const P1& p1, |
+CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4), const P1& p1, |
const P2& p2, const P3& p3, const P4& p4) { |
- MutantRunner<R, Tuple0> *t = |
- new Mutant<R, T, R (T::*)(X1, X2, X3, X4), |
+ MutantRunner<R, Tuple0>* t = |
+ new Mutant<R, T, R (U::*)(X1, X2, X3, X4), |
Tuple4<P1, P2, P3, P4>, Tuple0> |
(obj, method, MakeTuple(p1, p2, p3, p4)); |
return MutantFunctor<R, Tuple0>(t); |
} |
+template <typename R, typename P1, typename P2, typename P3, typename P4, |
+ typename X1, typename X2, typename X3, typename X4> |
+inline MutantFunctor<R, Tuple0> |
+CreateFunctor(R (*function)(X1, X2, X3, X4), const P1& p1, const P2& p2, |
+ const P3& p3, const P4& p4) { |
+ MutantRunner<R, Tuple0>* t = |
+ new MutantFunction<R, R (*)(X1, X2, X3, X4), |
+ Tuple4<P1, P2, P3, P4>, Tuple0> |
+ (function, MakeTuple(p1, p2, p3, p4)); |
+ return MutantFunctor<R, Tuple0>(t); |
+} |
+ |
#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
-// 4 - 0 |
-template <typename R, typename T, typename P1, typename P2, typename P3, |
- typename P4, typename X1, typename X2, typename X3, typename X4> |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename P3, typename P4, typename X1, typename X2, typename X3, |
+ typename X4> |
inline MutantFunctor<R, Tuple0> |
-CreateFunctor(T** obj, R (T::*method)(X1, X2, X3, X4), const P1& p1, |
+CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4), const P1& p1, |
const P2& p2, const P3& p3, const P4& p4) { |
- MutantRunner<R, Tuple0> *t = |
- new MutantLateObjectBind<R, T, R (T::*)(X1, X2, X3, X4), |
+ MutantRunner<R, Tuple0>* t = |
+ new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4), |
Tuple4<P1, P2, P3, P4>, Tuple0> |
(obj, method, MakeTuple(p1, p2, p3, p4)); |
return MutantFunctor<R, Tuple0>(t); |
} |
-#endif |
+#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
+#if defined (OS_WIN) |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename P3, typename P4, typename X1, typename X2, typename X3, |
+ typename X4> |
+inline MutantFunctor<R, Tuple0> |
+CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4), const P1& p1, |
+ const P2& p2, const P3& p3, const P4& p4) { |
+ MutantRunner<R, Tuple0>* t = |
+ new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4), |
+ Tuple4<P1, P2, P3, P4>, Tuple0> |
+ (obj, method, MakeTuple(p1, p2, p3, p4)); |
+ return MutantFunctor<R, Tuple0>(t); |
+} |
+#endif // OS_WIN |
+ |
// 4 - 1 |
-template <typename R, typename T, typename P1, typename P2, typename P3, |
- typename P4, typename A1, typename X1, typename X2, typename X3, |
- typename X4> |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename P3, typename P4, typename A1, typename X1, typename X2, |
+ typename X3, typename X4> |
inline MutantFunctor<R, Tuple1<A1> > |
-CreateFunctor(T* obj, R (T::*method)(X1, X2, X3, X4, A1), const P1& p1, |
+CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1), const P1& p1, |
const P2& p2, const P3& p3, const P4& p4) { |
- MutantRunner<R, Tuple1<A1> > *t = |
- new Mutant<R, T, R (T::*)(X1, X2, X3, X4, A1), |
+ MutantRunner<R, Tuple1<A1> >* t = |
+ new Mutant<R, T, R (U::*)(X1, X2, X3, X4, A1), |
Tuple4<P1, P2, P3, P4>, Tuple1<A1> > |
(obj, method, MakeTuple(p1, p2, p3, p4)); |
return MutantFunctor<R, Tuple1<A1> >(t); |
} |
+template <typename R, typename P1, typename P2, typename P3, typename P4, |
+ typename A1, typename X1, typename X2, typename X3, typename X4> |
+inline MutantFunctor<R, Tuple1<A1> > |
+CreateFunctor(R (*function)(X1, X2, X3, X4, A1), const P1& p1, const P2& p2, |
+ const P3& p3, const P4& p4) { |
+ MutantRunner<R, Tuple1<A1> >* t = |
+ new MutantFunction<R, R (*)(X1, X2, X3, X4, A1), |
+ Tuple4<P1, P2, P3, P4>, Tuple1<A1> > |
+ (function, MakeTuple(p1, p2, p3, p4)); |
+ return MutantFunctor<R, Tuple1<A1> >(t); |
+} |
+ |
#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
-// 4 - 1 |
-template <typename R, typename T, typename P1, typename P2, typename P3, |
- typename P4, typename A1, typename X1, typename X2, typename X3, |
- typename X4> |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename P3, typename P4, typename A1, typename X1, typename X2, |
+ typename X3, typename X4> |
inline MutantFunctor<R, Tuple1<A1> > |
-CreateFunctor(T** obj, R (T::*method)(X1, X2, X3, X4, A1), const P1& p1, |
+CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1), const P1& p1, |
const P2& p2, const P3& p3, const P4& p4) { |
- MutantRunner<R, Tuple1<A1> > *t = |
- new MutantLateObjectBind<R, T, R (T::*)(X1, X2, X3, X4, A1), |
+ MutantRunner<R, Tuple1<A1> >* t = |
+ new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, A1), |
Tuple4<P1, P2, P3, P4>, Tuple1<A1> > |
(obj, method, MakeTuple(p1, p2, p3, p4)); |
return MutantFunctor<R, Tuple1<A1> >(t); |
} |
-#endif |
+#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
+#if defined (OS_WIN) |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename P3, typename P4, typename A1, typename X1, typename X2, |
+ typename X3, typename X4> |
+inline MutantFunctor<R, Tuple1<A1> > |
+CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1), |
+ const P1& p1, const P2& p2, const P3& p3, const P4& p4) { |
+ MutantRunner<R, Tuple1<A1> >* t = |
+ new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1), |
+ Tuple4<P1, P2, P3, P4>, Tuple1<A1> > |
+ (obj, method, MakeTuple(p1, p2, p3, p4)); |
+ return MutantFunctor<R, Tuple1<A1> >(t); |
+} |
+#endif // OS_WIN |
+ |
// 4 - 2 |
-template <typename R, typename T, typename P1, typename P2, typename P3, |
- typename P4, typename A1, typename A2, typename X1, typename X2, |
- typename X3, typename X4> |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename P3, typename P4, typename A1, typename A2, typename X1, |
+ typename X2, typename X3, typename X4> |
inline MutantFunctor<R, Tuple2<A1, A2> > |
-CreateFunctor(T* obj, R (T::*method)(X1, X2, X3, X4, A1, A2), const P1& p1, |
+CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1, A2), const P1& p1, |
const P2& p2, const P3& p3, const P4& p4) { |
- MutantRunner<R, Tuple2<A1, A2> > *t = |
- new Mutant<R, T, R (T::*)(X1, X2, X3, X4, A1, A2), |
+ MutantRunner<R, Tuple2<A1, A2> >* t = |
+ new Mutant<R, T, R (U::*)(X1, X2, X3, X4, A1, A2), |
Tuple4<P1, P2, P3, P4>, Tuple2<A1, A2> > |
(obj, method, MakeTuple(p1, p2, p3, p4)); |
return MutantFunctor<R, Tuple2<A1, A2> >(t); |
} |
+template <typename R, typename P1, typename P2, typename P3, typename P4, |
+ typename A1, typename A2, typename X1, typename X2, typename X3, |
+ typename X4> |
+inline MutantFunctor<R, Tuple2<A1, A2> > |
+CreateFunctor(R (*function)(X1, X2, X3, X4, A1, A2), const P1& p1, const P2& p2, |
+ const P3& p3, const P4& p4) { |
+ MutantRunner<R, Tuple2<A1, A2> >* t = |
+ new MutantFunction<R, R (*)(X1, X2, X3, X4, A1, A2), |
+ Tuple4<P1, P2, P3, P4>, Tuple2<A1, A2> > |
+ (function, MakeTuple(p1, p2, p3, p4)); |
+ return MutantFunctor<R, Tuple2<A1, A2> >(t); |
+} |
+ |
#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
-// 4 - 2 |
-template <typename R, typename T, typename P1, typename P2, typename P3, |
- typename P4, typename A1, typename A2, typename X1, typename X2, |
- typename X3, typename X4> |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename P3, typename P4, typename A1, typename A2, typename X1, |
+ typename X2, typename X3, typename X4> |
inline MutantFunctor<R, Tuple2<A1, A2> > |
-CreateFunctor(T** obj, R (T::*method)(X1, X2, X3, X4, A1, A2), const P1& p1, |
+CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1, A2), const P1& p1, |
const P2& p2, const P3& p3, const P4& p4) { |
- MutantRunner<R, Tuple2<A1, A2> > *t = |
- new MutantLateObjectBind<R, T, R (T::*)(X1, X2, X3, X4, A1, A2), |
+ MutantRunner<R, Tuple2<A1, A2> >* t = |
+ new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, A1, A2), |
Tuple4<P1, P2, P3, P4>, Tuple2<A1, A2> > |
(obj, method, MakeTuple(p1, p2, p3, p4)); |
return MutantFunctor<R, Tuple2<A1, A2> >(t); |
} |
-#endif |
+#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
+#if defined (OS_WIN) |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename P3, typename P4, typename A1, typename A2, typename X1, |
+ typename X2, typename X3, typename X4> |
+inline MutantFunctor<R, Tuple2<A1, A2> > |
+CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2), |
+ const P1& p1, const P2& p2, const P3& p3, const P4& p4) { |
+ MutantRunner<R, Tuple2<A1, A2> >* t = |
+ new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2), |
+ Tuple4<P1, P2, P3, P4>, Tuple2<A1, A2> > |
+ (obj, method, MakeTuple(p1, p2, p3, p4)); |
+ return MutantFunctor<R, Tuple2<A1, A2> >(t); |
+} |
+#endif // OS_WIN |
+ |
// 4 - 3 |
-template <typename R, typename T, typename P1, typename P2, typename P3, |
- typename P4, typename A1, typename A2, typename A3, typename X1, |
- typename X2, typename X3, typename X4> |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename P3, typename P4, typename A1, typename A2, typename A3, |
+ typename X1, typename X2, typename X3, typename X4> |
inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
-CreateFunctor(T* obj, R (T::*method)(X1, X2, X3, X4, A1, A2, A3), const P1& p1, |
+CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3), const P1& p1, |
const P2& p2, const P3& p3, const P4& p4) { |
- MutantRunner<R, Tuple3<A1, A2, A3> > *t = |
- new Mutant<R, T, R (T::*)(X1, X2, X3, X4, A1, A2, A3), |
+ MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
+ new Mutant<R, T, R (U::*)(X1, X2, X3, X4, A1, A2, A3), |
Tuple4<P1, P2, P3, P4>, Tuple3<A1, A2, A3> > |
(obj, method, MakeTuple(p1, p2, p3, p4)); |
return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
} |
+template <typename R, typename P1, typename P2, typename P3, typename P4, |
+ typename A1, typename A2, typename A3, typename X1, typename X2, |
+ typename X3, typename X4> |
+inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
+CreateFunctor(R (*function)(X1, X2, X3, X4, A1, A2, A3), const P1& p1, |
+ const P2& p2, const P3& p3, const P4& p4) { |
+ MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
+ new MutantFunction<R, R (*)(X1, X2, X3, X4, A1, A2, A3), |
+ Tuple4<P1, P2, P3, P4>, Tuple3<A1, A2, A3> > |
+ (function, MakeTuple(p1, p2, p3, p4)); |
+ return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
+} |
+ |
#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
-// 4 - 3 |
-template <typename R, typename T, typename P1, typename P2, typename P3, |
- typename P4, typename A1, typename A2, typename A3, typename X1, |
- typename X2, typename X3, typename X4> |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename P3, typename P4, typename A1, typename A2, typename A3, |
+ typename X1, typename X2, typename X3, typename X4> |
inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
-CreateFunctor(T** obj, R (T::*method)(X1, X2, X3, X4, A1, A2, A3), const P1& p1, |
+CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3), const P1& p1, |
const P2& p2, const P3& p3, const P4& p4) { |
- MutantRunner<R, Tuple3<A1, A2, A3> > *t = |
- new MutantLateObjectBind<R, T, R (T::*)(X1, X2, X3, X4, A1, A2, A3), |
+ MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
+ new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, A1, A2, A3), |
Tuple4<P1, P2, P3, P4>, Tuple3<A1, A2, A3> > |
(obj, method, MakeTuple(p1, p2, p3, p4)); |
return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
} |
-#endif |
+#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
+#if defined (OS_WIN) |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename P3, typename P4, typename A1, typename A2, typename A3, |
+ typename X1, typename X2, typename X3, typename X4> |
+inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
+CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3), |
+ const P1& p1, const P2& p2, const P3& p3, const P4& p4) { |
+ MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
+ new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2, A3), |
+ Tuple4<P1, P2, P3, P4>, Tuple3<A1, A2, A3> > |
+ (obj, method, MakeTuple(p1, p2, p3, p4)); |
+ return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
+} |
+#endif // OS_WIN |
+ |
// 4 - 4 |
-template <typename R, typename T, typename P1, typename P2, typename P3, |
- typename P4, typename A1, typename A2, typename A3, typename A4, |
- typename X1, typename X2, typename X3, typename X4> |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename P3, typename P4, typename A1, typename A2, typename A3, |
+ typename A4, typename X1, typename X2, typename X3, typename X4> |
inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
-CreateFunctor(T* obj, R (T::*method)(X1, X2, X3, X4, A1, A2, A3, A4), |
+CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3, A4), |
const P1& p1, const P2& p2, const P3& p3, const P4& p4) { |
- MutantRunner<R, Tuple4<A1, A2, A3, A4> > *t = |
- new Mutant<R, T, R (T::*)(X1, X2, X3, X4, A1, A2, A3, A4), |
+ MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
+ new Mutant<R, T, R (U::*)(X1, X2, X3, X4, A1, A2, A3, A4), |
Tuple4<P1, P2, P3, P4>, Tuple4<A1, A2, A3, A4> > |
(obj, method, MakeTuple(p1, p2, p3, p4)); |
return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
} |
+template <typename R, typename P1, typename P2, typename P3, typename P4, |
+ typename A1, typename A2, typename A3, typename A4, typename X1, |
+ typename X2, typename X3, typename X4> |
+inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
+CreateFunctor(R (*function)(X1, X2, X3, X4, A1, A2, A3, A4), const P1& p1, |
+ const P2& p2, const P3& p3, const P4& p4) { |
+ MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
+ new MutantFunction<R, R (*)(X1, X2, X3, X4, A1, A2, A3, A4), |
+ Tuple4<P1, P2, P3, P4>, Tuple4<A1, A2, A3, A4> > |
+ (function, MakeTuple(p1, p2, p3, p4)); |
+ return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
+} |
+ |
#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
-// 4 - 4 |
-template <typename R, typename T, typename P1, typename P2, typename P3, |
- typename P4, typename A1, typename A2, typename A3, typename A4, |
- typename X1, typename X2, typename X3, typename X4> |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename P3, typename P4, typename A1, typename A2, typename A3, |
+ typename A4, typename X1, typename X2, typename X3, typename X4> |
inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
-CreateFunctor(T** obj, R (T::*method)(X1, X2, X3, X4, A1, A2, A3, A4), |
+CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3, A4), |
const P1& p1, const P2& p2, const P3& p3, const P4& p4) { |
- MutantRunner<R, Tuple4<A1, A2, A3, A4> > *t = |
- new MutantLateObjectBind<R, T, R (T::*)(X1, X2, X3, X4, A1, A2, A3, A4), |
+ MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
+ new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, A1, A2, A3, A4), |
Tuple4<P1, P2, P3, P4>, Tuple4<A1, A2, A3, A4> > |
(obj, method, MakeTuple(p1, p2, p3, p4)); |
return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
} |
-#endif |
+#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
+#if defined (OS_WIN) |
+template <typename R, typename T, typename U, typename P1, typename P2, |
+ typename P3, typename P4, typename A1, typename A2, typename A3, |
+ typename A4, typename X1, typename X2, typename X3, typename X4> |
+inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
+CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3, A4), |
+ const P1& p1, const P2& p2, const P3& p3, const P4& p4) { |
+ MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
+ new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2, A3, A4), |
+ Tuple4<P1, P2, P3, P4>, Tuple4<A1, A2, A3, A4> > |
+ (obj, method, MakeTuple(p1, p2, p3, p4)); |
+ return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
+} |
+#endif // OS_WIN |
+ |
} // namespace testing |
#endif // TESTING_GMOCK_MUTANT_H_ |