diff options
author | stoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-20 16:36:13 +0000 |
---|---|---|
committer | stoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-20 16:36:13 +0000 |
commit | 45a19e98e7bdd706c80c29ed8e0785cfa0695a72 (patch) | |
tree | 7c9447451b4a8468676103241c39490fe0cd0a1e /testing | |
parent | 6f3c1879effff03d909725f1fc61ad70276e9309 (diff) | |
download | chromium_src-45a19e98e7bdd706c80c29ed8e0785cfa0695a72.zip chromium_src-45a19e98e7bdd706c80c29ed8e0785cfa0695a72.tar.gz chromium_src-45a19e98e7bdd706c80c29ed8e0785cfa0695a72.tar.bz2 |
Functor for functions with STDCALL calling conventions. Allows invoking Windows API.
Review URL: http://codereview.chromium.org/402086
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32613 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'testing')
-rw-r--r-- | testing/generate_gmock_mutant.py | 16 | ||||
-rw-r--r-- | testing/gmock_mutant.h | 284 |
2 files changed, 296 insertions, 4 deletions
diff --git a/testing/generate_gmock_mutant.py b/testing/generate_gmock_mutant.py index 8e1fdf0..14ca190 100644 --- a/testing/generate_gmock_mutant.py +++ b/testing/generate_gmock_mutant.py @@ -415,13 +415,21 @@ def GenerateCreateFunctor(prebound, calltime): print mutant2 print "#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING\n" + # OS_WIN specific. Same functors but with stdcall calling conventions. # Functor for method with __stdcall calling conventions. print "#if defined (OS_WIN)" - stdcall = CREATE_METHOD_FUNCTOR_TEMPLATE.replace("U::", "__stdcall U::") - stdcall = FixCode(stdcall % args) - print stdcall + stdcall_method = CREATE_METHOD_FUNCTOR_TEMPLATE + stdcall_method = stdcall_method.replace("U::", "__stdcall U::") + stdcall_method = FixCode(stdcall_method % args) + print stdcall_method + # Functor for free function with __stdcall calling conventions. + stdcall_function = CREATE_FUNCTION_FUNCTOR_TEMPLATE + stdcall_function = stdcall_function.replace("R (*", "R (__stdcall *"); + print "\n", FixCode(stdcall_function % args) + print "#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING" - stdcall2 = stdcall.replace("CreateFunctor(T* obj,", "CreateFunctor(T** obj,") + stdcall2 = stdcall_method; + stdcall2 = stdcall2.replace("CreateFunctor(T* obj,", "CreateFunctor(T** obj,") stdcall2 = stdcall2.replace("new Mutant", "new MutantLateObjectBind") stdcall2 = stdcall2.replace(" " * 17 + "Tuple", " " * 31 + "Tuple") print stdcall2 diff --git a/testing/gmock_mutant.h b/testing/gmock_mutant.h index 66697d8..897d68a 100644 --- a/testing/gmock_mutant.h +++ b/testing/gmock_mutant.h @@ -650,6 +650,16 @@ CreateFunctor(T* obj, R (__stdcall U::*method)()) { (obj, method, MakeTuple()); return MutantFunctor<R, Tuple0>(t); } + +template <typename R> +inline MutantFunctor<R, Tuple0> +CreateFunctor(R (__stdcall *function)()) { + MutantRunner<R, Tuple0>* t = + new MutantFunction<R, R (__stdcall *)(), + Tuple0, Tuple0> + (function, MakeTuple()); + return MutantFunctor<R, Tuple0>(t); +} #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING template <typename R, typename T, typename U> inline MutantFunctor<R, Tuple0> @@ -706,6 +716,16 @@ CreateFunctor(T* obj, R (__stdcall U::*method)(A1)) { (obj, method, MakeTuple()); return MutantFunctor<R, Tuple1<A1> >(t); } + +template <typename R, typename A1> +inline MutantFunctor<R, Tuple1<A1> > +CreateFunctor(R (__stdcall *function)(A1)) { + MutantRunner<R, Tuple1<A1> >* t = + new MutantFunction<R, R (__stdcall *)(A1), + Tuple0, Tuple1<A1> > + (function, MakeTuple()); + return MutantFunctor<R, Tuple1<A1> >(t); +} #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING template <typename R, typename T, typename U, typename A1> inline MutantFunctor<R, Tuple1<A1> > @@ -762,6 +782,16 @@ CreateFunctor(T* obj, R (__stdcall U::*method)(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 (__stdcall *function)(A1, A2)) { + MutantRunner<R, Tuple2<A1, A2> >* t = + new MutantFunction<R, R (__stdcall *)(A1, A2), + Tuple0, Tuple2<A1, A2> > + (function, MakeTuple()); + return MutantFunctor<R, Tuple2<A1, A2> >(t); +} #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING template <typename R, typename T, typename U, typename A1, typename A2> inline MutantFunctor<R, Tuple2<A1, A2> > @@ -821,6 +851,16 @@ CreateFunctor(T* obj, R (__stdcall U::*method)(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 (__stdcall *function)(A1, A2, A3)) { + MutantRunner<R, Tuple3<A1, A2, A3> >* t = + new MutantFunction<R, R (__stdcall *)(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 template <typename R, typename T, typename U, typename A1, typename A2, typename A3> @@ -881,6 +921,16 @@ CreateFunctor(T* obj, R (__stdcall U::*method)(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 (__stdcall *function)(A1, A2, A3, A4)) { + MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = + new MutantFunction<R, R (__stdcall *)(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 template <typename R, typename T, typename U, typename A1, typename A2, typename A3, typename A4> @@ -938,6 +988,16 @@ CreateFunctor(T* obj, R (__stdcall U::*method)(X1), const P1& p1) { (obj, method, MakeTuple(p1)); return MutantFunctor<R, Tuple0>(t); } + +template <typename R, typename P1, typename X1> +inline MutantFunctor<R, Tuple0> +CreateFunctor(R (__stdcall *function)(X1), const P1& p1) { + MutantRunner<R, Tuple0>* t = + new MutantFunction<R, R (__stdcall *)(X1), + Tuple1<P1>, Tuple0> + (function, MakeTuple(p1)); + return MutantFunctor<R, Tuple0>(t); +} #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING template <typename R, typename T, typename U, typename P1, typename X1> inline MutantFunctor<R, Tuple0> @@ -997,6 +1057,16 @@ CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1), const P1& p1) { (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 (__stdcall *function)(X1, A1), const P1& p1) { + MutantRunner<R, Tuple1<A1> >* t = + new MutantFunction<R, R (__stdcall *)(X1, A1), + Tuple1<P1>, Tuple1<A1> > + (function, MakeTuple(p1)); + return MutantFunctor<R, Tuple1<A1> >(t); +} #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING template <typename R, typename T, typename U, typename P1, typename A1, typename X1> @@ -1057,6 +1127,16 @@ CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2), const P1& p1) { (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 (__stdcall *function)(X1, A1, A2), const P1& p1) { + MutantRunner<R, Tuple2<A1, A2> >* t = + new MutantFunction<R, R (__stdcall *)(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 template <typename R, typename T, typename U, typename P1, typename A1, typename A2, typename X1> @@ -1118,6 +1198,17 @@ CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2, A3), const P1& p1) { (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 (__stdcall *function)(X1, A1, A2, A3), const P1& p1) { + MutantRunner<R, Tuple3<A1, A2, A3> >* t = + new MutantFunction<R, R (__stdcall *)(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 template <typename R, typename T, typename U, typename P1, typename A1, typename A2, typename A3, typename X1> @@ -1180,6 +1271,17 @@ CreateFunctor(T* obj, R (__stdcall U::*method)(X1, 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 (__stdcall *function)(X1, A1, A2, A3, A4), const P1& p1) { + MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = + new MutantFunction<R, R (__stdcall *)(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 template <typename R, typename T, typename U, typename P1, typename A1, typename A2, typename A3, typename A4, typename X1> @@ -1242,6 +1344,16 @@ CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2), const P1& p1, (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 (__stdcall *function)(X1, X2), const P1& p1, const P2& p2) { + MutantRunner<R, Tuple0>* t = + new MutantFunction<R, R (__stdcall *)(X1, X2), + Tuple2<P1, P2>, Tuple0> + (function, MakeTuple(p1, p2)); + return MutantFunctor<R, Tuple0>(t); +} #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING template <typename R, typename T, typename U, typename P1, typename P2, typename X1, typename X2> @@ -1305,6 +1417,18 @@ CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1), const P1& p1, (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 (__stdcall *function)(X1, X2, A1), const P1& p1, + const P2& p2) { + MutantRunner<R, Tuple1<A1> >* t = + new MutantFunction<R, R (__stdcall *)(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 template <typename R, typename T, typename U, typename P1, typename P2, typename A1, typename X1, typename X2> @@ -1370,6 +1494,18 @@ CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1, A2), const P1& p1, (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 (__stdcall *function)(X1, X2, A1, A2), const P1& p1, + const P2& p2) { + MutantRunner<R, Tuple2<A1, A2> >* t = + new MutantFunction<R, R (__stdcall *)(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 template <typename R, typename T, typename U, typename P1, typename P2, typename A1, typename A2, typename X1, typename X2> @@ -1435,6 +1571,18 @@ CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, 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 (__stdcall *function)(X1, X2, A1, A2, A3), const P1& p1, + const P2& p2) { + MutantRunner<R, Tuple3<A1, A2, A3> >* t = + new MutantFunction<R, R (__stdcall *)(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 template <typename R, typename T, typename U, typename P1, typename P2, typename A1, typename A2, typename A3, typename X1, typename X2> @@ -1504,6 +1652,18 @@ CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, 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 (__stdcall *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 (__stdcall *)(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 template <typename R, typename T, typename U, typename P1, typename P2, typename A1, typename A2, typename A3, typename A4, typename X1, @@ -1571,6 +1731,18 @@ CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3), const P1& p1, (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 (__stdcall *function)(X1, X2, X3), const P1& p1, const P2& p2, + const P3& p3) { + MutantRunner<R, Tuple0>* t = + new MutantFunction<R, R (__stdcall *)(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 template <typename R, typename T, typename U, typename P1, typename P2, typename P3, typename X1, typename X2, typename X3> @@ -1637,6 +1809,18 @@ CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1), const P1& p1, (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 (__stdcall *function)(X1, X2, X3, A1), const P1& p1, + const P2& p2, const P3& p3) { + MutantRunner<R, Tuple1<A1> >* t = + new MutantFunction<R, R (__stdcall *)(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 template <typename R, typename T, typename U, typename P1, typename P2, typename P3, typename A1, typename X1, typename X2, typename X3> @@ -1706,6 +1890,18 @@ CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, 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 (__stdcall *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 (__stdcall *)(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 template <typename R, typename T, typename U, typename P1, typename P2, typename P3, typename A1, typename A2, typename X1, typename X2, @@ -1776,6 +1972,18 @@ CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, 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 (__stdcall *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 (__stdcall *)(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 template <typename R, typename T, typename U, typename P1, typename P2, typename P3, typename A1, typename A2, typename A3, typename X1, @@ -1847,6 +2055,19 @@ CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, 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 (__stdcall *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 (__stdcall *)(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 template <typename R, typename T, typename U, typename P1, typename P2, typename P3, typename A1, typename A2, typename A3, typename A4, @@ -1917,6 +2138,18 @@ CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4), const P1& p1, (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 (__stdcall *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 (__stdcall *)(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 template <typename R, typename T, typename U, typename P1, typename P2, typename P3, typename P4, typename X1, typename X2, typename X3, @@ -1987,6 +2220,18 @@ CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, 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 (__stdcall *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 (__stdcall *)(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 template <typename R, typename T, typename U, typename P1, typename P2, typename P3, typename P4, typename A1, typename X1, typename X2, @@ -2058,6 +2303,19 @@ CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, 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 (__stdcall *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 (__stdcall *)(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 template <typename R, typename T, typename U, typename P1, typename P2, typename P3, typename P4, typename A1, typename A2, typename X1, @@ -2129,6 +2387,19 @@ CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, 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 (__stdcall *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 (__stdcall *)(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 template <typename R, typename T, typename U, typename P1, typename P2, typename P3, typename P4, typename A1, typename A2, typename A3, @@ -2200,6 +2471,19 @@ CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, 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 (__stdcall *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 (__stdcall *)(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 template <typename R, typename T, typename U, typename P1, typename P2, typename P3, typename P4, typename A1, typename A2, typename A3, |