blob: 577fd9e91144b29604b5ca6df108761fcb8826f6 [file] [log] [blame]
zhanyong.waned6c9272011-02-23 19:39:27 +00001// This file was GENERATED by command:
2// pump.py gmock-generated-function-mockers.h.pump
3// DO NOT EDIT BY HAND!!!
shiqiane35fdd92008-12-10 05:08:54 +00004
5// Copyright 2007, Google Inc.
6// All rights reserved.
7//
8// Redistribution and use in source and binary forms, with or without
9// modification, are permitted provided that the following conditions are
10// met:
11//
12// * Redistributions of source code must retain the above copyright
13// notice, this list of conditions and the following disclaimer.
14// * Redistributions in binary form must reproduce the above
15// copyright notice, this list of conditions and the following disclaimer
16// in the documentation and/or other materials provided with the
17// distribution.
18// * Neither the name of Google Inc. nor the names of its
19// contributors may be used to endorse or promote products derived from
20// this software without specific prior written permission.
21//
22// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33//
34// Author: wan@google.com (Zhanyong Wan)
35
36// Google Mock - a framework for writing C++ mock classes.
37//
38// This file implements function mockers of various arities.
39
40#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_
41#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_
42
zhanyong.wan53e08c42010-09-14 05:38:21 +000043#include "gmock/gmock-spec-builders.h"
44#include "gmock/internal/gmock-internal-utils.h"
shiqiane35fdd92008-12-10 05:08:54 +000045
46namespace testing {
shiqiane35fdd92008-12-10 05:08:54 +000047namespace internal {
48
49template <typename F>
50class FunctionMockerBase;
51
52// Note: class FunctionMocker really belongs to the ::testing
53// namespace. However if we define it in ::testing, MSVC will
54// complain when classes in ::testing::internal declare it as a
55// friend class template. To workaround this compiler bug, we define
56// FunctionMocker in ::testing::internal and import it into ::testing.
57template <typename F>
58class FunctionMocker;
59
60template <typename R>
61class FunctionMocker<R()> : public
62 internal::FunctionMockerBase<R()> {
63 public:
64 typedef R F();
65 typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
66
67 MockSpec<F>& With() {
68 return this->current_spec();
69 }
70
71 R Invoke() {
zhanyong.wan21a58462009-11-12 19:18:08 +000072 // Even though gcc and MSVC don't enforce it, 'this->' is required
73 // by the C++ standard [14.6.4] here, as the base class type is
74 // dependent on the template argument (and thus shouldn't be
75 // looked into when resolving InvokeWith).
76 return this->InvokeWith(ArgumentTuple());
shiqiane35fdd92008-12-10 05:08:54 +000077 }
78};
79
80template <typename R, typename A1>
81class FunctionMocker<R(A1)> : public
82 internal::FunctionMockerBase<R(A1)> {
83 public:
84 typedef R F(A1);
85 typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
86
87 MockSpec<F>& With(const Matcher<A1>& m1) {
88 this->current_spec().SetMatchers(::std::tr1::make_tuple(m1));
89 return this->current_spec();
90 }
91
92 R Invoke(A1 a1) {
zhanyong.wan21a58462009-11-12 19:18:08 +000093 // Even though gcc and MSVC don't enforce it, 'this->' is required
94 // by the C++ standard [14.6.4] here, as the base class type is
95 // dependent on the template argument (and thus shouldn't be
96 // looked into when resolving InvokeWith).
97 return this->InvokeWith(ArgumentTuple(a1));
shiqiane35fdd92008-12-10 05:08:54 +000098 }
99};
100
101template <typename R, typename A1, typename A2>
102class FunctionMocker<R(A1, A2)> : public
103 internal::FunctionMockerBase<R(A1, A2)> {
104 public:
105 typedef R F(A1, A2);
106 typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
107
108 MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2) {
109 this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2));
110 return this->current_spec();
111 }
112
113 R Invoke(A1 a1, A2 a2) {
zhanyong.wan21a58462009-11-12 19:18:08 +0000114 // Even though gcc and MSVC don't enforce it, 'this->' is required
115 // by the C++ standard [14.6.4] here, as the base class type is
116 // dependent on the template argument (and thus shouldn't be
117 // looked into when resolving InvokeWith).
118 return this->InvokeWith(ArgumentTuple(a1, a2));
shiqiane35fdd92008-12-10 05:08:54 +0000119 }
120};
121
122template <typename R, typename A1, typename A2, typename A3>
123class FunctionMocker<R(A1, A2, A3)> : public
124 internal::FunctionMockerBase<R(A1, A2, A3)> {
125 public:
126 typedef R F(A1, A2, A3);
127 typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
128
129 MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
130 const Matcher<A3>& m3) {
131 this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3));
132 return this->current_spec();
133 }
134
135 R Invoke(A1 a1, A2 a2, A3 a3) {
zhanyong.wan21a58462009-11-12 19:18:08 +0000136 // Even though gcc and MSVC don't enforce it, 'this->' is required
137 // by the C++ standard [14.6.4] here, as the base class type is
138 // dependent on the template argument (and thus shouldn't be
139 // looked into when resolving InvokeWith).
140 return this->InvokeWith(ArgumentTuple(a1, a2, a3));
shiqiane35fdd92008-12-10 05:08:54 +0000141 }
142};
143
144template <typename R, typename A1, typename A2, typename A3, typename A4>
145class FunctionMocker<R(A1, A2, A3, A4)> : public
146 internal::FunctionMockerBase<R(A1, A2, A3, A4)> {
147 public:
148 typedef R F(A1, A2, A3, A4);
149 typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
150
151 MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
152 const Matcher<A3>& m3, const Matcher<A4>& m4) {
153 this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4));
154 return this->current_spec();
155 }
156
157 R Invoke(A1 a1, A2 a2, A3 a3, A4 a4) {
zhanyong.wan21a58462009-11-12 19:18:08 +0000158 // Even though gcc and MSVC don't enforce it, 'this->' is required
159 // by the C++ standard [14.6.4] here, as the base class type is
160 // dependent on the template argument (and thus shouldn't be
161 // looked into when resolving InvokeWith).
162 return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4));
shiqiane35fdd92008-12-10 05:08:54 +0000163 }
164};
165
166template <typename R, typename A1, typename A2, typename A3, typename A4,
167 typename A5>
168class FunctionMocker<R(A1, A2, A3, A4, A5)> : public
169 internal::FunctionMockerBase<R(A1, A2, A3, A4, A5)> {
170 public:
171 typedef R F(A1, A2, A3, A4, A5);
172 typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
173
174 MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
175 const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5) {
176 this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4,
177 m5));
178 return this->current_spec();
179 }
180
181 R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) {
zhanyong.wan21a58462009-11-12 19:18:08 +0000182 // Even though gcc and MSVC don't enforce it, 'this->' is required
183 // by the C++ standard [14.6.4] here, as the base class type is
184 // dependent on the template argument (and thus shouldn't be
185 // looked into when resolving InvokeWith).
186 return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5));
shiqiane35fdd92008-12-10 05:08:54 +0000187 }
188};
189
190template <typename R, typename A1, typename A2, typename A3, typename A4,
191 typename A5, typename A6>
192class FunctionMocker<R(A1, A2, A3, A4, A5, A6)> : public
193 internal::FunctionMockerBase<R(A1, A2, A3, A4, A5, A6)> {
194 public:
195 typedef R F(A1, A2, A3, A4, A5, A6);
196 typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
197
198 MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
199 const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5,
200 const Matcher<A6>& m6) {
201 this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4, m5,
202 m6));
203 return this->current_spec();
204 }
205
206 R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) {
zhanyong.wan21a58462009-11-12 19:18:08 +0000207 // Even though gcc and MSVC don't enforce it, 'this->' is required
208 // by the C++ standard [14.6.4] here, as the base class type is
209 // dependent on the template argument (and thus shouldn't be
210 // looked into when resolving InvokeWith).
211 return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6));
shiqiane35fdd92008-12-10 05:08:54 +0000212 }
213};
214
215template <typename R, typename A1, typename A2, typename A3, typename A4,
216 typename A5, typename A6, typename A7>
217class FunctionMocker<R(A1, A2, A3, A4, A5, A6, A7)> : public
218 internal::FunctionMockerBase<R(A1, A2, A3, A4, A5, A6, A7)> {
219 public:
220 typedef R F(A1, A2, A3, A4, A5, A6, A7);
221 typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
222
223 MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
224 const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5,
225 const Matcher<A6>& m6, const Matcher<A7>& m7) {
226 this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4, m5,
227 m6, m7));
228 return this->current_spec();
229 }
230
231 R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) {
zhanyong.wan21a58462009-11-12 19:18:08 +0000232 // Even though gcc and MSVC don't enforce it, 'this->' is required
233 // by the C++ standard [14.6.4] here, as the base class type is
234 // dependent on the template argument (and thus shouldn't be
235 // looked into when resolving InvokeWith).
236 return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7));
shiqiane35fdd92008-12-10 05:08:54 +0000237 }
238};
239
240template <typename R, typename A1, typename A2, typename A3, typename A4,
241 typename A5, typename A6, typename A7, typename A8>
242class FunctionMocker<R(A1, A2, A3, A4, A5, A6, A7, A8)> : public
243 internal::FunctionMockerBase<R(A1, A2, A3, A4, A5, A6, A7, A8)> {
244 public:
245 typedef R F(A1, A2, A3, A4, A5, A6, A7, A8);
246 typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
247
248 MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
249 const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5,
250 const Matcher<A6>& m6, const Matcher<A7>& m7, const Matcher<A8>& m8) {
251 this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4, m5,
252 m6, m7, m8));
253 return this->current_spec();
254 }
255
256 R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) {
zhanyong.wan21a58462009-11-12 19:18:08 +0000257 // Even though gcc and MSVC don't enforce it, 'this->' is required
258 // by the C++ standard [14.6.4] here, as the base class type is
259 // dependent on the template argument (and thus shouldn't be
260 // looked into when resolving InvokeWith).
261 return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7, a8));
shiqiane35fdd92008-12-10 05:08:54 +0000262 }
263};
264
265template <typename R, typename A1, typename A2, typename A3, typename A4,
266 typename A5, typename A6, typename A7, typename A8, typename A9>
267class FunctionMocker<R(A1, A2, A3, A4, A5, A6, A7, A8, A9)> : public
268 internal::FunctionMockerBase<R(A1, A2, A3, A4, A5, A6, A7, A8, A9)> {
269 public:
270 typedef R F(A1, A2, A3, A4, A5, A6, A7, A8, A9);
271 typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
272
273 MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
274 const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5,
275 const Matcher<A6>& m6, const Matcher<A7>& m7, const Matcher<A8>& m8,
276 const Matcher<A9>& m9) {
277 this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4, m5,
278 m6, m7, m8, m9));
279 return this->current_spec();
280 }
281
282 R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) {
zhanyong.wan21a58462009-11-12 19:18:08 +0000283 // Even though gcc and MSVC don't enforce it, 'this->' is required
284 // by the C++ standard [14.6.4] here, as the base class type is
285 // dependent on the template argument (and thus shouldn't be
286 // looked into when resolving InvokeWith).
287 return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7, a8, a9));
shiqiane35fdd92008-12-10 05:08:54 +0000288 }
289};
290
291template <typename R, typename A1, typename A2, typename A3, typename A4,
292 typename A5, typename A6, typename A7, typename A8, typename A9,
293 typename A10>
294class FunctionMocker<R(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)> : public
295 internal::FunctionMockerBase<R(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)> {
296 public:
297 typedef R F(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10);
298 typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
299
300 MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
301 const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5,
302 const Matcher<A6>& m6, const Matcher<A7>& m7, const Matcher<A8>& m8,
303 const Matcher<A9>& m9, const Matcher<A10>& m10) {
304 this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4, m5,
305 m6, m7, m8, m9, m10));
306 return this->current_spec();
307 }
308
309 R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9,
310 A10 a10) {
zhanyong.wan21a58462009-11-12 19:18:08 +0000311 // Even though gcc and MSVC don't enforce it, 'this->' is required
312 // by the C++ standard [14.6.4] here, as the base class type is
313 // dependent on the template argument (and thus shouldn't be
314 // looked into when resolving InvokeWith).
315 return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7, a8, a9,
316 a10));
shiqiane35fdd92008-12-10 05:08:54 +0000317 }
318};
319
320} // namespace internal
321
322// The style guide prohibits "using" statements in a namespace scope
323// inside a header file. However, the FunctionMocker class template
324// is meant to be defined in the ::testing namespace. The following
325// line is just a trick for working around a bug in MSVC 8.0, which
326// cannot handle it if we define FunctionMocker in ::testing.
327using internal::FunctionMocker;
328
zhanyong.wan20d1a232013-03-01 06:58:38 +0000329// GMOCK_RESULT_(tn, F) expands to the result type of function type F.
330// We define this as a variadic macro in case F contains unprotected
331// commas (the same reason that we use variadic macros in other places
332// in this file).
shiqiane35fdd92008-12-10 05:08:54 +0000333// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
zhanyong.wan20d1a232013-03-01 06:58:38 +0000334#define GMOCK_RESULT_(tn, ...) \
335 tn ::testing::internal::Function<__VA_ARGS__>::Result
shiqiane35fdd92008-12-10 05:08:54 +0000336
zhanyong.wan20d1a232013-03-01 06:58:38 +0000337// The type of argument N of the given function type.
shiqiane35fdd92008-12-10 05:08:54 +0000338// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
zhanyong.wan20d1a232013-03-01 06:58:38 +0000339#define GMOCK_ARG_(tn, N, ...) \
340 tn ::testing::internal::Function<__VA_ARGS__>::Argument##N
shiqiane35fdd92008-12-10 05:08:54 +0000341
zhanyong.wan20d1a232013-03-01 06:58:38 +0000342// The matcher type for argument N of the given function type.
shiqiane35fdd92008-12-10 05:08:54 +0000343// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
zhanyong.wan20d1a232013-03-01 06:58:38 +0000344#define GMOCK_MATCHER_(tn, N, ...) \
345 const ::testing::Matcher<GMOCK_ARG_(tn, N, __VA_ARGS__)>&
shiqiane35fdd92008-12-10 05:08:54 +0000346
347// The variable for mocking the given method.
348// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
zhanyong.wan68be1112009-03-25 03:56:48 +0000349#define GMOCK_MOCKER_(arity, constness, Method) \
zhanyong.wanccedc1c2010-08-09 22:46:12 +0000350 GTEST_CONCAT_TOKEN_(gmock##constness##arity##_##Method##_, __LINE__)
shiqiane35fdd92008-12-10 05:08:54 +0000351
352// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
zhanyong.wan20d1a232013-03-01 06:58:38 +0000353#define GMOCK_METHOD0_(tn, constness, ct, Method, ...) \
354 GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
355 ) constness { \
356 GTEST_COMPILE_ASSERT_((::std::tr1::tuple_size< \
357 tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \
358 == 0), \
shiqiane35fdd92008-12-10 05:08:54 +0000359 this_method_does_not_take_0_arguments); \
zhanyong.wan68be1112009-03-25 03:56:48 +0000360 GMOCK_MOCKER_(0, constness, Method).SetOwnerAndName(this, #Method); \
361 return GMOCK_MOCKER_(0, constness, Method).Invoke(); \
shiqiane35fdd92008-12-10 05:08:54 +0000362 } \
zhanyong.wan20d1a232013-03-01 06:58:38 +0000363 ::testing::MockSpec<__VA_ARGS__>& \
shiqiane35fdd92008-12-10 05:08:54 +0000364 gmock_##Method() constness { \
zhanyong.waned6c9272011-02-23 19:39:27 +0000365 GMOCK_MOCKER_(0, constness, Method).RegisterOwner(this); \
366 return GMOCK_MOCKER_(0, constness, Method).With(); \
shiqiane35fdd92008-12-10 05:08:54 +0000367 } \
zhanyong.wan20d1a232013-03-01 06:58:38 +0000368 mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(0, constness, \
369 Method)
shiqiane35fdd92008-12-10 05:08:54 +0000370
371// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
zhanyong.wan20d1a232013-03-01 06:58:38 +0000372#define GMOCK_METHOD1_(tn, constness, ct, Method, ...) \
373 GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
374 GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1) constness { \
375 GTEST_COMPILE_ASSERT_((::std::tr1::tuple_size< \
376 tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \
377 == 1), \
shiqiane35fdd92008-12-10 05:08:54 +0000378 this_method_does_not_take_1_argument); \
zhanyong.wan68be1112009-03-25 03:56:48 +0000379 GMOCK_MOCKER_(1, constness, Method).SetOwnerAndName(this, #Method); \
380 return GMOCK_MOCKER_(1, constness, Method).Invoke(gmock_a1); \
shiqiane35fdd92008-12-10 05:08:54 +0000381 } \
zhanyong.wan20d1a232013-03-01 06:58:38 +0000382 ::testing::MockSpec<__VA_ARGS__>& \
383 gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1) constness { \
zhanyong.waned6c9272011-02-23 19:39:27 +0000384 GMOCK_MOCKER_(1, constness, Method).RegisterOwner(this); \
385 return GMOCK_MOCKER_(1, constness, Method).With(gmock_a1); \
shiqiane35fdd92008-12-10 05:08:54 +0000386 } \
zhanyong.wan20d1a232013-03-01 06:58:38 +0000387 mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(1, constness, \
388 Method)
shiqiane35fdd92008-12-10 05:08:54 +0000389
390// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
zhanyong.wan20d1a232013-03-01 06:58:38 +0000391#define GMOCK_METHOD2_(tn, constness, ct, Method, ...) \
392 GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
393 GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
394 GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2) constness { \
395 GTEST_COMPILE_ASSERT_((::std::tr1::tuple_size< \
396 tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \
397 == 2), \
shiqiane35fdd92008-12-10 05:08:54 +0000398 this_method_does_not_take_2_arguments); \
zhanyong.wan68be1112009-03-25 03:56:48 +0000399 GMOCK_MOCKER_(2, constness, Method).SetOwnerAndName(this, #Method); \
400 return GMOCK_MOCKER_(2, constness, Method).Invoke(gmock_a1, gmock_a2); \
shiqiane35fdd92008-12-10 05:08:54 +0000401 } \
zhanyong.wan20d1a232013-03-01 06:58:38 +0000402 ::testing::MockSpec<__VA_ARGS__>& \
403 gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
404 GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2) constness { \
zhanyong.waned6c9272011-02-23 19:39:27 +0000405 GMOCK_MOCKER_(2, constness, Method).RegisterOwner(this); \
406 return GMOCK_MOCKER_(2, constness, Method).With(gmock_a1, gmock_a2); \
shiqiane35fdd92008-12-10 05:08:54 +0000407 } \
zhanyong.wan20d1a232013-03-01 06:58:38 +0000408 mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(2, constness, \
409 Method)
shiqiane35fdd92008-12-10 05:08:54 +0000410
411// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
zhanyong.wan20d1a232013-03-01 06:58:38 +0000412#define GMOCK_METHOD3_(tn, constness, ct, Method, ...) \
413 GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
414 GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
415 GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2, \
416 GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3) constness { \
417 GTEST_COMPILE_ASSERT_((::std::tr1::tuple_size< \
418 tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \
419 == 3), \
shiqiane35fdd92008-12-10 05:08:54 +0000420 this_method_does_not_take_3_arguments); \
zhanyong.wan68be1112009-03-25 03:56:48 +0000421 GMOCK_MOCKER_(3, constness, Method).SetOwnerAndName(this, #Method); \
422 return GMOCK_MOCKER_(3, constness, Method).Invoke(gmock_a1, gmock_a2, \
423 gmock_a3); \
shiqiane35fdd92008-12-10 05:08:54 +0000424 } \
zhanyong.wan20d1a232013-03-01 06:58:38 +0000425 ::testing::MockSpec<__VA_ARGS__>& \
426 gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
427 GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
428 GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3) constness { \
zhanyong.waned6c9272011-02-23 19:39:27 +0000429 GMOCK_MOCKER_(3, constness, Method).RegisterOwner(this); \
430 return GMOCK_MOCKER_(3, constness, Method).With(gmock_a1, gmock_a2, \
431 gmock_a3); \
shiqiane35fdd92008-12-10 05:08:54 +0000432 } \
zhanyong.wan20d1a232013-03-01 06:58:38 +0000433 mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(3, constness, \
434 Method)
shiqiane35fdd92008-12-10 05:08:54 +0000435
436// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
zhanyong.wan20d1a232013-03-01 06:58:38 +0000437#define GMOCK_METHOD4_(tn, constness, ct, Method, ...) \
438 GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
439 GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
440 GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2, \
441 GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
442 GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4) constness { \
443 GTEST_COMPILE_ASSERT_((::std::tr1::tuple_size< \
444 tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \
445 == 4), \
shiqiane35fdd92008-12-10 05:08:54 +0000446 this_method_does_not_take_4_arguments); \
zhanyong.wan68be1112009-03-25 03:56:48 +0000447 GMOCK_MOCKER_(4, constness, Method).SetOwnerAndName(this, #Method); \
448 return GMOCK_MOCKER_(4, constness, Method).Invoke(gmock_a1, gmock_a2, \
449 gmock_a3, gmock_a4); \
shiqiane35fdd92008-12-10 05:08:54 +0000450 } \
zhanyong.wan20d1a232013-03-01 06:58:38 +0000451 ::testing::MockSpec<__VA_ARGS__>& \
452 gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
453 GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
454 GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \
455 GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4) constness { \
zhanyong.waned6c9272011-02-23 19:39:27 +0000456 GMOCK_MOCKER_(4, constness, Method).RegisterOwner(this); \
457 return GMOCK_MOCKER_(4, constness, Method).With(gmock_a1, gmock_a2, \
458 gmock_a3, gmock_a4); \
shiqiane35fdd92008-12-10 05:08:54 +0000459 } \
zhanyong.wan20d1a232013-03-01 06:58:38 +0000460 mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(4, constness, \
461 Method)
shiqiane35fdd92008-12-10 05:08:54 +0000462
463// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
zhanyong.wan20d1a232013-03-01 06:58:38 +0000464#define GMOCK_METHOD5_(tn, constness, ct, Method, ...) \
465 GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
466 GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
467 GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2, \
468 GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
469 GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, \
470 GMOCK_ARG_(tn, 5, __VA_ARGS__) gmock_a5) constness { \
471 GTEST_COMPILE_ASSERT_((::std::tr1::tuple_size< \
472 tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \
473 == 5), \
shiqiane35fdd92008-12-10 05:08:54 +0000474 this_method_does_not_take_5_arguments); \
zhanyong.wan68be1112009-03-25 03:56:48 +0000475 GMOCK_MOCKER_(5, constness, Method).SetOwnerAndName(this, #Method); \
476 return GMOCK_MOCKER_(5, constness, Method).Invoke(gmock_a1, gmock_a2, \
477 gmock_a3, gmock_a4, gmock_a5); \
shiqiane35fdd92008-12-10 05:08:54 +0000478 } \
zhanyong.wan20d1a232013-03-01 06:58:38 +0000479 ::testing::MockSpec<__VA_ARGS__>& \
480 gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
481 GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
482 GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \
483 GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \
484 GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5) constness { \
zhanyong.waned6c9272011-02-23 19:39:27 +0000485 GMOCK_MOCKER_(5, constness, Method).RegisterOwner(this); \
486 return GMOCK_MOCKER_(5, constness, Method).With(gmock_a1, gmock_a2, \
487 gmock_a3, gmock_a4, gmock_a5); \
shiqiane35fdd92008-12-10 05:08:54 +0000488 } \
zhanyong.wan20d1a232013-03-01 06:58:38 +0000489 mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(5, constness, \
490 Method)
shiqiane35fdd92008-12-10 05:08:54 +0000491
492// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
zhanyong.wan20d1a232013-03-01 06:58:38 +0000493#define GMOCK_METHOD6_(tn, constness, ct, Method, ...) \
494 GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
495 GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
496 GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2, \
497 GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
498 GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, \
499 GMOCK_ARG_(tn, 5, __VA_ARGS__) gmock_a5, \
500 GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6) constness { \
501 GTEST_COMPILE_ASSERT_((::std::tr1::tuple_size< \
502 tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \
503 == 6), \
shiqiane35fdd92008-12-10 05:08:54 +0000504 this_method_does_not_take_6_arguments); \
zhanyong.wan68be1112009-03-25 03:56:48 +0000505 GMOCK_MOCKER_(6, constness, Method).SetOwnerAndName(this, #Method); \
506 return GMOCK_MOCKER_(6, constness, Method).Invoke(gmock_a1, gmock_a2, \
507 gmock_a3, gmock_a4, gmock_a5, gmock_a6); \
shiqiane35fdd92008-12-10 05:08:54 +0000508 } \
zhanyong.wan20d1a232013-03-01 06:58:38 +0000509 ::testing::MockSpec<__VA_ARGS__>& \
510 gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
511 GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
512 GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \
513 GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \
514 GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \
515 GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6) constness { \
zhanyong.waned6c9272011-02-23 19:39:27 +0000516 GMOCK_MOCKER_(6, constness, Method).RegisterOwner(this); \
517 return GMOCK_MOCKER_(6, constness, Method).With(gmock_a1, gmock_a2, \
518 gmock_a3, gmock_a4, gmock_a5, gmock_a6); \
shiqiane35fdd92008-12-10 05:08:54 +0000519 } \
zhanyong.wan20d1a232013-03-01 06:58:38 +0000520 mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(6, constness, \
521 Method)
shiqiane35fdd92008-12-10 05:08:54 +0000522
523// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
zhanyong.wan20d1a232013-03-01 06:58:38 +0000524#define GMOCK_METHOD7_(tn, constness, ct, Method, ...) \
525 GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
526 GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
527 GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2, \
528 GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
529 GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, \
530 GMOCK_ARG_(tn, 5, __VA_ARGS__) gmock_a5, \
531 GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6, \
532 GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7) constness { \
533 GTEST_COMPILE_ASSERT_((::std::tr1::tuple_size< \
534 tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \
535 == 7), \
shiqiane35fdd92008-12-10 05:08:54 +0000536 this_method_does_not_take_7_arguments); \
zhanyong.wan68be1112009-03-25 03:56:48 +0000537 GMOCK_MOCKER_(7, constness, Method).SetOwnerAndName(this, #Method); \
538 return GMOCK_MOCKER_(7, constness, Method).Invoke(gmock_a1, gmock_a2, \
539 gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7); \
shiqiane35fdd92008-12-10 05:08:54 +0000540 } \
zhanyong.wan20d1a232013-03-01 06:58:38 +0000541 ::testing::MockSpec<__VA_ARGS__>& \
542 gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
543 GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
544 GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \
545 GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \
546 GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \
547 GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6, \
548 GMOCK_MATCHER_(tn, 7, __VA_ARGS__) gmock_a7) constness { \
zhanyong.waned6c9272011-02-23 19:39:27 +0000549 GMOCK_MOCKER_(7, constness, Method).RegisterOwner(this); \
550 return GMOCK_MOCKER_(7, constness, Method).With(gmock_a1, gmock_a2, \
551 gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7); \
shiqiane35fdd92008-12-10 05:08:54 +0000552 } \
zhanyong.wan20d1a232013-03-01 06:58:38 +0000553 mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(7, constness, \
554 Method)
shiqiane35fdd92008-12-10 05:08:54 +0000555
556// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
zhanyong.wan20d1a232013-03-01 06:58:38 +0000557#define GMOCK_METHOD8_(tn, constness, ct, Method, ...) \
558 GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
559 GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
560 GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2, \
561 GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
562 GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, \
563 GMOCK_ARG_(tn, 5, __VA_ARGS__) gmock_a5, \
564 GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6, \
565 GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7, \
566 GMOCK_ARG_(tn, 8, __VA_ARGS__) gmock_a8) constness { \
567 GTEST_COMPILE_ASSERT_((::std::tr1::tuple_size< \
568 tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \
569 == 8), \
shiqiane35fdd92008-12-10 05:08:54 +0000570 this_method_does_not_take_8_arguments); \
zhanyong.wan68be1112009-03-25 03:56:48 +0000571 GMOCK_MOCKER_(8, constness, Method).SetOwnerAndName(this, #Method); \
572 return GMOCK_MOCKER_(8, constness, Method).Invoke(gmock_a1, gmock_a2, \
573 gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8); \
shiqiane35fdd92008-12-10 05:08:54 +0000574 } \
zhanyong.wan20d1a232013-03-01 06:58:38 +0000575 ::testing::MockSpec<__VA_ARGS__>& \
576 gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
577 GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
578 GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \
579 GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \
580 GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \
581 GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6, \
582 GMOCK_MATCHER_(tn, 7, __VA_ARGS__) gmock_a7, \
583 GMOCK_MATCHER_(tn, 8, __VA_ARGS__) gmock_a8) constness { \
zhanyong.waned6c9272011-02-23 19:39:27 +0000584 GMOCK_MOCKER_(8, constness, Method).RegisterOwner(this); \
585 return GMOCK_MOCKER_(8, constness, Method).With(gmock_a1, gmock_a2, \
586 gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8); \
shiqiane35fdd92008-12-10 05:08:54 +0000587 } \
zhanyong.wan20d1a232013-03-01 06:58:38 +0000588 mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(8, constness, \
589 Method)
shiqiane35fdd92008-12-10 05:08:54 +0000590
591// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
zhanyong.wan20d1a232013-03-01 06:58:38 +0000592#define GMOCK_METHOD9_(tn, constness, ct, Method, ...) \
593 GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
594 GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
595 GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2, \
596 GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
597 GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, \
598 GMOCK_ARG_(tn, 5, __VA_ARGS__) gmock_a5, \
599 GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6, \
600 GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7, \
601 GMOCK_ARG_(tn, 8, __VA_ARGS__) gmock_a8, \
602 GMOCK_ARG_(tn, 9, __VA_ARGS__) gmock_a9) constness { \
603 GTEST_COMPILE_ASSERT_((::std::tr1::tuple_size< \
604 tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \
605 == 9), \
shiqiane35fdd92008-12-10 05:08:54 +0000606 this_method_does_not_take_9_arguments); \
zhanyong.wan68be1112009-03-25 03:56:48 +0000607 GMOCK_MOCKER_(9, constness, Method).SetOwnerAndName(this, #Method); \
608 return GMOCK_MOCKER_(9, constness, Method).Invoke(gmock_a1, gmock_a2, \
609 gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, \
610 gmock_a9); \
shiqiane35fdd92008-12-10 05:08:54 +0000611 } \
zhanyong.wan20d1a232013-03-01 06:58:38 +0000612 ::testing::MockSpec<__VA_ARGS__>& \
613 gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
614 GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
615 GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \
616 GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \
617 GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \
618 GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6, \
619 GMOCK_MATCHER_(tn, 7, __VA_ARGS__) gmock_a7, \
620 GMOCK_MATCHER_(tn, 8, __VA_ARGS__) gmock_a8, \
621 GMOCK_MATCHER_(tn, 9, __VA_ARGS__) gmock_a9) constness { \
zhanyong.waned6c9272011-02-23 19:39:27 +0000622 GMOCK_MOCKER_(9, constness, Method).RegisterOwner(this); \
623 return GMOCK_MOCKER_(9, constness, Method).With(gmock_a1, gmock_a2, \
624 gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, \
625 gmock_a9); \
shiqiane35fdd92008-12-10 05:08:54 +0000626 } \
zhanyong.wan20d1a232013-03-01 06:58:38 +0000627 mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(9, constness, \
628 Method)
shiqiane35fdd92008-12-10 05:08:54 +0000629
630// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
zhanyong.wan20d1a232013-03-01 06:58:38 +0000631#define GMOCK_METHOD10_(tn, constness, ct, Method, ...) \
632 GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
633 GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
634 GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2, \
635 GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
636 GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, \
637 GMOCK_ARG_(tn, 5, __VA_ARGS__) gmock_a5, \
638 GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6, \
639 GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7, \
640 GMOCK_ARG_(tn, 8, __VA_ARGS__) gmock_a8, \
641 GMOCK_ARG_(tn, 9, __VA_ARGS__) gmock_a9, \
642 GMOCK_ARG_(tn, 10, __VA_ARGS__) gmock_a10) constness { \
643 GTEST_COMPILE_ASSERT_((::std::tr1::tuple_size< \
644 tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \
645 == 10), \
shiqiane35fdd92008-12-10 05:08:54 +0000646 this_method_does_not_take_10_arguments); \
zhanyong.wan68be1112009-03-25 03:56:48 +0000647 GMOCK_MOCKER_(10, constness, Method).SetOwnerAndName(this, #Method); \
648 return GMOCK_MOCKER_(10, constness, Method).Invoke(gmock_a1, gmock_a2, \
649 gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, gmock_a9, \
shiqiane35fdd92008-12-10 05:08:54 +0000650 gmock_a10); \
651 } \
zhanyong.wan20d1a232013-03-01 06:58:38 +0000652 ::testing::MockSpec<__VA_ARGS__>& \
653 gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
654 GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
655 GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \
656 GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \
657 GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \
658 GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6, \
659 GMOCK_MATCHER_(tn, 7, __VA_ARGS__) gmock_a7, \
660 GMOCK_MATCHER_(tn, 8, __VA_ARGS__) gmock_a8, \
661 GMOCK_MATCHER_(tn, 9, __VA_ARGS__) gmock_a9, \
662 GMOCK_MATCHER_(tn, 10, \
663 __VA_ARGS__) gmock_a10) constness { \
zhanyong.waned6c9272011-02-23 19:39:27 +0000664 GMOCK_MOCKER_(10, constness, Method).RegisterOwner(this); \
665 return GMOCK_MOCKER_(10, constness, Method).With(gmock_a1, gmock_a2, \
666 gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, gmock_a9, \
shiqiane35fdd92008-12-10 05:08:54 +0000667 gmock_a10); \
668 } \
zhanyong.wan20d1a232013-03-01 06:58:38 +0000669 mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(10, constness, \
670 Method)
shiqiane35fdd92008-12-10 05:08:54 +0000671
zhanyong.wan20d1a232013-03-01 06:58:38 +0000672#define MOCK_METHOD0(m, ...) GMOCK_METHOD0_(, , , m, __VA_ARGS__)
673#define MOCK_METHOD1(m, ...) GMOCK_METHOD1_(, , , m, __VA_ARGS__)
674#define MOCK_METHOD2(m, ...) GMOCK_METHOD2_(, , , m, __VA_ARGS__)
675#define MOCK_METHOD3(m, ...) GMOCK_METHOD3_(, , , m, __VA_ARGS__)
676#define MOCK_METHOD4(m, ...) GMOCK_METHOD4_(, , , m, __VA_ARGS__)
677#define MOCK_METHOD5(m, ...) GMOCK_METHOD5_(, , , m, __VA_ARGS__)
678#define MOCK_METHOD6(m, ...) GMOCK_METHOD6_(, , , m, __VA_ARGS__)
679#define MOCK_METHOD7(m, ...) GMOCK_METHOD7_(, , , m, __VA_ARGS__)
680#define MOCK_METHOD8(m, ...) GMOCK_METHOD8_(, , , m, __VA_ARGS__)
681#define MOCK_METHOD9(m, ...) GMOCK_METHOD9_(, , , m, __VA_ARGS__)
682#define MOCK_METHOD10(m, ...) GMOCK_METHOD10_(, , , m, __VA_ARGS__)
shiqiane35fdd92008-12-10 05:08:54 +0000683
zhanyong.wan20d1a232013-03-01 06:58:38 +0000684#define MOCK_CONST_METHOD0(m, ...) GMOCK_METHOD0_(, const, , m, __VA_ARGS__)
685#define MOCK_CONST_METHOD1(m, ...) GMOCK_METHOD1_(, const, , m, __VA_ARGS__)
686#define MOCK_CONST_METHOD2(m, ...) GMOCK_METHOD2_(, const, , m, __VA_ARGS__)
687#define MOCK_CONST_METHOD3(m, ...) GMOCK_METHOD3_(, const, , m, __VA_ARGS__)
688#define MOCK_CONST_METHOD4(m, ...) GMOCK_METHOD4_(, const, , m, __VA_ARGS__)
689#define MOCK_CONST_METHOD5(m, ...) GMOCK_METHOD5_(, const, , m, __VA_ARGS__)
690#define MOCK_CONST_METHOD6(m, ...) GMOCK_METHOD6_(, const, , m, __VA_ARGS__)
691#define MOCK_CONST_METHOD7(m, ...) GMOCK_METHOD7_(, const, , m, __VA_ARGS__)
692#define MOCK_CONST_METHOD8(m, ...) GMOCK_METHOD8_(, const, , m, __VA_ARGS__)
693#define MOCK_CONST_METHOD9(m, ...) GMOCK_METHOD9_(, const, , m, __VA_ARGS__)
694#define MOCK_CONST_METHOD10(m, ...) GMOCK_METHOD10_(, const, , m, __VA_ARGS__)
shiqiane35fdd92008-12-10 05:08:54 +0000695
zhanyong.wan20d1a232013-03-01 06:58:38 +0000696#define MOCK_METHOD0_T(m, ...) GMOCK_METHOD0_(typename, , , m, __VA_ARGS__)
697#define MOCK_METHOD1_T(m, ...) GMOCK_METHOD1_(typename, , , m, __VA_ARGS__)
698#define MOCK_METHOD2_T(m, ...) GMOCK_METHOD2_(typename, , , m, __VA_ARGS__)
699#define MOCK_METHOD3_T(m, ...) GMOCK_METHOD3_(typename, , , m, __VA_ARGS__)
700#define MOCK_METHOD4_T(m, ...) GMOCK_METHOD4_(typename, , , m, __VA_ARGS__)
701#define MOCK_METHOD5_T(m, ...) GMOCK_METHOD5_(typename, , , m, __VA_ARGS__)
702#define MOCK_METHOD6_T(m, ...) GMOCK_METHOD6_(typename, , , m, __VA_ARGS__)
703#define MOCK_METHOD7_T(m, ...) GMOCK_METHOD7_(typename, , , m, __VA_ARGS__)
704#define MOCK_METHOD8_T(m, ...) GMOCK_METHOD8_(typename, , , m, __VA_ARGS__)
705#define MOCK_METHOD9_T(m, ...) GMOCK_METHOD9_(typename, , , m, __VA_ARGS__)
706#define MOCK_METHOD10_T(m, ...) GMOCK_METHOD10_(typename, , , m, __VA_ARGS__)
shiqiane35fdd92008-12-10 05:08:54 +0000707
zhanyong.wan20d1a232013-03-01 06:58:38 +0000708#define MOCK_CONST_METHOD0_T(m, ...) \
709 GMOCK_METHOD0_(typename, const, , m, __VA_ARGS__)
710#define MOCK_CONST_METHOD1_T(m, ...) \
711 GMOCK_METHOD1_(typename, const, , m, __VA_ARGS__)
712#define MOCK_CONST_METHOD2_T(m, ...) \
713 GMOCK_METHOD2_(typename, const, , m, __VA_ARGS__)
714#define MOCK_CONST_METHOD3_T(m, ...) \
715 GMOCK_METHOD3_(typename, const, , m, __VA_ARGS__)
716#define MOCK_CONST_METHOD4_T(m, ...) \
717 GMOCK_METHOD4_(typename, const, , m, __VA_ARGS__)
718#define MOCK_CONST_METHOD5_T(m, ...) \
719 GMOCK_METHOD5_(typename, const, , m, __VA_ARGS__)
720#define MOCK_CONST_METHOD6_T(m, ...) \
721 GMOCK_METHOD6_(typename, const, , m, __VA_ARGS__)
722#define MOCK_CONST_METHOD7_T(m, ...) \
723 GMOCK_METHOD7_(typename, const, , m, __VA_ARGS__)
724#define MOCK_CONST_METHOD8_T(m, ...) \
725 GMOCK_METHOD8_(typename, const, , m, __VA_ARGS__)
726#define MOCK_CONST_METHOD9_T(m, ...) \
727 GMOCK_METHOD9_(typename, const, , m, __VA_ARGS__)
728#define MOCK_CONST_METHOD10_T(m, ...) \
729 GMOCK_METHOD10_(typename, const, , m, __VA_ARGS__)
shiqiane35fdd92008-12-10 05:08:54 +0000730
zhanyong.wan20d1a232013-03-01 06:58:38 +0000731#define MOCK_METHOD0_WITH_CALLTYPE(ct, m, ...) \
732 GMOCK_METHOD0_(, , ct, m, __VA_ARGS__)
733#define MOCK_METHOD1_WITH_CALLTYPE(ct, m, ...) \
734 GMOCK_METHOD1_(, , ct, m, __VA_ARGS__)
735#define MOCK_METHOD2_WITH_CALLTYPE(ct, m, ...) \
736 GMOCK_METHOD2_(, , ct, m, __VA_ARGS__)
737#define MOCK_METHOD3_WITH_CALLTYPE(ct, m, ...) \
738 GMOCK_METHOD3_(, , ct, m, __VA_ARGS__)
739#define MOCK_METHOD4_WITH_CALLTYPE(ct, m, ...) \
740 GMOCK_METHOD4_(, , ct, m, __VA_ARGS__)
741#define MOCK_METHOD5_WITH_CALLTYPE(ct, m, ...) \
742 GMOCK_METHOD5_(, , ct, m, __VA_ARGS__)
743#define MOCK_METHOD6_WITH_CALLTYPE(ct, m, ...) \
744 GMOCK_METHOD6_(, , ct, m, __VA_ARGS__)
745#define MOCK_METHOD7_WITH_CALLTYPE(ct, m, ...) \
746 GMOCK_METHOD7_(, , ct, m, __VA_ARGS__)
747#define MOCK_METHOD8_WITH_CALLTYPE(ct, m, ...) \
748 GMOCK_METHOD8_(, , ct, m, __VA_ARGS__)
749#define MOCK_METHOD9_WITH_CALLTYPE(ct, m, ...) \
750 GMOCK_METHOD9_(, , ct, m, __VA_ARGS__)
751#define MOCK_METHOD10_WITH_CALLTYPE(ct, m, ...) \
752 GMOCK_METHOD10_(, , ct, m, __VA_ARGS__)
shiqiane35fdd92008-12-10 05:08:54 +0000753
zhanyong.wan20d1a232013-03-01 06:58:38 +0000754#define MOCK_CONST_METHOD0_WITH_CALLTYPE(ct, m, ...) \
755 GMOCK_METHOD0_(, const, ct, m, __VA_ARGS__)
756#define MOCK_CONST_METHOD1_WITH_CALLTYPE(ct, m, ...) \
757 GMOCK_METHOD1_(, const, ct, m, __VA_ARGS__)
758#define MOCK_CONST_METHOD2_WITH_CALLTYPE(ct, m, ...) \
759 GMOCK_METHOD2_(, const, ct, m, __VA_ARGS__)
760#define MOCK_CONST_METHOD3_WITH_CALLTYPE(ct, m, ...) \
761 GMOCK_METHOD3_(, const, ct, m, __VA_ARGS__)
762#define MOCK_CONST_METHOD4_WITH_CALLTYPE(ct, m, ...) \
763 GMOCK_METHOD4_(, const, ct, m, __VA_ARGS__)
764#define MOCK_CONST_METHOD5_WITH_CALLTYPE(ct, m, ...) \
765 GMOCK_METHOD5_(, const, ct, m, __VA_ARGS__)
766#define MOCK_CONST_METHOD6_WITH_CALLTYPE(ct, m, ...) \
767 GMOCK_METHOD6_(, const, ct, m, __VA_ARGS__)
768#define MOCK_CONST_METHOD7_WITH_CALLTYPE(ct, m, ...) \
769 GMOCK_METHOD7_(, const, ct, m, __VA_ARGS__)
770#define MOCK_CONST_METHOD8_WITH_CALLTYPE(ct, m, ...) \
771 GMOCK_METHOD8_(, const, ct, m, __VA_ARGS__)
772#define MOCK_CONST_METHOD9_WITH_CALLTYPE(ct, m, ...) \
773 GMOCK_METHOD9_(, const, ct, m, __VA_ARGS__)
774#define MOCK_CONST_METHOD10_WITH_CALLTYPE(ct, m, ...) \
775 GMOCK_METHOD10_(, const, ct, m, __VA_ARGS__)
shiqiane35fdd92008-12-10 05:08:54 +0000776
zhanyong.wan20d1a232013-03-01 06:58:38 +0000777#define MOCK_METHOD0_T_WITH_CALLTYPE(ct, m, ...) \
778 GMOCK_METHOD0_(typename, , ct, m, __VA_ARGS__)
779#define MOCK_METHOD1_T_WITH_CALLTYPE(ct, m, ...) \
780 GMOCK_METHOD1_(typename, , ct, m, __VA_ARGS__)
781#define MOCK_METHOD2_T_WITH_CALLTYPE(ct, m, ...) \
782 GMOCK_METHOD2_(typename, , ct, m, __VA_ARGS__)
783#define MOCK_METHOD3_T_WITH_CALLTYPE(ct, m, ...) \
784 GMOCK_METHOD3_(typename, , ct, m, __VA_ARGS__)
785#define MOCK_METHOD4_T_WITH_CALLTYPE(ct, m, ...) \
786 GMOCK_METHOD4_(typename, , ct, m, __VA_ARGS__)
787#define MOCK_METHOD5_T_WITH_CALLTYPE(ct, m, ...) \
788 GMOCK_METHOD5_(typename, , ct, m, __VA_ARGS__)
789#define MOCK_METHOD6_T_WITH_CALLTYPE(ct, m, ...) \
790 GMOCK_METHOD6_(typename, , ct, m, __VA_ARGS__)
791#define MOCK_METHOD7_T_WITH_CALLTYPE(ct, m, ...) \
792 GMOCK_METHOD7_(typename, , ct, m, __VA_ARGS__)
793#define MOCK_METHOD8_T_WITH_CALLTYPE(ct, m, ...) \
794 GMOCK_METHOD8_(typename, , ct, m, __VA_ARGS__)
795#define MOCK_METHOD9_T_WITH_CALLTYPE(ct, m, ...) \
796 GMOCK_METHOD9_(typename, , ct, m, __VA_ARGS__)
797#define MOCK_METHOD10_T_WITH_CALLTYPE(ct, m, ...) \
798 GMOCK_METHOD10_(typename, , ct, m, __VA_ARGS__)
shiqiane35fdd92008-12-10 05:08:54 +0000799
zhanyong.wan20d1a232013-03-01 06:58:38 +0000800#define MOCK_CONST_METHOD0_T_WITH_CALLTYPE(ct, m, ...) \
801 GMOCK_METHOD0_(typename, const, ct, m, __VA_ARGS__)
802#define MOCK_CONST_METHOD1_T_WITH_CALLTYPE(ct, m, ...) \
803 GMOCK_METHOD1_(typename, const, ct, m, __VA_ARGS__)
804#define MOCK_CONST_METHOD2_T_WITH_CALLTYPE(ct, m, ...) \
805 GMOCK_METHOD2_(typename, const, ct, m, __VA_ARGS__)
806#define MOCK_CONST_METHOD3_T_WITH_CALLTYPE(ct, m, ...) \
807 GMOCK_METHOD3_(typename, const, ct, m, __VA_ARGS__)
808#define MOCK_CONST_METHOD4_T_WITH_CALLTYPE(ct, m, ...) \
809 GMOCK_METHOD4_(typename, const, ct, m, __VA_ARGS__)
810#define MOCK_CONST_METHOD5_T_WITH_CALLTYPE(ct, m, ...) \
811 GMOCK_METHOD5_(typename, const, ct, m, __VA_ARGS__)
812#define MOCK_CONST_METHOD6_T_WITH_CALLTYPE(ct, m, ...) \
813 GMOCK_METHOD6_(typename, const, ct, m, __VA_ARGS__)
814#define MOCK_CONST_METHOD7_T_WITH_CALLTYPE(ct, m, ...) \
815 GMOCK_METHOD7_(typename, const, ct, m, __VA_ARGS__)
816#define MOCK_CONST_METHOD8_T_WITH_CALLTYPE(ct, m, ...) \
817 GMOCK_METHOD8_(typename, const, ct, m, __VA_ARGS__)
818#define MOCK_CONST_METHOD9_T_WITH_CALLTYPE(ct, m, ...) \
819 GMOCK_METHOD9_(typename, const, ct, m, __VA_ARGS__)
820#define MOCK_CONST_METHOD10_T_WITH_CALLTYPE(ct, m, ...) \
821 GMOCK_METHOD10_(typename, const, ct, m, __VA_ARGS__)
shiqiane35fdd92008-12-10 05:08:54 +0000822
zhanyong.wanf3aa4d22009-09-25 22:34:47 +0000823// A MockFunction<F> class has one mock method whose type is F. It is
824// useful when you just want your test code to emit some messages and
825// have Google Mock verify the right messages are sent (and perhaps at
826// the right times). For example, if you are exercising code:
827//
828// Foo(1);
829// Foo(2);
830// Foo(3);
831//
832// and want to verify that Foo(1) and Foo(3) both invoke
833// mock.Bar("a"), but Foo(2) doesn't invoke anything, you can write:
834//
835// TEST(FooTest, InvokesBarCorrectly) {
836// MyMock mock;
837// MockFunction<void(string check_point_name)> check;
838// {
839// InSequence s;
840//
841// EXPECT_CALL(mock, Bar("a"));
842// EXPECT_CALL(check, Call("1"));
843// EXPECT_CALL(check, Call("2"));
844// EXPECT_CALL(mock, Bar("a"));
845// }
846// Foo(1);
847// check.Call("1");
848// Foo(2);
849// check.Call("2");
850// Foo(3);
851// }
852//
853// The expectation spec says that the first Bar("a") must happen
854// before check point "1", the second Bar("a") must happen after check
855// point "2", and nothing should happen between the two check
856// points. The explicit check points make it easy to tell which
857// Bar("a") is called by which call to Foo().
858template <typename F>
859class MockFunction;
860
861template <typename R>
862class MockFunction<R()> {
863 public:
zhanyong.wan32de5f52009-12-23 00:13:23 +0000864 MockFunction() {}
865
zhanyong.wanf3aa4d22009-09-25 22:34:47 +0000866 MOCK_METHOD0_T(Call, R());
zhanyong.wan32de5f52009-12-23 00:13:23 +0000867
868 private:
869 GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
zhanyong.wanf3aa4d22009-09-25 22:34:47 +0000870};
871
872template <typename R, typename A0>
873class MockFunction<R(A0)> {
874 public:
zhanyong.wan32de5f52009-12-23 00:13:23 +0000875 MockFunction() {}
876
zhanyong.wanf3aa4d22009-09-25 22:34:47 +0000877 MOCK_METHOD1_T(Call, R(A0));
zhanyong.wan32de5f52009-12-23 00:13:23 +0000878
879 private:
880 GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
zhanyong.wanf3aa4d22009-09-25 22:34:47 +0000881};
882
883template <typename R, typename A0, typename A1>
884class MockFunction<R(A0, A1)> {
885 public:
zhanyong.wan32de5f52009-12-23 00:13:23 +0000886 MockFunction() {}
887
zhanyong.wanf3aa4d22009-09-25 22:34:47 +0000888 MOCK_METHOD2_T(Call, R(A0, A1));
zhanyong.wan32de5f52009-12-23 00:13:23 +0000889
890 private:
891 GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
zhanyong.wanf3aa4d22009-09-25 22:34:47 +0000892};
893
894template <typename R, typename A0, typename A1, typename A2>
895class MockFunction<R(A0, A1, A2)> {
896 public:
zhanyong.wan32de5f52009-12-23 00:13:23 +0000897 MockFunction() {}
898
zhanyong.wanf3aa4d22009-09-25 22:34:47 +0000899 MOCK_METHOD3_T(Call, R(A0, A1, A2));
zhanyong.wan32de5f52009-12-23 00:13:23 +0000900
901 private:
902 GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
zhanyong.wanf3aa4d22009-09-25 22:34:47 +0000903};
904
905template <typename R, typename A0, typename A1, typename A2, typename A3>
906class MockFunction<R(A0, A1, A2, A3)> {
907 public:
zhanyong.wan32de5f52009-12-23 00:13:23 +0000908 MockFunction() {}
909
zhanyong.wanf3aa4d22009-09-25 22:34:47 +0000910 MOCK_METHOD4_T(Call, R(A0, A1, A2, A3));
zhanyong.wan32de5f52009-12-23 00:13:23 +0000911
912 private:
913 GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
zhanyong.wanf3aa4d22009-09-25 22:34:47 +0000914};
915
916template <typename R, typename A0, typename A1, typename A2, typename A3,
917 typename A4>
918class MockFunction<R(A0, A1, A2, A3, A4)> {
919 public:
zhanyong.wan32de5f52009-12-23 00:13:23 +0000920 MockFunction() {}
921
zhanyong.wanf3aa4d22009-09-25 22:34:47 +0000922 MOCK_METHOD5_T(Call, R(A0, A1, A2, A3, A4));
zhanyong.wan32de5f52009-12-23 00:13:23 +0000923
924 private:
925 GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
zhanyong.wanf3aa4d22009-09-25 22:34:47 +0000926};
927
928template <typename R, typename A0, typename A1, typename A2, typename A3,
929 typename A4, typename A5>
930class MockFunction<R(A0, A1, A2, A3, A4, A5)> {
931 public:
zhanyong.wan32de5f52009-12-23 00:13:23 +0000932 MockFunction() {}
933
zhanyong.wanf3aa4d22009-09-25 22:34:47 +0000934 MOCK_METHOD6_T(Call, R(A0, A1, A2, A3, A4, A5));
zhanyong.wan32de5f52009-12-23 00:13:23 +0000935
936 private:
937 GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
zhanyong.wanf3aa4d22009-09-25 22:34:47 +0000938};
939
940template <typename R, typename A0, typename A1, typename A2, typename A3,
941 typename A4, typename A5, typename A6>
942class MockFunction<R(A0, A1, A2, A3, A4, A5, A6)> {
943 public:
zhanyong.wan32de5f52009-12-23 00:13:23 +0000944 MockFunction() {}
945
zhanyong.wanf3aa4d22009-09-25 22:34:47 +0000946 MOCK_METHOD7_T(Call, R(A0, A1, A2, A3, A4, A5, A6));
zhanyong.wan32de5f52009-12-23 00:13:23 +0000947
948 private:
949 GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
zhanyong.wanf3aa4d22009-09-25 22:34:47 +0000950};
951
952template <typename R, typename A0, typename A1, typename A2, typename A3,
953 typename A4, typename A5, typename A6, typename A7>
954class MockFunction<R(A0, A1, A2, A3, A4, A5, A6, A7)> {
955 public:
zhanyong.wan32de5f52009-12-23 00:13:23 +0000956 MockFunction() {}
957
zhanyong.wanf3aa4d22009-09-25 22:34:47 +0000958 MOCK_METHOD8_T(Call, R(A0, A1, A2, A3, A4, A5, A6, A7));
zhanyong.wan32de5f52009-12-23 00:13:23 +0000959
960 private:
961 GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
zhanyong.wanf3aa4d22009-09-25 22:34:47 +0000962};
963
964template <typename R, typename A0, typename A1, typename A2, typename A3,
965 typename A4, typename A5, typename A6, typename A7, typename A8>
966class MockFunction<R(A0, A1, A2, A3, A4, A5, A6, A7, A8)> {
967 public:
zhanyong.wan32de5f52009-12-23 00:13:23 +0000968 MockFunction() {}
969
zhanyong.wanf3aa4d22009-09-25 22:34:47 +0000970 MOCK_METHOD9_T(Call, R(A0, A1, A2, A3, A4, A5, A6, A7, A8));
zhanyong.wan32de5f52009-12-23 00:13:23 +0000971
972 private:
973 GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
zhanyong.wanf3aa4d22009-09-25 22:34:47 +0000974};
975
976template <typename R, typename A0, typename A1, typename A2, typename A3,
977 typename A4, typename A5, typename A6, typename A7, typename A8,
978 typename A9>
979class MockFunction<R(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9)> {
980 public:
zhanyong.wan32de5f52009-12-23 00:13:23 +0000981 MockFunction() {}
982
zhanyong.wanf3aa4d22009-09-25 22:34:47 +0000983 MOCK_METHOD10_T(Call, R(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9));
zhanyong.wan32de5f52009-12-23 00:13:23 +0000984
985 private:
986 GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
zhanyong.wanf3aa4d22009-09-25 22:34:47 +0000987};
988
shiqiane35fdd92008-12-10 05:08:54 +0000989} // namespace testing
990
991#endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_