00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040 #ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_
00041 #define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_
00042
00043 #include "gmock/gmock-spec-builders.h"
00044 #include "gmock/internal/gmock-internal-utils.h"
00045
00046 namespace testing {
00047 namespace internal {
00048
00049 template <typename F>
00050 class FunctionMockerBase;
00051
00052
00053
00054
00055
00056
00057 template <typename F>
00058 class FunctionMocker;
00059
00060 template <typename R>
00061 class FunctionMocker<R()> : public
00062 internal::FunctionMockerBase<R()> {
00063 public:
00064 typedef R F();
00065 typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
00066
00067 MockSpec<F>& With() {
00068 return this->current_spec();
00069 }
00070
00071 R Invoke() {
00072
00073
00074
00075
00076 return this->InvokeWith(ArgumentTuple());
00077 }
00078 };
00079
00080 template <typename R, typename A1>
00081 class FunctionMocker<R(A1)> : public
00082 internal::FunctionMockerBase<R(A1)> {
00083 public:
00084 typedef R F(A1);
00085 typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
00086
00087 MockSpec<F>& With(const Matcher<A1>& m1) {
00088 this->current_spec().SetMatchers(::std::tr1::make_tuple(m1));
00089 return this->current_spec();
00090 }
00091
00092 R Invoke(A1 a1) {
00093
00094
00095
00096
00097 return this->InvokeWith(ArgumentTuple(a1));
00098 }
00099 };
00100
00101 template <typename R, typename A1, typename A2>
00102 class FunctionMocker<R(A1, A2)> : public
00103 internal::FunctionMockerBase<R(A1, A2)> {
00104 public:
00105 typedef R F(A1, A2);
00106 typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
00107
00108 MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2) {
00109 this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2));
00110 return this->current_spec();
00111 }
00112
00113 R Invoke(A1 a1, A2 a2) {
00114
00115
00116
00117
00118 return this->InvokeWith(ArgumentTuple(a1, a2));
00119 }
00120 };
00121
00122 template <typename R, typename A1, typename A2, typename A3>
00123 class FunctionMocker<R(A1, A2, A3)> : public
00124 internal::FunctionMockerBase<R(A1, A2, A3)> {
00125 public:
00126 typedef R F(A1, A2, A3);
00127 typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
00128
00129 MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
00130 const Matcher<A3>& m3) {
00131 this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3));
00132 return this->current_spec();
00133 }
00134
00135 R Invoke(A1 a1, A2 a2, A3 a3) {
00136
00137
00138
00139
00140 return this->InvokeWith(ArgumentTuple(a1, a2, a3));
00141 }
00142 };
00143
00144 template <typename R, typename A1, typename A2, typename A3, typename A4>
00145 class FunctionMocker<R(A1, A2, A3, A4)> : public
00146 internal::FunctionMockerBase<R(A1, A2, A3, A4)> {
00147 public:
00148 typedef R F(A1, A2, A3, A4);
00149 typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
00150
00151 MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
00152 const Matcher<A3>& m3, const Matcher<A4>& m4) {
00153 this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4));
00154 return this->current_spec();
00155 }
00156
00157 R Invoke(A1 a1, A2 a2, A3 a3, A4 a4) {
00158
00159
00160
00161
00162 return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4));
00163 }
00164 };
00165
00166 template <typename R, typename A1, typename A2, typename A3, typename A4,
00167 typename A5>
00168 class FunctionMocker<R(A1, A2, A3, A4, A5)> : public
00169 internal::FunctionMockerBase<R(A1, A2, A3, A4, A5)> {
00170 public:
00171 typedef R F(A1, A2, A3, A4, A5);
00172 typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
00173
00174 MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
00175 const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5) {
00176 this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4,
00177 m5));
00178 return this->current_spec();
00179 }
00180
00181 R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) {
00182
00183
00184
00185
00186 return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5));
00187 }
00188 };
00189
00190 template <typename R, typename A1, typename A2, typename A3, typename A4,
00191 typename A5, typename A6>
00192 class FunctionMocker<R(A1, A2, A3, A4, A5, A6)> : public
00193 internal::FunctionMockerBase<R(A1, A2, A3, A4, A5, A6)> {
00194 public:
00195 typedef R F(A1, A2, A3, A4, A5, A6);
00196 typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
00197
00198 MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
00199 const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5,
00200 const Matcher<A6>& m6) {
00201 this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4, m5,
00202 m6));
00203 return this->current_spec();
00204 }
00205
00206 R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) {
00207
00208
00209
00210
00211 return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6));
00212 }
00213 };
00214
00215 template <typename R, typename A1, typename A2, typename A3, typename A4,
00216 typename A5, typename A6, typename A7>
00217 class FunctionMocker<R(A1, A2, A3, A4, A5, A6, A7)> : public
00218 internal::FunctionMockerBase<R(A1, A2, A3, A4, A5, A6, A7)> {
00219 public:
00220 typedef R F(A1, A2, A3, A4, A5, A6, A7);
00221 typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
00222
00223 MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
00224 const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5,
00225 const Matcher<A6>& m6, const Matcher<A7>& m7) {
00226 this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4, m5,
00227 m6, m7));
00228 return this->current_spec();
00229 }
00230
00231 R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) {
00232
00233
00234
00235
00236 return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7));
00237 }
00238 };
00239
00240 template <typename R, typename A1, typename A2, typename A3, typename A4,
00241 typename A5, typename A6, typename A7, typename A8>
00242 class FunctionMocker<R(A1, A2, A3, A4, A5, A6, A7, A8)> : public
00243 internal::FunctionMockerBase<R(A1, A2, A3, A4, A5, A6, A7, A8)> {
00244 public:
00245 typedef R F(A1, A2, A3, A4, A5, A6, A7, A8);
00246 typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
00247
00248 MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
00249 const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5,
00250 const Matcher<A6>& m6, const Matcher<A7>& m7, const Matcher<A8>& m8) {
00251 this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4, m5,
00252 m6, m7, m8));
00253 return this->current_spec();
00254 }
00255
00256 R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) {
00257
00258
00259
00260
00261 return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7, a8));
00262 }
00263 };
00264
00265 template <typename R, typename A1, typename A2, typename A3, typename A4,
00266 typename A5, typename A6, typename A7, typename A8, typename A9>
00267 class FunctionMocker<R(A1, A2, A3, A4, A5, A6, A7, A8, A9)> : public
00268 internal::FunctionMockerBase<R(A1, A2, A3, A4, A5, A6, A7, A8, A9)> {
00269 public:
00270 typedef R F(A1, A2, A3, A4, A5, A6, A7, A8, A9);
00271 typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
00272
00273 MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
00274 const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5,
00275 const Matcher<A6>& m6, const Matcher<A7>& m7, const Matcher<A8>& m8,
00276 const Matcher<A9>& m9) {
00277 this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4, m5,
00278 m6, m7, m8, m9));
00279 return this->current_spec();
00280 }
00281
00282 R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) {
00283
00284
00285
00286
00287 return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7, a8, a9));
00288 }
00289 };
00290
00291 template <typename R, typename A1, typename A2, typename A3, typename A4,
00292 typename A5, typename A6, typename A7, typename A8, typename A9,
00293 typename A10>
00294 class FunctionMocker<R(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)> : public
00295 internal::FunctionMockerBase<R(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)> {
00296 public:
00297 typedef R F(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10);
00298 typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
00299
00300 MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
00301 const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5,
00302 const Matcher<A6>& m6, const Matcher<A7>& m7, const Matcher<A8>& m8,
00303 const Matcher<A9>& m9, const Matcher<A10>& m10) {
00304 this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4, m5,
00305 m6, m7, m8, m9, m10));
00306 return this->current_spec();
00307 }
00308
00309 R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9,
00310 A10 a10) {
00311
00312
00313
00314
00315 return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7, a8, a9,
00316 a10));
00317 }
00318 };
00319
00320 }
00321
00322
00323
00324
00325
00326
00327 using internal::FunctionMocker;
00328
00329
00330
00331
00332
00333
00334 #define GMOCK_RESULT_(tn, ...) \
00335 tn ::testing::internal::Function<__VA_ARGS__>::Result
00336
00337
00338
00339 #define GMOCK_ARG_(tn, N, ...) \
00340 tn ::testing::internal::Function<__VA_ARGS__>::Argument##N
00341
00342
00343
00344 #define GMOCK_MATCHER_(tn, N, ...) \
00345 const ::testing::Matcher<GMOCK_ARG_(tn, N, __VA_ARGS__)>&
00346
00347
00348
00349 #define GMOCK_MOCKER_(arity, constness, Method) \
00350 GTEST_CONCAT_TOKEN_(gmock##constness##arity##_##Method##_, __LINE__)
00351
00352
00353 #define GMOCK_METHOD0_(tn, constness, ct, Method, ...) \
00354 GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
00355 ) constness { \
00356 GTEST_COMPILE_ASSERT_((::std::tr1::tuple_size< \
00357 tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \
00358 == 0), \
00359 this_method_does_not_take_0_arguments); \
00360 GMOCK_MOCKER_(0, constness, Method).SetOwnerAndName(this, #Method); \
00361 return GMOCK_MOCKER_(0, constness, Method).Invoke(); \
00362 } \
00363 ::testing::MockSpec<__VA_ARGS__>& \
00364 gmock_##Method() constness { \
00365 GMOCK_MOCKER_(0, constness, Method).RegisterOwner(this); \
00366 return GMOCK_MOCKER_(0, constness, Method).With(); \
00367 } \
00368 mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(0, constness, \
00369 Method)
00370
00371
00372 #define GMOCK_METHOD1_(tn, constness, ct, Method, ...) \
00373 GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
00374 GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1) constness { \
00375 GTEST_COMPILE_ASSERT_((::std::tr1::tuple_size< \
00376 tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \
00377 == 1), \
00378 this_method_does_not_take_1_argument); \
00379 GMOCK_MOCKER_(1, constness, Method).SetOwnerAndName(this, #Method); \
00380 return GMOCK_MOCKER_(1, constness, Method).Invoke(gmock_a1); \
00381 } \
00382 ::testing::MockSpec<__VA_ARGS__>& \
00383 gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1) constness { \
00384 GMOCK_MOCKER_(1, constness, Method).RegisterOwner(this); \
00385 return GMOCK_MOCKER_(1, constness, Method).With(gmock_a1); \
00386 } \
00387 mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(1, constness, \
00388 Method)
00389
00390
00391 #define GMOCK_METHOD2_(tn, constness, ct, Method, ...) \
00392 GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
00393 GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
00394 GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2) constness { \
00395 GTEST_COMPILE_ASSERT_((::std::tr1::tuple_size< \
00396 tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \
00397 == 2), \
00398 this_method_does_not_take_2_arguments); \
00399 GMOCK_MOCKER_(2, constness, Method).SetOwnerAndName(this, #Method); \
00400 return GMOCK_MOCKER_(2, constness, Method).Invoke(gmock_a1, gmock_a2); \
00401 } \
00402 ::testing::MockSpec<__VA_ARGS__>& \
00403 gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
00404 GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2) constness { \
00405 GMOCK_MOCKER_(2, constness, Method).RegisterOwner(this); \
00406 return GMOCK_MOCKER_(2, constness, Method).With(gmock_a1, gmock_a2); \
00407 } \
00408 mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(2, constness, \
00409 Method)
00410
00411
00412 #define GMOCK_METHOD3_(tn, constness, ct, Method, ...) \
00413 GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
00414 GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
00415 GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2, \
00416 GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3) constness { \
00417 GTEST_COMPILE_ASSERT_((::std::tr1::tuple_size< \
00418 tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \
00419 == 3), \
00420 this_method_does_not_take_3_arguments); \
00421 GMOCK_MOCKER_(3, constness, Method).SetOwnerAndName(this, #Method); \
00422 return GMOCK_MOCKER_(3, constness, Method).Invoke(gmock_a1, gmock_a2, \
00423 gmock_a3); \
00424 } \
00425 ::testing::MockSpec<__VA_ARGS__>& \
00426 gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
00427 GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
00428 GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3) constness { \
00429 GMOCK_MOCKER_(3, constness, Method).RegisterOwner(this); \
00430 return GMOCK_MOCKER_(3, constness, Method).With(gmock_a1, gmock_a2, \
00431 gmock_a3); \
00432 } \
00433 mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(3, constness, \
00434 Method)
00435
00436
00437 #define GMOCK_METHOD4_(tn, constness, ct, Method, ...) \
00438 GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
00439 GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
00440 GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2, \
00441 GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
00442 GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4) constness { \
00443 GTEST_COMPILE_ASSERT_((::std::tr1::tuple_size< \
00444 tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \
00445 == 4), \
00446 this_method_does_not_take_4_arguments); \
00447 GMOCK_MOCKER_(4, constness, Method).SetOwnerAndName(this, #Method); \
00448 return GMOCK_MOCKER_(4, constness, Method).Invoke(gmock_a1, gmock_a2, \
00449 gmock_a3, gmock_a4); \
00450 } \
00451 ::testing::MockSpec<__VA_ARGS__>& \
00452 gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
00453 GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
00454 GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \
00455 GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4) constness { \
00456 GMOCK_MOCKER_(4, constness, Method).RegisterOwner(this); \
00457 return GMOCK_MOCKER_(4, constness, Method).With(gmock_a1, gmock_a2, \
00458 gmock_a3, gmock_a4); \
00459 } \
00460 mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(4, constness, \
00461 Method)
00462
00463
00464 #define GMOCK_METHOD5_(tn, constness, ct, Method, ...) \
00465 GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
00466 GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
00467 GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2, \
00468 GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
00469 GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, \
00470 GMOCK_ARG_(tn, 5, __VA_ARGS__) gmock_a5) constness { \
00471 GTEST_COMPILE_ASSERT_((::std::tr1::tuple_size< \
00472 tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \
00473 == 5), \
00474 this_method_does_not_take_5_arguments); \
00475 GMOCK_MOCKER_(5, constness, Method).SetOwnerAndName(this, #Method); \
00476 return GMOCK_MOCKER_(5, constness, Method).Invoke(gmock_a1, gmock_a2, \
00477 gmock_a3, gmock_a4, gmock_a5); \
00478 } \
00479 ::testing::MockSpec<__VA_ARGS__>& \
00480 gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
00481 GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
00482 GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \
00483 GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \
00484 GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5) constness { \
00485 GMOCK_MOCKER_(5, constness, Method).RegisterOwner(this); \
00486 return GMOCK_MOCKER_(5, constness, Method).With(gmock_a1, gmock_a2, \
00487 gmock_a3, gmock_a4, gmock_a5); \
00488 } \
00489 mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(5, constness, \
00490 Method)
00491
00492
00493 #define GMOCK_METHOD6_(tn, constness, ct, Method, ...) \
00494 GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
00495 GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
00496 GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2, \
00497 GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
00498 GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, \
00499 GMOCK_ARG_(tn, 5, __VA_ARGS__) gmock_a5, \
00500 GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6) constness { \
00501 GTEST_COMPILE_ASSERT_((::std::tr1::tuple_size< \
00502 tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \
00503 == 6), \
00504 this_method_does_not_take_6_arguments); \
00505 GMOCK_MOCKER_(6, constness, Method).SetOwnerAndName(this, #Method); \
00506 return GMOCK_MOCKER_(6, constness, Method).Invoke(gmock_a1, gmock_a2, \
00507 gmock_a3, gmock_a4, gmock_a5, gmock_a6); \
00508 } \
00509 ::testing::MockSpec<__VA_ARGS__>& \
00510 gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
00511 GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
00512 GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \
00513 GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \
00514 GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \
00515 GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6) constness { \
00516 GMOCK_MOCKER_(6, constness, Method).RegisterOwner(this); \
00517 return GMOCK_MOCKER_(6, constness, Method).With(gmock_a1, gmock_a2, \
00518 gmock_a3, gmock_a4, gmock_a5, gmock_a6); \
00519 } \
00520 mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(6, constness, \
00521 Method)
00522
00523
00524 #define GMOCK_METHOD7_(tn, constness, ct, Method, ...) \
00525 GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
00526 GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
00527 GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2, \
00528 GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
00529 GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, \
00530 GMOCK_ARG_(tn, 5, __VA_ARGS__) gmock_a5, \
00531 GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6, \
00532 GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7) constness { \
00533 GTEST_COMPILE_ASSERT_((::std::tr1::tuple_size< \
00534 tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \
00535 == 7), \
00536 this_method_does_not_take_7_arguments); \
00537 GMOCK_MOCKER_(7, constness, Method).SetOwnerAndName(this, #Method); \
00538 return GMOCK_MOCKER_(7, constness, Method).Invoke(gmock_a1, gmock_a2, \
00539 gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7); \
00540 } \
00541 ::testing::MockSpec<__VA_ARGS__>& \
00542 gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
00543 GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
00544 GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \
00545 GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \
00546 GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \
00547 GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6, \
00548 GMOCK_MATCHER_(tn, 7, __VA_ARGS__) gmock_a7) constness { \
00549 GMOCK_MOCKER_(7, constness, Method).RegisterOwner(this); \
00550 return GMOCK_MOCKER_(7, constness, Method).With(gmock_a1, gmock_a2, \
00551 gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7); \
00552 } \
00553 mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(7, constness, \
00554 Method)
00555
00556
00557 #define GMOCK_METHOD8_(tn, constness, ct, Method, ...) \
00558 GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
00559 GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
00560 GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2, \
00561 GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
00562 GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, \
00563 GMOCK_ARG_(tn, 5, __VA_ARGS__) gmock_a5, \
00564 GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6, \
00565 GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7, \
00566 GMOCK_ARG_(tn, 8, __VA_ARGS__) gmock_a8) constness { \
00567 GTEST_COMPILE_ASSERT_((::std::tr1::tuple_size< \
00568 tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \
00569 == 8), \
00570 this_method_does_not_take_8_arguments); \
00571 GMOCK_MOCKER_(8, constness, Method).SetOwnerAndName(this, #Method); \
00572 return GMOCK_MOCKER_(8, constness, Method).Invoke(gmock_a1, gmock_a2, \
00573 gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8); \
00574 } \
00575 ::testing::MockSpec<__VA_ARGS__>& \
00576 gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
00577 GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
00578 GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \
00579 GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \
00580 GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \
00581 GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6, \
00582 GMOCK_MATCHER_(tn, 7, __VA_ARGS__) gmock_a7, \
00583 GMOCK_MATCHER_(tn, 8, __VA_ARGS__) gmock_a8) constness { \
00584 GMOCK_MOCKER_(8, constness, Method).RegisterOwner(this); \
00585 return GMOCK_MOCKER_(8, constness, Method).With(gmock_a1, gmock_a2, \
00586 gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8); \
00587 } \
00588 mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(8, constness, \
00589 Method)
00590
00591
00592 #define GMOCK_METHOD9_(tn, constness, ct, Method, ...) \
00593 GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
00594 GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
00595 GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2, \
00596 GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
00597 GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, \
00598 GMOCK_ARG_(tn, 5, __VA_ARGS__) gmock_a5, \
00599 GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6, \
00600 GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7, \
00601 GMOCK_ARG_(tn, 8, __VA_ARGS__) gmock_a8, \
00602 GMOCK_ARG_(tn, 9, __VA_ARGS__) gmock_a9) constness { \
00603 GTEST_COMPILE_ASSERT_((::std::tr1::tuple_size< \
00604 tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \
00605 == 9), \
00606 this_method_does_not_take_9_arguments); \
00607 GMOCK_MOCKER_(9, constness, Method).SetOwnerAndName(this, #Method); \
00608 return GMOCK_MOCKER_(9, constness, Method).Invoke(gmock_a1, gmock_a2, \
00609 gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, \
00610 gmock_a9); \
00611 } \
00612 ::testing::MockSpec<__VA_ARGS__>& \
00613 gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
00614 GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
00615 GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \
00616 GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \
00617 GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \
00618 GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6, \
00619 GMOCK_MATCHER_(tn, 7, __VA_ARGS__) gmock_a7, \
00620 GMOCK_MATCHER_(tn, 8, __VA_ARGS__) gmock_a8, \
00621 GMOCK_MATCHER_(tn, 9, __VA_ARGS__) gmock_a9) constness { \
00622 GMOCK_MOCKER_(9, constness, Method).RegisterOwner(this); \
00623 return GMOCK_MOCKER_(9, constness, Method).With(gmock_a1, gmock_a2, \
00624 gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, \
00625 gmock_a9); \
00626 } \
00627 mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(9, constness, \
00628 Method)
00629
00630
00631 #define GMOCK_METHOD10_(tn, constness, ct, Method, ...) \
00632 GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
00633 GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
00634 GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2, \
00635 GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
00636 GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, \
00637 GMOCK_ARG_(tn, 5, __VA_ARGS__) gmock_a5, \
00638 GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6, \
00639 GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7, \
00640 GMOCK_ARG_(tn, 8, __VA_ARGS__) gmock_a8, \
00641 GMOCK_ARG_(tn, 9, __VA_ARGS__) gmock_a9, \
00642 GMOCK_ARG_(tn, 10, __VA_ARGS__) gmock_a10) constness { \
00643 GTEST_COMPILE_ASSERT_((::std::tr1::tuple_size< \
00644 tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \
00645 == 10), \
00646 this_method_does_not_take_10_arguments); \
00647 GMOCK_MOCKER_(10, constness, Method).SetOwnerAndName(this, #Method); \
00648 return GMOCK_MOCKER_(10, constness, Method).Invoke(gmock_a1, gmock_a2, \
00649 gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, gmock_a9, \
00650 gmock_a10); \
00651 } \
00652 ::testing::MockSpec<__VA_ARGS__>& \
00653 gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
00654 GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
00655 GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \
00656 GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \
00657 GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \
00658 GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6, \
00659 GMOCK_MATCHER_(tn, 7, __VA_ARGS__) gmock_a7, \
00660 GMOCK_MATCHER_(tn, 8, __VA_ARGS__) gmock_a8, \
00661 GMOCK_MATCHER_(tn, 9, __VA_ARGS__) gmock_a9, \
00662 GMOCK_MATCHER_(tn, 10, \
00663 __VA_ARGS__) gmock_a10) constness { \
00664 GMOCK_MOCKER_(10, constness, Method).RegisterOwner(this); \
00665 return GMOCK_MOCKER_(10, constness, Method).With(gmock_a1, gmock_a2, \
00666 gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, gmock_a9, \
00667 gmock_a10); \
00668 } \
00669 mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(10, constness, \
00670 Method)
00671
00672 #define MOCK_METHOD0(m, ...) GMOCK_METHOD0_(, , , m, __VA_ARGS__)
00673 #define MOCK_METHOD1(m, ...) GMOCK_METHOD1_(, , , m, __VA_ARGS__)
00674 #define MOCK_METHOD2(m, ...) GMOCK_METHOD2_(, , , m, __VA_ARGS__)
00675 #define MOCK_METHOD3(m, ...) GMOCK_METHOD3_(, , , m, __VA_ARGS__)
00676 #define MOCK_METHOD4(m, ...) GMOCK_METHOD4_(, , , m, __VA_ARGS__)
00677 #define MOCK_METHOD5(m, ...) GMOCK_METHOD5_(, , , m, __VA_ARGS__)
00678 #define MOCK_METHOD6(m, ...) GMOCK_METHOD6_(, , , m, __VA_ARGS__)
00679 #define MOCK_METHOD7(m, ...) GMOCK_METHOD7_(, , , m, __VA_ARGS__)
00680 #define MOCK_METHOD8(m, ...) GMOCK_METHOD8_(, , , m, __VA_ARGS__)
00681 #define MOCK_METHOD9(m, ...) GMOCK_METHOD9_(, , , m, __VA_ARGS__)
00682 #define MOCK_METHOD10(m, ...) GMOCK_METHOD10_(, , , m, __VA_ARGS__)
00683
00684 #define MOCK_CONST_METHOD0(m, ...) GMOCK_METHOD0_(, const, , m, __VA_ARGS__)
00685 #define MOCK_CONST_METHOD1(m, ...) GMOCK_METHOD1_(, const, , m, __VA_ARGS__)
00686 #define MOCK_CONST_METHOD2(m, ...) GMOCK_METHOD2_(, const, , m, __VA_ARGS__)
00687 #define MOCK_CONST_METHOD3(m, ...) GMOCK_METHOD3_(, const, , m, __VA_ARGS__)
00688 #define MOCK_CONST_METHOD4(m, ...) GMOCK_METHOD4_(, const, , m, __VA_ARGS__)
00689 #define MOCK_CONST_METHOD5(m, ...) GMOCK_METHOD5_(, const, , m, __VA_ARGS__)
00690 #define MOCK_CONST_METHOD6(m, ...) GMOCK_METHOD6_(, const, , m, __VA_ARGS__)
00691 #define MOCK_CONST_METHOD7(m, ...) GMOCK_METHOD7_(, const, , m, __VA_ARGS__)
00692 #define MOCK_CONST_METHOD8(m, ...) GMOCK_METHOD8_(, const, , m, __VA_ARGS__)
00693 #define MOCK_CONST_METHOD9(m, ...) GMOCK_METHOD9_(, const, , m, __VA_ARGS__)
00694 #define MOCK_CONST_METHOD10(m, ...) GMOCK_METHOD10_(, const, , m, __VA_ARGS__)
00695
00696 #define MOCK_METHOD0_T(m, ...) GMOCK_METHOD0_(typename, , , m, __VA_ARGS__)
00697 #define MOCK_METHOD1_T(m, ...) GMOCK_METHOD1_(typename, , , m, __VA_ARGS__)
00698 #define MOCK_METHOD2_T(m, ...) GMOCK_METHOD2_(typename, , , m, __VA_ARGS__)
00699 #define MOCK_METHOD3_T(m, ...) GMOCK_METHOD3_(typename, , , m, __VA_ARGS__)
00700 #define MOCK_METHOD4_T(m, ...) GMOCK_METHOD4_(typename, , , m, __VA_ARGS__)
00701 #define MOCK_METHOD5_T(m, ...) GMOCK_METHOD5_(typename, , , m, __VA_ARGS__)
00702 #define MOCK_METHOD6_T(m, ...) GMOCK_METHOD6_(typename, , , m, __VA_ARGS__)
00703 #define MOCK_METHOD7_T(m, ...) GMOCK_METHOD7_(typename, , , m, __VA_ARGS__)
00704 #define MOCK_METHOD8_T(m, ...) GMOCK_METHOD8_(typename, , , m, __VA_ARGS__)
00705 #define MOCK_METHOD9_T(m, ...) GMOCK_METHOD9_(typename, , , m, __VA_ARGS__)
00706 #define MOCK_METHOD10_T(m, ...) GMOCK_METHOD10_(typename, , , m, __VA_ARGS__)
00707
00708 #define MOCK_CONST_METHOD0_T(m, ...) \
00709 GMOCK_METHOD0_(typename, const, , m, __VA_ARGS__)
00710 #define MOCK_CONST_METHOD1_T(m, ...) \
00711 GMOCK_METHOD1_(typename, const, , m, __VA_ARGS__)
00712 #define MOCK_CONST_METHOD2_T(m, ...) \
00713 GMOCK_METHOD2_(typename, const, , m, __VA_ARGS__)
00714 #define MOCK_CONST_METHOD3_T(m, ...) \
00715 GMOCK_METHOD3_(typename, const, , m, __VA_ARGS__)
00716 #define MOCK_CONST_METHOD4_T(m, ...) \
00717 GMOCK_METHOD4_(typename, const, , m, __VA_ARGS__)
00718 #define MOCK_CONST_METHOD5_T(m, ...) \
00719 GMOCK_METHOD5_(typename, const, , m, __VA_ARGS__)
00720 #define MOCK_CONST_METHOD6_T(m, ...) \
00721 GMOCK_METHOD6_(typename, const, , m, __VA_ARGS__)
00722 #define MOCK_CONST_METHOD7_T(m, ...) \
00723 GMOCK_METHOD7_(typename, const, , m, __VA_ARGS__)
00724 #define MOCK_CONST_METHOD8_T(m, ...) \
00725 GMOCK_METHOD8_(typename, const, , m, __VA_ARGS__)
00726 #define MOCK_CONST_METHOD9_T(m, ...) \
00727 GMOCK_METHOD9_(typename, const, , m, __VA_ARGS__)
00728 #define MOCK_CONST_METHOD10_T(m, ...) \
00729 GMOCK_METHOD10_(typename, const, , m, __VA_ARGS__)
00730
00731 #define MOCK_METHOD0_WITH_CALLTYPE(ct, m, ...) \
00732 GMOCK_METHOD0_(, , ct, m, __VA_ARGS__)
00733 #define MOCK_METHOD1_WITH_CALLTYPE(ct, m, ...) \
00734 GMOCK_METHOD1_(, , ct, m, __VA_ARGS__)
00735 #define MOCK_METHOD2_WITH_CALLTYPE(ct, m, ...) \
00736 GMOCK_METHOD2_(, , ct, m, __VA_ARGS__)
00737 #define MOCK_METHOD3_WITH_CALLTYPE(ct, m, ...) \
00738 GMOCK_METHOD3_(, , ct, m, __VA_ARGS__)
00739 #define MOCK_METHOD4_WITH_CALLTYPE(ct, m, ...) \
00740 GMOCK_METHOD4_(, , ct, m, __VA_ARGS__)
00741 #define MOCK_METHOD5_WITH_CALLTYPE(ct, m, ...) \
00742 GMOCK_METHOD5_(, , ct, m, __VA_ARGS__)
00743 #define MOCK_METHOD6_WITH_CALLTYPE(ct, m, ...) \
00744 GMOCK_METHOD6_(, , ct, m, __VA_ARGS__)
00745 #define MOCK_METHOD7_WITH_CALLTYPE(ct, m, ...) \
00746 GMOCK_METHOD7_(, , ct, m, __VA_ARGS__)
00747 #define MOCK_METHOD8_WITH_CALLTYPE(ct, m, ...) \
00748 GMOCK_METHOD8_(, , ct, m, __VA_ARGS__)
00749 #define MOCK_METHOD9_WITH_CALLTYPE(ct, m, ...) \
00750 GMOCK_METHOD9_(, , ct, m, __VA_ARGS__)
00751 #define MOCK_METHOD10_WITH_CALLTYPE(ct, m, ...) \
00752 GMOCK_METHOD10_(, , ct, m, __VA_ARGS__)
00753
00754 #define MOCK_CONST_METHOD0_WITH_CALLTYPE(ct, m, ...) \
00755 GMOCK_METHOD0_(, const, ct, m, __VA_ARGS__)
00756 #define MOCK_CONST_METHOD1_WITH_CALLTYPE(ct, m, ...) \
00757 GMOCK_METHOD1_(, const, ct, m, __VA_ARGS__)
00758 #define MOCK_CONST_METHOD2_WITH_CALLTYPE(ct, m, ...) \
00759 GMOCK_METHOD2_(, const, ct, m, __VA_ARGS__)
00760 #define MOCK_CONST_METHOD3_WITH_CALLTYPE(ct, m, ...) \
00761 GMOCK_METHOD3_(, const, ct, m, __VA_ARGS__)
00762 #define MOCK_CONST_METHOD4_WITH_CALLTYPE(ct, m, ...) \
00763 GMOCK_METHOD4_(, const, ct, m, __VA_ARGS__)
00764 #define MOCK_CONST_METHOD5_WITH_CALLTYPE(ct, m, ...) \
00765 GMOCK_METHOD5_(, const, ct, m, __VA_ARGS__)
00766 #define MOCK_CONST_METHOD6_WITH_CALLTYPE(ct, m, ...) \
00767 GMOCK_METHOD6_(, const, ct, m, __VA_ARGS__)
00768 #define MOCK_CONST_METHOD7_WITH_CALLTYPE(ct, m, ...) \
00769 GMOCK_METHOD7_(, const, ct, m, __VA_ARGS__)
00770 #define MOCK_CONST_METHOD8_WITH_CALLTYPE(ct, m, ...) \
00771 GMOCK_METHOD8_(, const, ct, m, __VA_ARGS__)
00772 #define MOCK_CONST_METHOD9_WITH_CALLTYPE(ct, m, ...) \
00773 GMOCK_METHOD9_(, const, ct, m, __VA_ARGS__)
00774 #define MOCK_CONST_METHOD10_WITH_CALLTYPE(ct, m, ...) \
00775 GMOCK_METHOD10_(, const, ct, m, __VA_ARGS__)
00776
00777 #define MOCK_METHOD0_T_WITH_CALLTYPE(ct, m, ...) \
00778 GMOCK_METHOD0_(typename, , ct, m, __VA_ARGS__)
00779 #define MOCK_METHOD1_T_WITH_CALLTYPE(ct, m, ...) \
00780 GMOCK_METHOD1_(typename, , ct, m, __VA_ARGS__)
00781 #define MOCK_METHOD2_T_WITH_CALLTYPE(ct, m, ...) \
00782 GMOCK_METHOD2_(typename, , ct, m, __VA_ARGS__)
00783 #define MOCK_METHOD3_T_WITH_CALLTYPE(ct, m, ...) \
00784 GMOCK_METHOD3_(typename, , ct, m, __VA_ARGS__)
00785 #define MOCK_METHOD4_T_WITH_CALLTYPE(ct, m, ...) \
00786 GMOCK_METHOD4_(typename, , ct, m, __VA_ARGS__)
00787 #define MOCK_METHOD5_T_WITH_CALLTYPE(ct, m, ...) \
00788 GMOCK_METHOD5_(typename, , ct, m, __VA_ARGS__)
00789 #define MOCK_METHOD6_T_WITH_CALLTYPE(ct, m, ...) \
00790 GMOCK_METHOD6_(typename, , ct, m, __VA_ARGS__)
00791 #define MOCK_METHOD7_T_WITH_CALLTYPE(ct, m, ...) \
00792 GMOCK_METHOD7_(typename, , ct, m, __VA_ARGS__)
00793 #define MOCK_METHOD8_T_WITH_CALLTYPE(ct, m, ...) \
00794 GMOCK_METHOD8_(typename, , ct, m, __VA_ARGS__)
00795 #define MOCK_METHOD9_T_WITH_CALLTYPE(ct, m, ...) \
00796 GMOCK_METHOD9_(typename, , ct, m, __VA_ARGS__)
00797 #define MOCK_METHOD10_T_WITH_CALLTYPE(ct, m, ...) \
00798 GMOCK_METHOD10_(typename, , ct, m, __VA_ARGS__)
00799
00800 #define MOCK_CONST_METHOD0_T_WITH_CALLTYPE(ct, m, ...) \
00801 GMOCK_METHOD0_(typename, const, ct, m, __VA_ARGS__)
00802 #define MOCK_CONST_METHOD1_T_WITH_CALLTYPE(ct, m, ...) \
00803 GMOCK_METHOD1_(typename, const, ct, m, __VA_ARGS__)
00804 #define MOCK_CONST_METHOD2_T_WITH_CALLTYPE(ct, m, ...) \
00805 GMOCK_METHOD2_(typename, const, ct, m, __VA_ARGS__)
00806 #define MOCK_CONST_METHOD3_T_WITH_CALLTYPE(ct, m, ...) \
00807 GMOCK_METHOD3_(typename, const, ct, m, __VA_ARGS__)
00808 #define MOCK_CONST_METHOD4_T_WITH_CALLTYPE(ct, m, ...) \
00809 GMOCK_METHOD4_(typename, const, ct, m, __VA_ARGS__)
00810 #define MOCK_CONST_METHOD5_T_WITH_CALLTYPE(ct, m, ...) \
00811 GMOCK_METHOD5_(typename, const, ct, m, __VA_ARGS__)
00812 #define MOCK_CONST_METHOD6_T_WITH_CALLTYPE(ct, m, ...) \
00813 GMOCK_METHOD6_(typename, const, ct, m, __VA_ARGS__)
00814 #define MOCK_CONST_METHOD7_T_WITH_CALLTYPE(ct, m, ...) \
00815 GMOCK_METHOD7_(typename, const, ct, m, __VA_ARGS__)
00816 #define MOCK_CONST_METHOD8_T_WITH_CALLTYPE(ct, m, ...) \
00817 GMOCK_METHOD8_(typename, const, ct, m, __VA_ARGS__)
00818 #define MOCK_CONST_METHOD9_T_WITH_CALLTYPE(ct, m, ...) \
00819 GMOCK_METHOD9_(typename, const, ct, m, __VA_ARGS__)
00820 #define MOCK_CONST_METHOD10_T_WITH_CALLTYPE(ct, m, ...) \
00821 GMOCK_METHOD10_(typename, const, ct, m, __VA_ARGS__)
00822
00823
00824
00825
00826
00827
00828
00829
00830
00831
00832
00833
00834
00835
00836
00837
00838
00839
00840
00841
00842
00843
00844
00845
00846
00847
00848
00849
00850
00851
00852
00853
00854
00855
00856
00857
00858 template <typename F>
00859 class MockFunction;
00860
00861 template <typename R>
00862 class MockFunction<R()> {
00863 public:
00864 MockFunction() {}
00865
00866 MOCK_METHOD0_T(Call, R());
00867
00868 private:
00869 GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
00870 };
00871
00872 template <typename R, typename A0>
00873 class MockFunction<R(A0)> {
00874 public:
00875 MockFunction() {}
00876
00877 MOCK_METHOD1_T(Call, R(A0));
00878
00879 private:
00880 GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
00881 };
00882
00883 template <typename R, typename A0, typename A1>
00884 class MockFunction<R(A0, A1)> {
00885 public:
00886 MockFunction() {}
00887
00888 MOCK_METHOD2_T(Call, R(A0, A1));
00889
00890 private:
00891 GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
00892 };
00893
00894 template <typename R, typename A0, typename A1, typename A2>
00895 class MockFunction<R(A0, A1, A2)> {
00896 public:
00897 MockFunction() {}
00898
00899 MOCK_METHOD3_T(Call, R(A0, A1, A2));
00900
00901 private:
00902 GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
00903 };
00904
00905 template <typename R, typename A0, typename A1, typename A2, typename A3>
00906 class MockFunction<R(A0, A1, A2, A3)> {
00907 public:
00908 MockFunction() {}
00909
00910 MOCK_METHOD4_T(Call, R(A0, A1, A2, A3));
00911
00912 private:
00913 GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
00914 };
00915
00916 template <typename R, typename A0, typename A1, typename A2, typename A3,
00917 typename A4>
00918 class MockFunction<R(A0, A1, A2, A3, A4)> {
00919 public:
00920 MockFunction() {}
00921
00922 MOCK_METHOD5_T(Call, R(A0, A1, A2, A3, A4));
00923
00924 private:
00925 GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
00926 };
00927
00928 template <typename R, typename A0, typename A1, typename A2, typename A3,
00929 typename A4, typename A5>
00930 class MockFunction<R(A0, A1, A2, A3, A4, A5)> {
00931 public:
00932 MockFunction() {}
00933
00934 MOCK_METHOD6_T(Call, R(A0, A1, A2, A3, A4, A5));
00935
00936 private:
00937 GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
00938 };
00939
00940 template <typename R, typename A0, typename A1, typename A2, typename A3,
00941 typename A4, typename A5, typename A6>
00942 class MockFunction<R(A0, A1, A2, A3, A4, A5, A6)> {
00943 public:
00944 MockFunction() {}
00945
00946 MOCK_METHOD7_T(Call, R(A0, A1, A2, A3, A4, A5, A6));
00947
00948 private:
00949 GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
00950 };
00951
00952 template <typename R, typename A0, typename A1, typename A2, typename A3,
00953 typename A4, typename A5, typename A6, typename A7>
00954 class MockFunction<R(A0, A1, A2, A3, A4, A5, A6, A7)> {
00955 public:
00956 MockFunction() {}
00957
00958 MOCK_METHOD8_T(Call, R(A0, A1, A2, A3, A4, A5, A6, A7));
00959
00960 private:
00961 GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
00962 };
00963
00964 template <typename R, typename A0, typename A1, typename A2, typename A3,
00965 typename A4, typename A5, typename A6, typename A7, typename A8>
00966 class MockFunction<R(A0, A1, A2, A3, A4, A5, A6, A7, A8)> {
00967 public:
00968 MockFunction() {}
00969
00970 MOCK_METHOD9_T(Call, R(A0, A1, A2, A3, A4, A5, A6, A7, A8));
00971
00972 private:
00973 GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
00974 };
00975
00976 template <typename R, typename A0, typename A1, typename A2, typename A3,
00977 typename A4, typename A5, typename A6, typename A7, typename A8,
00978 typename A9>
00979 class MockFunction<R(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9)> {
00980 public:
00981 MockFunction() {}
00982
00983 MOCK_METHOD10_T(Call, R(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9));
00984
00985 private:
00986 GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
00987 };
00988
00989 }
00990
00991 #endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_