From 8d7f40abdc12186dab03800d65816db57c06533e Mon Sep 17 00:00:00 2001 From: "stoyan@chromium.org" Date: Thu, 12 Nov 2009 23:10:11 +0000 Subject: Add python script that generates gmock_mutant.h Resolve ambiguity - error C2782 in VisualC or "no matching function to call" in gcc - when attempt to create functor for base class member function. Support for free (non class members) functions. BUG=none TEST=none Review URL: http://codereview.chromium.org/371046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31848 0039d316-1c4b-4281-b951-d872f2087c98 --- testing/gmock_mutant.h | 1408 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 1102 insertions(+), 306 deletions(-) (limited to 'testing/gmock_mutant.h') diff --git a/testing/gmock_mutant.h b/testing/gmock_mutant.h index b92ec02..dd7435e 100644 --- a/testing/gmock_mutant.h +++ b/testing/gmock_mutant.h @@ -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 @@ inline R DispatchToMethod(T* obj, Method method, const Tuple0& c) { return (obj->*method)(); } +template +inline R DispatchToFunction(Function function, + const Tuple0& p, + const Tuple0& c) { + return (*function)(); +} // 0 - 1 template @@ -118,6 +129,12 @@ inline R DispatchToMethod(T* obj, Method method, const Tuple1& c) { return (obj->*method)(c.a); } +template +inline R DispatchToFunction(Function function, + const Tuple0& p, + const Tuple1& c) { + return (*function)(c.a); +} // 0 - 2 template @@ -126,6 +143,12 @@ inline R DispatchToMethod(T* obj, Method method, const Tuple2& c) { return (obj->*method)(c.a, c.b); } +template +inline R DispatchToFunction(Function function, + const Tuple0& p, + const Tuple2& c) { + return (*function)(c.a, c.b); +} // 0 - 3 template & c) { return (obj->*method)(c.a, c.b, c.c); } +template +inline R DispatchToFunction(Function function, + const Tuple0& p, + const Tuple3& c) { + return (*function)(c.a, c.b, c.c); +} // 0 - 4 template & c) { return (obj->*method)(c.a, c.b, c.c, c.d); } +template +inline R DispatchToFunction(Function function, + const Tuple0& p, + const Tuple4& c) { + return (*function)(c.a, c.b, c.c, c.d); +} // 1 - 0 template @@ -152,6 +188,12 @@ inline R DispatchToMethod(T* obj, Method method, const Tuple0& c) { return (obj->*method)(p.a); } +template +inline R DispatchToFunction(Function function, + const Tuple1& p, + const Tuple0& c) { + return (*function)(p.a); +} // 1 - 1 template @@ -160,6 +202,12 @@ inline R DispatchToMethod(T* obj, Method method, const Tuple1& c) { return (obj->*method)(p.a, c.a); } +template +inline R DispatchToFunction(Function function, + const Tuple1& p, + const Tuple1& c) { + return (*function)(p.a, c.a); +} // 1 - 2 template & c) { return (obj->*method)(p.a, c.a, c.b); } +template +inline R DispatchToFunction(Function function, + const Tuple1& p, + const Tuple2& c) { + return (*function)(p.a, c.a, c.b); +} // 1 - 3 template & c) { return (obj->*method)(p.a, c.a, c.b, c.c); } +template +inline R DispatchToFunction(Function function, + const Tuple1& p, + const Tuple3& c) { + return (*function)(p.a, c.a, c.b, c.c); +} // 1 - 4 template & c) { return (obj->*method)(p.a, c.a, c.b, c.c, c.d); } +template +inline R DispatchToFunction(Function function, + const Tuple1& p, + const Tuple4& c) { + return (*function)(p.a, c.a, c.b, c.c, c.d); +} // 2 - 0 template @@ -195,6 +263,12 @@ inline R DispatchToMethod(T* obj, Method method, const Tuple0& c) { return (obj->*method)(p.a, p.b); } +template +inline R DispatchToFunction(Function function, + const Tuple2& p, + const Tuple0& c) { + return (*function)(p.a, p.b); +} // 2 - 1 template & c) { return (obj->*method)(p.a, p.b, c.a); } +template +inline R DispatchToFunction(Function function, + const Tuple2& p, + const Tuple1& c) { + return (*function)(p.a, p.b, c.a); +} // 2 - 2 template & c) { return (obj->*method)(p.a, p.b, c.a, c.b); } +template +inline R DispatchToFunction(Function function, + const Tuple2& p, + const Tuple2& c) { + return (*function)(p.a, p.b, c.a, c.b); +} // 2 - 3 template & c) { return (obj->*method)(p.a, p.b, c.a, c.b, c.c); } +template +inline R DispatchToFunction(Function function, + const Tuple2& p, + const Tuple3& c) { + return (*function)(p.a, p.b, c.a, c.b, c.c); +} // 2 - 4 template & c) { return (obj->*method)(p.a, p.b, c.a, c.b, c.c, c.d); } +template +inline R DispatchToFunction(Function function, + const Tuple2& p, + const Tuple4& c) { + return (*function)(p.a, p.b, c.a, c.b, c.c, c.d); +} // 3 - 0 template *method)(p.a, p.b, p.c); } +template +inline R DispatchToFunction(Function function, + const Tuple3& p, + const Tuple0& c) { + return (*function)(p.a, p.b, p.c); +} // 3 - 1 template & c) { return (obj->*method)(p.a, p.b, p.c, c.a); } +template +inline R DispatchToFunction(Function function, + const Tuple3& p, + const Tuple1& c) { + return (*function)(p.a, p.b, p.c, c.a); +} // 3 - 2 template & c) { return (obj->*method)(p.a, p.b, p.c, c.a, c.b); } +template +inline R DispatchToFunction(Function function, + const Tuple3& p, + const Tuple2& c) { + return (*function)(p.a, p.b, p.c, c.a, c.b); +} // 3 - 3 template & c) { return (obj->*method)(p.a, p.b, p.c, c.a, c.b, c.c); } +template +inline R DispatchToFunction(Function function, + const Tuple3& p, + const Tuple3& c) { + return (*function)(p.a, p.b, p.c, c.a, c.b, c.c); +} // 3 - 4 template & c) { return (obj->*method)(p.a, p.b, p.c, c.a, c.b, c.c, c.d); } +template +inline R DispatchToFunction(Function function, + const Tuple3& p, + const Tuple4& c) { + return (*function)(p.a, p.b, p.c, c.a, c.b, c.c, c.d); +} // 4 - 0 template *method)(p.a, p.b, p.c, p.d); } +template +inline R DispatchToFunction(Function function, + const Tuple4& p, + const Tuple0& c) { + return (*function)(p.a, p.b, p.c, p.d); +} // 4 - 1 template & c) { return (obj->*method)(p.a, p.b, p.c, p.d, c.a); } +template +inline R DispatchToFunction(Function function, + const Tuple4& p, + const Tuple1& c) { + return (*function)(p.a, p.b, p.c, p.d, c.a); +} // 4 - 2 template & c) { return (obj->*method)(p.a, p.b, p.c, p.d, c.a, c.b); } +template +inline R DispatchToFunction(Function function, + const Tuple4& p, + const Tuple2& c) { + return (*function)(p.a, p.b, p.c, p.d, c.a, c.b); +} // 4 - 3 template & c) { return (obj->*method)(p.a, p.b, p.c, p.d, c.a, c.b, c.c); } +template +inline R DispatchToFunction(Function function, + const Tuple4& p, + const Tuple3& c) { + return (*function)(p.a, p.b, p.c, p.d, c.a, c.b, c.c); +} // 4 - 4 template & c) { return (obj->*method)(p.a, p.b, p.c, p.d, c.a, c.b, c.c, c.d); } +template +inline R DispatchToFunction(Function function, + const Tuple4& p, + const Tuple4& 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 @@ class Mutant : public MutantRunner { PreBound pb_; }; +template +class MutantFunction : public MutantRunner { + public: + MutantFunction(Function function, const PreBound& pb) + : function_(function), pb_(pb) { + } + + // MutantRunner implementation + virtual R RunWithParams(const Params& params) { + return DispatchToFunction(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,683 +607,1293 @@ struct MutantFunctor { linked_ptr > impl_; }; - - // 0 - 0 -template +template inline MutantFunctor -CreateFunctor(T* obj, R (T::*method)()) { - MutantRunner *t = - new Mutant* t = + new Mutant (obj, method, MakeTuple()); return MutantFunctor(t); } +template +inline MutantFunctor +CreateFunctor(R (*function)()) { + MutantRunner* t = + new MutantFunction + (function, MakeTuple()); + return MutantFunctor(t); +} + #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// 0 - 0 -template +template inline MutantFunctor -CreateFunctor(T** obj, R (T::*method)()) { - MutantRunner *t = - new MutantLateObjectBind* t = + new MutantLateObjectBind (obj, method, MakeTuple()); return MutantFunctor(t); } -#endif +#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING + +#if defined (OS_WIN) +template +inline MutantFunctor +CreateFunctor(T* obj, R (__stdcall U::*method)()) { + MutantRunner* t = + new Mutant + (obj, method, MakeTuple()); + return MutantFunctor(t); +} +#endif // OS_WIN // 0 - 1 -template +template inline MutantFunctor > -CreateFunctor(T* obj, R (T::*method)(A1)) { - MutantRunner > *t = - new Mutant >* t = + new Mutant > (obj, method, MakeTuple()); return MutantFunctor >(t); } +template +inline MutantFunctor > +CreateFunctor(R (*function)(A1)) { + MutantRunner >* t = + new MutantFunction > + (function, MakeTuple()); + return MutantFunctor >(t); +} + #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// 0 - 1 -template +template inline MutantFunctor > -CreateFunctor(T** obj, R (T::*method)(A1)) { - MutantRunner > *t = - new MutantLateObjectBind >* t = + new MutantLateObjectBind > (obj, method, MakeTuple()); return MutantFunctor >(t); } -#endif +#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING + +#if defined (OS_WIN) +template +inline MutantFunctor > +CreateFunctor(T* obj, R (__stdcall U::*method)(A1)) { + MutantRunner >* t = + new Mutant > + (obj, method, MakeTuple()); + return MutantFunctor >(t); +} +#endif // OS_WIN // 0 - 2 -template +template inline MutantFunctor > -CreateFunctor(T* obj, R (T::*method)(A1, A2)) { - MutantRunner > *t = - new Mutant >* t = + new Mutant > (obj, method, MakeTuple()); return MutantFunctor >(t); } +template +inline MutantFunctor > +CreateFunctor(R (*function)(A1, A2)) { + MutantRunner >* t = + new MutantFunction > + (function, MakeTuple()); + return MutantFunctor >(t); +} + #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// 0 - 2 -template +template inline MutantFunctor > -CreateFunctor(T** obj, R (T::*method)(A1, A2)) { - MutantRunner > *t = - new MutantLateObjectBind >* t = + new MutantLateObjectBind > (obj, method, MakeTuple()); return MutantFunctor >(t); } -#endif +#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING + +#if defined (OS_WIN) +template +inline MutantFunctor > +CreateFunctor(T* obj, R (__stdcall U::*method)(A1, A2)) { + MutantRunner >* t = + new Mutant > + (obj, method, MakeTuple()); + return MutantFunctor >(t); +} +#endif // OS_WIN // 0 - 3 -template +template inline MutantFunctor > -CreateFunctor(T* obj, R (T::*method)(A1, A2, A3)) { - MutantRunner > *t = - new Mutant >* t = + new Mutant > (obj, method, MakeTuple()); return MutantFunctor >(t); } +template +inline MutantFunctor > +CreateFunctor(R (*function)(A1, A2, A3)) { + MutantRunner >* t = + new MutantFunction > + (function, MakeTuple()); + return MutantFunctor >(t); +} + #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// 0 - 3 -template +template inline MutantFunctor > -CreateFunctor(T** obj, R (T::*method)(A1, A2, A3)) { - MutantRunner > *t = - new MutantLateObjectBind >* t = + new MutantLateObjectBind > (obj, method, MakeTuple()); return MutantFunctor >(t); } -#endif +#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING + +#if defined (OS_WIN) +template +inline MutantFunctor > +CreateFunctor(T* obj, R (__stdcall U::*method)(A1, A2, A3)) { + MutantRunner >* t = + new Mutant > + (obj, method, MakeTuple()); + return MutantFunctor >(t); +} +#endif // OS_WIN // 0 - 4 -template +template inline MutantFunctor > -CreateFunctor(T* obj, R (T::*method)(A1, A2, A3, A4)) { - MutantRunner > *t = - new Mutant >* t = + new Mutant > (obj, method, MakeTuple()); return MutantFunctor >(t); } +template +inline MutantFunctor > +CreateFunctor(R (*function)(A1, A2, A3, A4)) { + MutantRunner >* t = + new MutantFunction > + (function, MakeTuple()); + return MutantFunctor >(t); +} + #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// 0 - 4 -template +template inline MutantFunctor > -CreateFunctor(T** obj, R (T::*method)(A1, A2, A3, A4)) { - MutantRunner > *t = - new MutantLateObjectBind >* t = + new MutantLateObjectBind > (obj, method, MakeTuple()); return MutantFunctor >(t); } -#endif +#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING + +#if defined (OS_WIN) +template +inline MutantFunctor > +CreateFunctor(T* obj, R (__stdcall U::*method)(A1, A2, A3, A4)) { + MutantRunner >* t = + new Mutant > + (obj, method, MakeTuple()); + return MutantFunctor >(t); +} +#endif // OS_WIN // 1 - 0 -template +template inline MutantFunctor -CreateFunctor(T* obj, R (T::*method)(X1), const P1& p1) { - MutantRunner *t = - new Mutant* t = + new Mutant, Tuple0> (obj, method, MakeTuple(p1)); return MutantFunctor(t); } +template +inline MutantFunctor +CreateFunctor(R (*function)(X1), const P1& p1) { + MutantRunner* t = + new MutantFunction, Tuple0> + (function, MakeTuple(p1)); + return MutantFunctor(t); +} + #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// 1 - 0 -template +template inline MutantFunctor -CreateFunctor(T** obj, R (T::*method)(X1), const P1& p1) { - MutantRunner *t = - new MutantLateObjectBind* t = + new MutantLateObjectBind, Tuple0> (obj, method, MakeTuple(p1)); return MutantFunctor(t); } -#endif +#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING + +#if defined (OS_WIN) +template +inline MutantFunctor +CreateFunctor(T* obj, R (__stdcall U::*method)(X1), const P1& p1) { + MutantRunner* t = + new Mutant, Tuple0> + (obj, method, MakeTuple(p1)); + return MutantFunctor(t); +} +#endif // OS_WIN // 1 - 1 -template +template inline MutantFunctor > -CreateFunctor(T* obj, R (T::*method)(X1, A1), const P1& p1) { - MutantRunner > *t = - new Mutant >* t = + new Mutant, Tuple1 > (obj, method, MakeTuple(p1)); return MutantFunctor >(t); } +template +inline MutantFunctor > +CreateFunctor(R (*function)(X1, A1), const P1& p1) { + MutantRunner >* t = + new MutantFunction, Tuple1 > + (function, MakeTuple(p1)); + return MutantFunctor >(t); +} + #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// 1 - 1 -template +template inline MutantFunctor > -CreateFunctor(T** obj, R (T::*method)(X1, A1), const P1& p1) { - MutantRunner > *t = - new MutantLateObjectBind >* t = + new MutantLateObjectBind, Tuple1 > (obj, method, MakeTuple(p1)); return MutantFunctor >(t); } -#endif +#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// 1 - 2 -template +inline MutantFunctor > +CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1), const P1& p1) { + MutantRunner >* t = + new Mutant, Tuple1 > + (obj, method, MakeTuple(p1)); + return MutantFunctor >(t); +} +#endif // OS_WIN + +// 1 - 2 +template inline MutantFunctor > -CreateFunctor(T* obj, R (T::*method)(X1, A1, A2), const P1& p1) { - MutantRunner > *t = - new Mutant >* t = + new Mutant, Tuple2 > (obj, method, MakeTuple(p1)); return MutantFunctor >(t); } +template +inline MutantFunctor > +CreateFunctor(R (*function)(X1, A1, A2), const P1& p1) { + MutantRunner >* t = + new MutantFunction, Tuple2 > + (function, MakeTuple(p1)); + return MutantFunctor >(t); +} + #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// 1 - 2 -template +template inline MutantFunctor > -CreateFunctor(T** obj, R (T::*method)(X1, A1, A2), const P1& p1) { - MutantRunner > *t = - new MutantLateObjectBind >* t = + new MutantLateObjectBind, Tuple2 > (obj, method, MakeTuple(p1)); return MutantFunctor >(t); } -#endif +#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING + +#if defined (OS_WIN) +template +inline MutantFunctor > +CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2), const P1& p1) { + MutantRunner >* t = + new Mutant, Tuple2 > + (obj, method, MakeTuple(p1)); + return MutantFunctor >(t); +} +#endif // OS_WIN // 1 - 3 -template +template inline MutantFunctor > -CreateFunctor(T* obj, R (T::*method)(X1, A1, A2, A3), const P1& p1) { - MutantRunner > *t = - new Mutant >* t = + new Mutant, Tuple3 > (obj, method, MakeTuple(p1)); return MutantFunctor >(t); } +template +inline MutantFunctor > +CreateFunctor(R (*function)(X1, A1, A2, A3), const P1& p1) { + MutantRunner >* t = + new MutantFunction, Tuple3 > + (function, MakeTuple(p1)); + return MutantFunctor >(t); +} + #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// 1 - 3 -template +template inline MutantFunctor > -CreateFunctor(T** obj, R (T::*method)(X1, A1, A2, A3), const P1& p1) { - MutantRunner > *t = - new MutantLateObjectBind >* t = + new MutantLateObjectBind, Tuple3 > (obj, method, MakeTuple(p1)); return MutantFunctor >(t); } -#endif +#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING + +#if defined (OS_WIN) +template +inline MutantFunctor > +CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2, A3), const P1& p1) { + MutantRunner >* t = + new Mutant, Tuple3 > + (obj, method, MakeTuple(p1)); + return MutantFunctor >(t); +} +#endif // OS_WIN // 1 - 4 -template +template inline MutantFunctor > -CreateFunctor(T* obj, R (T::*method)(X1, A1, A2, A3, A4), const P1& p1) { - MutantRunner > *t = - new Mutant >* t = + new Mutant, Tuple4 > (obj, method, MakeTuple(p1)); return MutantFunctor >(t); } +template +inline MutantFunctor > +CreateFunctor(R (*function)(X1, A1, A2, A3, A4), const P1& p1) { + MutantRunner >* t = + new MutantFunction, Tuple4 > + (function, MakeTuple(p1)); + return MutantFunctor >(t); +} + #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// 1 - 4 -template +template inline MutantFunctor > -CreateFunctor(T** obj, R (T::*method)(X1, A1, A2, A3, A4), const P1& p1) { - MutantRunner > *t = - new MutantLateObjectBind >* t = + new MutantLateObjectBind, Tuple4 > (obj, method, MakeTuple(p1)); return MutantFunctor >(t); } -#endif +#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING + +#if defined (OS_WIN) +template +inline MutantFunctor > +CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2, A3, A4), + const P1& p1) { + MutantRunner >* t = + new Mutant, Tuple4 > + (obj, method, MakeTuple(p1)); + return MutantFunctor >(t); +} +#endif // OS_WIN // 2 - 0 -template +template inline MutantFunctor -CreateFunctor(T* obj, R (T::*method)(X1, X2), const P1& p1, const P2& p2) { - MutantRunner *t = - new Mutant* t = + new Mutant, Tuple0> (obj, method, MakeTuple(p1, p2)); return MutantFunctor(t); } +template +inline MutantFunctor +CreateFunctor(R (*function)(X1, X2), const P1& p1, const P2& p2) { + MutantRunner* t = + new MutantFunction, Tuple0> + (function, MakeTuple(p1, p2)); + return MutantFunctor(t); +} + #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// 2 - 0 -template +template inline MutantFunctor -CreateFunctor(T** obj, R (T::*method)(X1, X2), const P1& p1, const P2& p2) { - MutantRunner *t = - new MutantLateObjectBind* t = + new MutantLateObjectBind, Tuple0> (obj, method, MakeTuple(p1, p2)); return MutantFunctor(t); } -#endif +#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// 2 - 1 -template +inline MutantFunctor +CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2), const P1& p1, + const P2& p2) { + MutantRunner* t = + new Mutant, Tuple0> + (obj, method, MakeTuple(p1, p2)); + return MutantFunctor(t); +} +#endif // OS_WIN + +// 2 - 1 +template inline MutantFunctor > -CreateFunctor(T* obj, R (T::*method)(X1, X2, A1), const P1& p1, const P2& p2) { - MutantRunner > *t = - new Mutant >* t = + new Mutant, Tuple1 > (obj, method, MakeTuple(p1, p2)); return MutantFunctor >(t); } +template +inline MutantFunctor > +CreateFunctor(R (*function)(X1, X2, A1), const P1& p1, const P2& p2) { + MutantRunner >* t = + new MutantFunction, Tuple1 > + (function, MakeTuple(p1, p2)); + return MutantFunctor >(t); +} + #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// 2 - 1 -template +template inline MutantFunctor > -CreateFunctor(T** obj, R (T::*method)(X1, X2, A1), const P1& p1, const P2& p2) { - MutantRunner > *t = - new MutantLateObjectBind >* t = + new MutantLateObjectBind, Tuple1 > (obj, method, MakeTuple(p1, p2)); return MutantFunctor >(t); } -#endif +#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING + +#if defined (OS_WIN) +template +inline MutantFunctor > +CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1), const P1& p1, + const P2& p2) { + MutantRunner >* t = + new Mutant, Tuple1 > + (obj, method, MakeTuple(p1, p2)); + return MutantFunctor >(t); +} +#endif // OS_WIN // 2 - 2 -template +template inline MutantFunctor > -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 > *t = - new Mutant >* t = + new Mutant, Tuple2 > (obj, method, MakeTuple(p1, p2)); return MutantFunctor >(t); } +template +inline MutantFunctor > +CreateFunctor(R (*function)(X1, X2, A1, A2), const P1& p1, const P2& p2) { + MutantRunner >* t = + new MutantFunction, Tuple2 > + (function, MakeTuple(p1, p2)); + return MutantFunctor >(t); +} + #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// 2 - 2 -template +template inline MutantFunctor > -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 > *t = - new MutantLateObjectBind >* t = + new MutantLateObjectBind, Tuple2 > (obj, method, MakeTuple(p1, p2)); return MutantFunctor >(t); } -#endif +#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING + +#if defined (OS_WIN) +template +inline MutantFunctor > +CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1, A2), const P1& p1, + const P2& p2) { + MutantRunner >* t = + new Mutant, Tuple2 > + (obj, method, MakeTuple(p1, p2)); + return MutantFunctor >(t); +} +#endif // OS_WIN // 2 - 3 -template +template inline MutantFunctor > -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 > *t = - new Mutant >* t = + new Mutant, Tuple3 > (obj, method, MakeTuple(p1, p2)); return MutantFunctor >(t); } +template +inline MutantFunctor > +CreateFunctor(R (*function)(X1, X2, A1, A2, A3), const P1& p1, const P2& p2) { + MutantRunner >* t = + new MutantFunction, Tuple3 > + (function, MakeTuple(p1, p2)); + return MutantFunctor >(t); +} + #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// 2 - 3 -template +template inline MutantFunctor > -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 > *t = - new MutantLateObjectBind >* t = + new MutantLateObjectBind, Tuple3 > (obj, method, MakeTuple(p1, p2)); return MutantFunctor >(t); } -#endif +#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING + +#if defined (OS_WIN) +template +inline MutantFunctor > +CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3), + const P1& p1, const P2& p2) { + MutantRunner >* t = + new Mutant, Tuple3 > + (obj, method, MakeTuple(p1, p2)); + return MutantFunctor >(t); +} +#endif // OS_WIN // 2 - 4 -template +template inline MutantFunctor > -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 > *t = - new Mutant >* t = + new Mutant, Tuple4 > (obj, method, MakeTuple(p1, p2)); return MutantFunctor >(t); } +template +inline MutantFunctor > +CreateFunctor(R (*function)(X1, X2, A1, A2, A3, A4), const P1& p1, + const P2& p2) { + MutantRunner >* t = + new MutantFunction, Tuple4 > + (function, MakeTuple(p1, p2)); + return MutantFunctor >(t); +} + #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// 2 - 4 -template +template inline MutantFunctor > -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 > *t = - new MutantLateObjectBind >* t = + new MutantLateObjectBind, Tuple4 > (obj, method, MakeTuple(p1, p2)); return MutantFunctor >(t); } -#endif +#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING + +#if defined (OS_WIN) +template +inline MutantFunctor > +CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3, A4), + const P1& p1, const P2& p2) { + MutantRunner >* t = + new Mutant, Tuple4 > + (obj, method, MakeTuple(p1, p2)); + return MutantFunctor >(t); +} +#endif // OS_WIN // 3 - 0 -template +template inline MutantFunctor -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 *t = - new Mutant* t = + new Mutant, Tuple0> (obj, method, MakeTuple(p1, p2, p3)); return MutantFunctor(t); } +template +inline MutantFunctor +CreateFunctor(R (*function)(X1, X2, X3), const P1& p1, const P2& p2, + const P3& p3) { + MutantRunner* t = + new MutantFunction, Tuple0> + (function, MakeTuple(p1, p2, p3)); + return MutantFunctor(t); +} + #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// 3 - 0 -template +template inline MutantFunctor -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 *t = - new MutantLateObjectBind* t = + new MutantLateObjectBind, Tuple0> (obj, method, MakeTuple(p1, p2, p3)); return MutantFunctor(t); } -#endif +#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING + +#if defined (OS_WIN) +template +inline MutantFunctor +CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3), const P1& p1, + const P2& p2, const P3& p3) { + MutantRunner* t = + new Mutant, Tuple0> + (obj, method, MakeTuple(p1, p2, p3)); + return MutantFunctor(t); +} +#endif // OS_WIN // 3 - 1 -template +template inline MutantFunctor > -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 > *t = - new Mutant >* t = + new Mutant, Tuple1 > (obj, method, MakeTuple(p1, p2, p3)); return MutantFunctor >(t); } +template +inline MutantFunctor > +CreateFunctor(R (*function)(X1, X2, X3, A1), const P1& p1, const P2& p2, + const P3& p3) { + MutantRunner >* t = + new MutantFunction, Tuple1 > + (function, MakeTuple(p1, p2, p3)); + return MutantFunctor >(t); +} + #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// 3 - 1 -template +template inline MutantFunctor > -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 > *t = - new MutantLateObjectBind >* t = + new MutantLateObjectBind, Tuple1 > (obj, method, MakeTuple(p1, p2, p3)); return MutantFunctor >(t); } -#endif +#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING + +#if defined (OS_WIN) +template +inline MutantFunctor > +CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1), const P1& p1, + const P2& p2, const P3& p3) { + MutantRunner >* t = + new Mutant, Tuple1 > + (obj, method, MakeTuple(p1, p2, p3)); + return MutantFunctor >(t); +} +#endif // OS_WIN // 3 - 2 -template +template inline MutantFunctor > -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 > *t = - new Mutant >* t = + new Mutant, Tuple2 > (obj, method, MakeTuple(p1, p2, p3)); return MutantFunctor >(t); } +template +inline MutantFunctor > +CreateFunctor(R (*function)(X1, X2, X3, A1, A2), const P1& p1, const P2& p2, + const P3& p3) { + MutantRunner >* t = + new MutantFunction, Tuple2 > + (function, MakeTuple(p1, p2, p3)); + return MutantFunctor >(t); +} + #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// 3 - 2 -template +template inline MutantFunctor > -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 > *t = - new MutantLateObjectBind >* t = + new MutantLateObjectBind, Tuple2 > (obj, method, MakeTuple(p1, p2, p3)); return MutantFunctor >(t); } -#endif +#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// 3 - 3 -template +inline MutantFunctor > +CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2), + const P1& p1, const P2& p2, const P3& p3) { + MutantRunner >* t = + new Mutant, Tuple2 > + (obj, method, MakeTuple(p1, p2, p3)); + return MutantFunctor >(t); +} +#endif // OS_WIN + +// 3 - 3 +template inline MutantFunctor > -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 > *t = - new Mutant >* t = + new Mutant, Tuple3 > (obj, method, MakeTuple(p1, p2, p3)); return MutantFunctor >(t); } +template +inline MutantFunctor > +CreateFunctor(R (*function)(X1, X2, X3, A1, A2, A3), const P1& p1, const P2& p2, + const P3& p3) { + MutantRunner >* t = + new MutantFunction, Tuple3 > + (function, MakeTuple(p1, p2, p3)); + return MutantFunctor >(t); +} + #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// 3 - 3 -template +template inline MutantFunctor > -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 > *t = - new MutantLateObjectBind >* t = + new MutantLateObjectBind, Tuple3 > (obj, method, MakeTuple(p1, p2, p3)); return MutantFunctor >(t); } -#endif +#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// 3 - 4 -template +inline MutantFunctor > +CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3), + const P1& p1, const P2& p2, const P3& p3) { + MutantRunner >* t = + new Mutant, Tuple3 > + (obj, method, MakeTuple(p1, p2, p3)); + return MutantFunctor >(t); +} +#endif // OS_WIN + +// 3 - 4 +template inline MutantFunctor > -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 > *t = - new Mutant >* t = + new Mutant, Tuple4 > (obj, method, MakeTuple(p1, p2, p3)); return MutantFunctor >(t); } +template +inline MutantFunctor > +CreateFunctor(R (*function)(X1, X2, X3, A1, A2, A3, A4), const P1& p1, + const P2& p2, const P3& p3) { + MutantRunner >* t = + new MutantFunction, Tuple4 > + (function, MakeTuple(p1, p2, p3)); + return MutantFunctor >(t); +} + #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// 3 - 4 -template +template inline MutantFunctor > -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 > *t = - new MutantLateObjectBind >* t = + new MutantLateObjectBind, Tuple4 > (obj, method, MakeTuple(p1, p2, p3)); return MutantFunctor >(t); } -#endif +#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING + +#if defined (OS_WIN) +template +inline MutantFunctor > +CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3, A4), + const P1& p1, const P2& p2, const P3& p3) { + MutantRunner >* t = + new Mutant, Tuple4 > + (obj, method, MakeTuple(p1, p2, p3)); + return MutantFunctor >(t); +} +#endif // OS_WIN // 4 - 0 -template +template inline MutantFunctor -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 *t = - new Mutant* t = + new Mutant, Tuple0> (obj, method, MakeTuple(p1, p2, p3, p4)); return MutantFunctor(t); } +template +inline MutantFunctor +CreateFunctor(R (*function)(X1, X2, X3, X4), const P1& p1, const P2& p2, + const P3& p3, const P4& p4) { + MutantRunner* t = + new MutantFunction, Tuple0> + (function, MakeTuple(p1, p2, p3, p4)); + return MutantFunctor(t); +} + #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// 4 - 0 -template +template inline MutantFunctor -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 *t = - new MutantLateObjectBind* t = + new MutantLateObjectBind, Tuple0> (obj, method, MakeTuple(p1, p2, p3, p4)); return MutantFunctor(t); } -#endif +#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// 4 - 1 -template +inline MutantFunctor +CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4), const P1& p1, + const P2& p2, const P3& p3, const P4& p4) { + MutantRunner* t = + new Mutant, Tuple0> + (obj, method, MakeTuple(p1, p2, p3, p4)); + return MutantFunctor(t); +} +#endif // OS_WIN + +// 4 - 1 +template inline MutantFunctor > -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 > *t = - new Mutant >* t = + new Mutant, Tuple1 > (obj, method, MakeTuple(p1, p2, p3, p4)); return MutantFunctor >(t); } +template +inline MutantFunctor > +CreateFunctor(R (*function)(X1, X2, X3, X4, A1), const P1& p1, const P2& p2, + const P3& p3, const P4& p4) { + MutantRunner >* t = + new MutantFunction, Tuple1 > + (function, MakeTuple(p1, p2, p3, p4)); + return MutantFunctor >(t); +} + #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// 4 - 1 -template +template inline MutantFunctor > -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 > *t = - new MutantLateObjectBind >* t = + new MutantLateObjectBind, Tuple1 > (obj, method, MakeTuple(p1, p2, p3, p4)); return MutantFunctor >(t); } -#endif +#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// 4 - 2 -template +inline MutantFunctor > +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 >* t = + new Mutant, Tuple1 > + (obj, method, MakeTuple(p1, p2, p3, p4)); + return MutantFunctor >(t); +} +#endif // OS_WIN + +// 4 - 2 +template inline MutantFunctor > -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 > *t = - new Mutant >* t = + new Mutant, Tuple2 > (obj, method, MakeTuple(p1, p2, p3, p4)); return MutantFunctor >(t); } +template +inline MutantFunctor > +CreateFunctor(R (*function)(X1, X2, X3, X4, A1, A2), const P1& p1, const P2& p2, + const P3& p3, const P4& p4) { + MutantRunner >* t = + new MutantFunction, Tuple2 > + (function, MakeTuple(p1, p2, p3, p4)); + return MutantFunctor >(t); +} + #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// 4 - 2 -template +template inline MutantFunctor > -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 > *t = - new MutantLateObjectBind >* t = + new MutantLateObjectBind, Tuple2 > (obj, method, MakeTuple(p1, p2, p3, p4)); return MutantFunctor >(t); } -#endif +#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// 4 - 3 -template +inline MutantFunctor > +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 >* t = + new Mutant, Tuple2 > + (obj, method, MakeTuple(p1, p2, p3, p4)); + return MutantFunctor >(t); +} +#endif // OS_WIN + +// 4 - 3 +template inline MutantFunctor > -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 > *t = - new Mutant >* t = + new Mutant, Tuple3 > (obj, method, MakeTuple(p1, p2, p3, p4)); return MutantFunctor >(t); } +template +inline MutantFunctor > +CreateFunctor(R (*function)(X1, X2, X3, X4, A1, A2, A3), const P1& p1, + const P2& p2, const P3& p3, const P4& p4) { + MutantRunner >* t = + new MutantFunction, Tuple3 > + (function, MakeTuple(p1, p2, p3, p4)); + return MutantFunctor >(t); +} + #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// 4 - 3 -template +template inline MutantFunctor > -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 > *t = - new MutantLateObjectBind >* t = + new MutantLateObjectBind, Tuple3 > (obj, method, MakeTuple(p1, p2, p3, p4)); return MutantFunctor >(t); } -#endif +#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// 4 - 4 -template +inline MutantFunctor > +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 >* t = + new Mutant, Tuple3 > + (obj, method, MakeTuple(p1, p2, p3, p4)); + return MutantFunctor >(t); +} +#endif // OS_WIN + +// 4 - 4 +template inline MutantFunctor > -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 > *t = - new Mutant >* t = + new Mutant, Tuple4 > (obj, method, MakeTuple(p1, p2, p3, p4)); return MutantFunctor >(t); } +template +inline MutantFunctor > +CreateFunctor(R (*function)(X1, X2, X3, X4, A1, A2, A3, A4), const P1& p1, + const P2& p2, const P3& p3, const P4& p4) { + MutantRunner >* t = + new MutantFunction, Tuple4 > + (function, MakeTuple(p1, p2, p3, p4)); + return MutantFunctor >(t); +} + #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// 4 - 4 -template +template inline MutantFunctor > -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 > *t = - new MutantLateObjectBind >* t = + new MutantLateObjectBind, Tuple4 > (obj, method, MakeTuple(p1, p2, p3, p4)); return MutantFunctor >(t); } -#endif +#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING + +#if defined (OS_WIN) +template +inline MutantFunctor > +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 >* t = + new Mutant, Tuple4 > + (obj, method, MakeTuple(p1, p2, p3, p4)); + return MutantFunctor >(t); +} +#endif // OS_WIN } // namespace testing -- cgit v1.1