1 | // This file was GENERATED by command: |
2 | // pump.py gmock-generated-function-mockers.h.pump |
3 | // DO NOT EDIT BY HAND!!! |
4 | |
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 | |
35 | // Google Mock - a framework for writing C++ mock classes. |
36 | // |
37 | // This file implements function mockers of various arities. |
38 | |
39 | // GOOGLETEST_CM0002 DO NOT DELETE |
40 | |
41 | #ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_ |
42 | #define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_ |
43 | |
44 | #include <functional> |
45 | #include <utility> |
46 | |
47 | #include "gmock/gmock-spec-builders.h" |
48 | #include "gmock/internal/gmock-internal-utils.h" |
49 | |
50 | namespace testing { |
51 | namespace internal { |
52 | // Removes the given pointer; this is a helper for the expectation setter method |
53 | // for parameterless matchers. |
54 | // |
55 | // We want to make sure that the user cannot set a parameterless expectation on |
56 | // overloaded methods, including methods which are overloaded on const. Example: |
57 | // |
58 | // class MockClass { |
59 | // MOCK_METHOD0(GetName, string&()); |
60 | // MOCK_CONST_METHOD0(GetName, const string&()); |
61 | // }; |
62 | // |
63 | // TEST() { |
64 | // // This should be an error, as it's not clear which overload is expected. |
65 | // EXPECT_CALL(mock, GetName).WillOnce(ReturnRef(value)); |
66 | // } |
67 | // |
68 | // Here are the generated expectation-setter methods: |
69 | // |
70 | // class MockClass { |
71 | // // Overload 1 |
72 | // MockSpec<string&()> gmock_GetName() { ... } |
73 | // // Overload 2. Declared const so that the compiler will generate an |
74 | // // error when trying to resolve between this and overload 4 in |
75 | // // 'gmock_GetName(WithoutMatchers(), nullptr)'. |
76 | // MockSpec<string&()> gmock_GetName( |
77 | // const WithoutMatchers&, const Function<string&()>*) const { |
78 | // // Removes const from this, calls overload 1 |
79 | // return AdjustConstness_(this)->gmock_GetName(); |
80 | // } |
81 | // |
82 | // // Overload 3 |
83 | // const string& gmock_GetName() const { ... } |
84 | // // Overload 4 |
85 | // MockSpec<const string&()> gmock_GetName( |
86 | // const WithoutMatchers&, const Function<const string&()>*) const { |
87 | // // Does not remove const, calls overload 3 |
88 | // return AdjustConstness_const(this)->gmock_GetName(); |
89 | // } |
90 | // } |
91 | // |
92 | template <typename MockType> |
93 | const MockType* AdjustConstness_const(const MockType* mock) { |
94 | return mock; |
95 | } |
96 | |
97 | // Removes const from and returns the given pointer; this is a helper for the |
98 | // expectation setter method for parameterless matchers. |
99 | template <typename MockType> |
100 | MockType* AdjustConstness_(const MockType* mock) { |
101 | return const_cast<MockType*>(mock); |
102 | } |
103 | |
104 | } // namespace internal |
105 | |
106 | // The style guide prohibits "using" statements in a namespace scope |
107 | // inside a header file. However, the FunctionMocker class template |
108 | // is meant to be defined in the ::testing namespace. The following |
109 | // line is just a trick for working around a bug in MSVC 8.0, which |
110 | // cannot handle it if we define FunctionMocker in ::testing. |
111 | using internal::FunctionMocker; |
112 | |
113 | // GMOCK_RESULT_(tn, F) expands to the result type of function type F. |
114 | // We define this as a variadic macro in case F contains unprotected |
115 | // commas (the same reason that we use variadic macros in other places |
116 | // in this file). |
117 | // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! |
118 | #define GMOCK_RESULT_(tn, ...) \ |
119 | tn ::testing::internal::Function<__VA_ARGS__>::Result |
120 | |
121 | // The type of argument N of the given function type. |
122 | // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! |
123 | #define GMOCK_ARG_(tn, N, ...) \ |
124 | tn ::testing::internal::Function<__VA_ARGS__>::template Arg<N-1>::type |
125 | |
126 | // The matcher type for argument N of the given function type. |
127 | // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! |
128 | #define GMOCK_MATCHER_(tn, N, ...) \ |
129 | const ::testing::Matcher<GMOCK_ARG_(tn, N, __VA_ARGS__)>& |
130 | |
131 | // The variable for mocking the given method. |
132 | // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! |
133 | #define GMOCK_MOCKER_(arity, constness, Method) \ |
134 | GTEST_CONCAT_TOKEN_(gmock##constness##arity##_##Method##_, __LINE__) |
135 | |
136 | // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! |
137 | #define GMOCK_METHOD0_(tn, constness, ct, Method, ...) \ |
138 | static_assert(0 == \ |
139 | ::testing::internal::Function<__VA_ARGS__>::ArgumentCount, \ |
140 | "MOCK_METHOD<N> must match argument count.");\ |
141 | GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \ |
142 | ) constness { \ |
143 | GMOCK_MOCKER_(0, constness, Method).SetOwnerAndName(this, #Method); \ |
144 | return GMOCK_MOCKER_(0, constness, Method).Invoke(); \ |
145 | } \ |
146 | ::testing::MockSpec<__VA_ARGS__> \ |
147 | gmock_##Method() constness { \ |
148 | GMOCK_MOCKER_(0, constness, Method).RegisterOwner(this); \ |
149 | return GMOCK_MOCKER_(0, constness, Method).With(); \ |
150 | } \ |
151 | ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \ |
152 | const ::testing::internal::WithoutMatchers&, \ |
153 | constness ::testing::internal::Function<__VA_ARGS__>* ) const { \ |
154 | return ::testing::internal::AdjustConstness_##constness(this)-> \ |
155 | gmock_##Method(); \ |
156 | } \ |
157 | mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(0, constness, \ |
158 | Method) |
159 | |
160 | // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! |
161 | #define GMOCK_METHOD1_(tn, constness, ct, Method, ...) \ |
162 | static_assert(1 == \ |
163 | ::testing::internal::Function<__VA_ARGS__>::ArgumentCount, \ |
164 | "MOCK_METHOD<N> must match argument count.");\ |
165 | GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \ |
166 | GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1) constness { \ |
167 | GMOCK_MOCKER_(1, constness, Method).SetOwnerAndName(this, #Method); \ |
168 | return GMOCK_MOCKER_(1, constness, \ |
169 | Method).Invoke(::std::forward<GMOCK_ARG_(tn, 1, \ |
170 | __VA_ARGS__)>(gmock_a1)); \ |
171 | } \ |
172 | ::testing::MockSpec<__VA_ARGS__> \ |
173 | gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1) constness { \ |
174 | GMOCK_MOCKER_(1, constness, Method).RegisterOwner(this); \ |
175 | return GMOCK_MOCKER_(1, constness, Method).With(gmock_a1); \ |
176 | } \ |
177 | ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \ |
178 | const ::testing::internal::WithoutMatchers&, \ |
179 | constness ::testing::internal::Function<__VA_ARGS__>* ) const { \ |
180 | return ::testing::internal::AdjustConstness_##constness(this)-> \ |
181 | gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>()); \ |
182 | } \ |
183 | mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(1, constness, \ |
184 | Method) |
185 | |
186 | // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! |
187 | #define GMOCK_METHOD2_(tn, constness, ct, Method, ...) \ |
188 | static_assert(2 == \ |
189 | ::testing::internal::Function<__VA_ARGS__>::ArgumentCount, \ |
190 | "MOCK_METHOD<N> must match argument count.");\ |
191 | GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \ |
192 | GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \ |
193 | __VA_ARGS__) gmock_a2) constness { \ |
194 | GMOCK_MOCKER_(2, constness, Method).SetOwnerAndName(this, #Method); \ |
195 | return GMOCK_MOCKER_(2, constness, \ |
196 | Method).Invoke(::std::forward<GMOCK_ARG_(tn, 1, \ |
197 | __VA_ARGS__)>(gmock_a1), \ |
198 | ::std::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(gmock_a2)); \ |
199 | } \ |
200 | ::testing::MockSpec<__VA_ARGS__> \ |
201 | gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \ |
202 | GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2) constness { \ |
203 | GMOCK_MOCKER_(2, constness, Method).RegisterOwner(this); \ |
204 | return GMOCK_MOCKER_(2, constness, Method).With(gmock_a1, gmock_a2); \ |
205 | } \ |
206 | ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \ |
207 | const ::testing::internal::WithoutMatchers&, \ |
208 | constness ::testing::internal::Function<__VA_ARGS__>* ) const { \ |
209 | return ::testing::internal::AdjustConstness_##constness(this)-> \ |
210 | gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \ |
211 | ::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>()); \ |
212 | } \ |
213 | mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(2, constness, \ |
214 | Method) |
215 | |
216 | // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! |
217 | #define GMOCK_METHOD3_(tn, constness, ct, Method, ...) \ |
218 | static_assert(3 == \ |
219 | ::testing::internal::Function<__VA_ARGS__>::ArgumentCount, \ |
220 | "MOCK_METHOD<N> must match argument count.");\ |
221 | GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \ |
222 | GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \ |
223 | __VA_ARGS__) gmock_a2, GMOCK_ARG_(tn, 3, \ |
224 | __VA_ARGS__) gmock_a3) constness { \ |
225 | GMOCK_MOCKER_(3, constness, Method).SetOwnerAndName(this, #Method); \ |
226 | return GMOCK_MOCKER_(3, constness, \ |
227 | Method).Invoke(::std::forward<GMOCK_ARG_(tn, 1, \ |
228 | __VA_ARGS__)>(gmock_a1), \ |
229 | ::std::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(gmock_a2), \ |
230 | ::std::forward<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(gmock_a3)); \ |
231 | } \ |
232 | ::testing::MockSpec<__VA_ARGS__> \ |
233 | gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \ |
234 | GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \ |
235 | GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3) constness { \ |
236 | GMOCK_MOCKER_(3, constness, Method).RegisterOwner(this); \ |
237 | return GMOCK_MOCKER_(3, constness, Method).With(gmock_a1, gmock_a2, \ |
238 | gmock_a3); \ |
239 | } \ |
240 | ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \ |
241 | const ::testing::internal::WithoutMatchers&, \ |
242 | constness ::testing::internal::Function<__VA_ARGS__>* ) const { \ |
243 | return ::testing::internal::AdjustConstness_##constness(this)-> \ |
244 | gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \ |
245 | ::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(), \ |
246 | ::testing::A<GMOCK_ARG_(tn, 3, __VA_ARGS__)>()); \ |
247 | } \ |
248 | mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(3, constness, \ |
249 | Method) |
250 | |
251 | // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! |
252 | #define GMOCK_METHOD4_(tn, constness, ct, Method, ...) \ |
253 | static_assert(4 == \ |
254 | ::testing::internal::Function<__VA_ARGS__>::ArgumentCount, \ |
255 | "MOCK_METHOD<N> must match argument count.");\ |
256 | GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \ |
257 | GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \ |
258 | __VA_ARGS__) gmock_a2, GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \ |
259 | GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4) constness { \ |
260 | GMOCK_MOCKER_(4, constness, Method).SetOwnerAndName(this, #Method); \ |
261 | return GMOCK_MOCKER_(4, constness, \ |
262 | Method).Invoke(::std::forward<GMOCK_ARG_(tn, 1, \ |
263 | __VA_ARGS__)>(gmock_a1), \ |
264 | ::std::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(gmock_a2), \ |
265 | ::std::forward<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(gmock_a3), \ |
266 | ::std::forward<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(gmock_a4)); \ |
267 | } \ |
268 | ::testing::MockSpec<__VA_ARGS__> \ |
269 | gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \ |
270 | GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \ |
271 | GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \ |
272 | GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4) constness { \ |
273 | GMOCK_MOCKER_(4, constness, Method).RegisterOwner(this); \ |
274 | return GMOCK_MOCKER_(4, constness, Method).With(gmock_a1, gmock_a2, \ |
275 | gmock_a3, gmock_a4); \ |
276 | } \ |
277 | ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \ |
278 | const ::testing::internal::WithoutMatchers&, \ |
279 | constness ::testing::internal::Function<__VA_ARGS__>* ) const { \ |
280 | return ::testing::internal::AdjustConstness_##constness(this)-> \ |
281 | gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \ |
282 | ::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(), \ |
283 | ::testing::A<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(), \ |
284 | ::testing::A<GMOCK_ARG_(tn, 4, __VA_ARGS__)>()); \ |
285 | } \ |
286 | mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(4, constness, \ |
287 | Method) |
288 | |
289 | // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! |
290 | #define GMOCK_METHOD5_(tn, constness, ct, Method, ...) \ |
291 | static_assert(5 == \ |
292 | ::testing::internal::Function<__VA_ARGS__>::ArgumentCount, \ |
293 | "MOCK_METHOD<N> must match argument count.");\ |
294 | GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \ |
295 | GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \ |
296 | __VA_ARGS__) gmock_a2, GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \ |
297 | GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, GMOCK_ARG_(tn, 5, \ |
298 | __VA_ARGS__) gmock_a5) constness { \ |
299 | GMOCK_MOCKER_(5, constness, Method).SetOwnerAndName(this, #Method); \ |
300 | return GMOCK_MOCKER_(5, constness, \ |
301 | Method).Invoke(::std::forward<GMOCK_ARG_(tn, 1, \ |
302 | __VA_ARGS__)>(gmock_a1), \ |
303 | ::std::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(gmock_a2), \ |
304 | ::std::forward<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(gmock_a3), \ |
305 | ::std::forward<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(gmock_a4), \ |
306 | ::std::forward<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(gmock_a5)); \ |
307 | } \ |
308 | ::testing::MockSpec<__VA_ARGS__> \ |
309 | gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \ |
310 | GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \ |
311 | GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \ |
312 | GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \ |
313 | GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5) constness { \ |
314 | GMOCK_MOCKER_(5, constness, Method).RegisterOwner(this); \ |
315 | return GMOCK_MOCKER_(5, constness, Method).With(gmock_a1, gmock_a2, \ |
316 | gmock_a3, gmock_a4, gmock_a5); \ |
317 | } \ |
318 | ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \ |
319 | const ::testing::internal::WithoutMatchers&, \ |
320 | constness ::testing::internal::Function<__VA_ARGS__>* ) const { \ |
321 | return ::testing::internal::AdjustConstness_##constness(this)-> \ |
322 | gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \ |
323 | ::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(), \ |
324 | ::testing::A<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(), \ |
325 | ::testing::A<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(), \ |
326 | ::testing::A<GMOCK_ARG_(tn, 5, __VA_ARGS__)>()); \ |
327 | } \ |
328 | mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(5, constness, \ |
329 | Method) |
330 | |
331 | // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! |
332 | #define GMOCK_METHOD6_(tn, constness, ct, Method, ...) \ |
333 | static_assert(6 == \ |
334 | ::testing::internal::Function<__VA_ARGS__>::ArgumentCount, \ |
335 | "MOCK_METHOD<N> must match argument count.");\ |
336 | GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \ |
337 | GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \ |
338 | __VA_ARGS__) gmock_a2, GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \ |
339 | GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, GMOCK_ARG_(tn, 5, \ |
340 | __VA_ARGS__) gmock_a5, GMOCK_ARG_(tn, 6, \ |
341 | __VA_ARGS__) gmock_a6) constness { \ |
342 | GMOCK_MOCKER_(6, constness, Method).SetOwnerAndName(this, #Method); \ |
343 | return GMOCK_MOCKER_(6, constness, \ |
344 | Method).Invoke(::std::forward<GMOCK_ARG_(tn, 1, \ |
345 | __VA_ARGS__)>(gmock_a1), \ |
346 | ::std::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(gmock_a2), \ |
347 | ::std::forward<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(gmock_a3), \ |
348 | ::std::forward<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(gmock_a4), \ |
349 | ::std::forward<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(gmock_a5), \ |
350 | ::std::forward<GMOCK_ARG_(tn, 6, __VA_ARGS__)>(gmock_a6)); \ |
351 | } \ |
352 | ::testing::MockSpec<__VA_ARGS__> \ |
353 | gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \ |
354 | GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \ |
355 | GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \ |
356 | GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \ |
357 | GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \ |
358 | GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6) constness { \ |
359 | GMOCK_MOCKER_(6, constness, Method).RegisterOwner(this); \ |
360 | return GMOCK_MOCKER_(6, constness, Method).With(gmock_a1, gmock_a2, \ |
361 | gmock_a3, gmock_a4, gmock_a5, gmock_a6); \ |
362 | } \ |
363 | ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \ |
364 | const ::testing::internal::WithoutMatchers&, \ |
365 | constness ::testing::internal::Function<__VA_ARGS__>* ) const { \ |
366 | return ::testing::internal::AdjustConstness_##constness(this)-> \ |
367 | gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \ |
368 | ::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(), \ |
369 | ::testing::A<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(), \ |
370 | ::testing::A<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(), \ |
371 | ::testing::A<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(), \ |
372 | ::testing::A<GMOCK_ARG_(tn, 6, __VA_ARGS__)>()); \ |
373 | } \ |
374 | mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(6, constness, \ |
375 | Method) |
376 | |
377 | // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! |
378 | #define GMOCK_METHOD7_(tn, constness, ct, Method, ...) \ |
379 | static_assert(7 == \ |
380 | ::testing::internal::Function<__VA_ARGS__>::ArgumentCount, \ |
381 | "MOCK_METHOD<N> must match argument count.");\ |
382 | GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \ |
383 | GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \ |
384 | __VA_ARGS__) gmock_a2, GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \ |
385 | GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, GMOCK_ARG_(tn, 5, \ |
386 | __VA_ARGS__) gmock_a5, GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6, \ |
387 | GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7) constness { \ |
388 | GMOCK_MOCKER_(7, constness, Method).SetOwnerAndName(this, #Method); \ |
389 | return GMOCK_MOCKER_(7, constness, \ |
390 | Method).Invoke(::std::forward<GMOCK_ARG_(tn, 1, \ |
391 | __VA_ARGS__)>(gmock_a1), \ |
392 | ::std::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(gmock_a2), \ |
393 | ::std::forward<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(gmock_a3), \ |
394 | ::std::forward<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(gmock_a4), \ |
395 | ::std::forward<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(gmock_a5), \ |
396 | ::std::forward<GMOCK_ARG_(tn, 6, __VA_ARGS__)>(gmock_a6), \ |
397 | ::std::forward<GMOCK_ARG_(tn, 7, __VA_ARGS__)>(gmock_a7)); \ |
398 | } \ |
399 | ::testing::MockSpec<__VA_ARGS__> \ |
400 | gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \ |
401 | GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \ |
402 | GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \ |
403 | GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \ |
404 | GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \ |
405 | GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6, \ |
406 | GMOCK_MATCHER_(tn, 7, __VA_ARGS__) gmock_a7) constness { \ |
407 | GMOCK_MOCKER_(7, constness, Method).RegisterOwner(this); \ |
408 | return GMOCK_MOCKER_(7, constness, Method).With(gmock_a1, gmock_a2, \ |
409 | gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7); \ |
410 | } \ |
411 | ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \ |
412 | const ::testing::internal::WithoutMatchers&, \ |
413 | constness ::testing::internal::Function<__VA_ARGS__>* ) const { \ |
414 | return ::testing::internal::AdjustConstness_##constness(this)-> \ |
415 | gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \ |
416 | ::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(), \ |
417 | ::testing::A<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(), \ |
418 | ::testing::A<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(), \ |
419 | ::testing::A<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(), \ |
420 | ::testing::A<GMOCK_ARG_(tn, 6, __VA_ARGS__)>(), \ |
421 | ::testing::A<GMOCK_ARG_(tn, 7, __VA_ARGS__)>()); \ |
422 | } \ |
423 | mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(7, constness, \ |
424 | Method) |
425 | |
426 | // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! |
427 | #define GMOCK_METHOD8_(tn, constness, ct, Method, ...) \ |
428 | static_assert(8 == \ |
429 | ::testing::internal::Function<__VA_ARGS__>::ArgumentCount, \ |
430 | "MOCK_METHOD<N> must match argument count.");\ |
431 | GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \ |
432 | GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \ |
433 | __VA_ARGS__) gmock_a2, GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \ |
434 | GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, GMOCK_ARG_(tn, 5, \ |
435 | __VA_ARGS__) gmock_a5, GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6, \ |
436 | GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7, GMOCK_ARG_(tn, 8, \ |
437 | __VA_ARGS__) gmock_a8) constness { \ |
438 | GMOCK_MOCKER_(8, constness, Method).SetOwnerAndName(this, #Method); \ |
439 | return GMOCK_MOCKER_(8, constness, \ |
440 | Method).Invoke(::std::forward<GMOCK_ARG_(tn, 1, \ |
441 | __VA_ARGS__)>(gmock_a1), \ |
442 | ::std::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(gmock_a2), \ |
443 | ::std::forward<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(gmock_a3), \ |
444 | ::std::forward<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(gmock_a4), \ |
445 | ::std::forward<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(gmock_a5), \ |
446 | ::std::forward<GMOCK_ARG_(tn, 6, __VA_ARGS__)>(gmock_a6), \ |
447 | ::std::forward<GMOCK_ARG_(tn, 7, __VA_ARGS__)>(gmock_a7), \ |
448 | ::std::forward<GMOCK_ARG_(tn, 8, __VA_ARGS__)>(gmock_a8)); \ |
449 | } \ |
450 | ::testing::MockSpec<__VA_ARGS__> \ |
451 | gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \ |
452 | GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \ |
453 | GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \ |
454 | GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \ |
455 | GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \ |
456 | GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6, \ |
457 | GMOCK_MATCHER_(tn, 7, __VA_ARGS__) gmock_a7, \ |
458 | GMOCK_MATCHER_(tn, 8, __VA_ARGS__) gmock_a8) constness { \ |
459 | GMOCK_MOCKER_(8, constness, Method).RegisterOwner(this); \ |
460 | return GMOCK_MOCKER_(8, constness, Method).With(gmock_a1, gmock_a2, \ |
461 | gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8); \ |
462 | } \ |
463 | ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \ |
464 | const ::testing::internal::WithoutMatchers&, \ |
465 | constness ::testing::internal::Function<__VA_ARGS__>* ) const { \ |
466 | return ::testing::internal::AdjustConstness_##constness(this)-> \ |
467 | gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \ |
468 | ::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(), \ |
469 | ::testing::A<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(), \ |
470 | ::testing::A<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(), \ |
471 | ::testing::A<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(), \ |
472 | ::testing::A<GMOCK_ARG_(tn, 6, __VA_ARGS__)>(), \ |
473 | ::testing::A<GMOCK_ARG_(tn, 7, __VA_ARGS__)>(), \ |
474 | ::testing::A<GMOCK_ARG_(tn, 8, __VA_ARGS__)>()); \ |
475 | } \ |
476 | mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(8, constness, \ |
477 | Method) |
478 | |
479 | // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! |
480 | #define GMOCK_METHOD9_(tn, constness, ct, Method, ...) \ |
481 | static_assert(9 == \ |
482 | ::testing::internal::Function<__VA_ARGS__>::ArgumentCount, \ |
483 | "MOCK_METHOD<N> must match argument count.");\ |
484 | GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \ |
485 | GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \ |
486 | __VA_ARGS__) gmock_a2, GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \ |
487 | GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, GMOCK_ARG_(tn, 5, \ |
488 | __VA_ARGS__) gmock_a5, GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6, \ |
489 | GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7, GMOCK_ARG_(tn, 8, \ |
490 | __VA_ARGS__) gmock_a8, GMOCK_ARG_(tn, 9, \ |
491 | __VA_ARGS__) gmock_a9) constness { \ |
492 | GMOCK_MOCKER_(9, constness, Method).SetOwnerAndName(this, #Method); \ |
493 | return GMOCK_MOCKER_(9, constness, \ |
494 | Method).Invoke(::std::forward<GMOCK_ARG_(tn, 1, \ |
495 | __VA_ARGS__)>(gmock_a1), \ |
496 | ::std::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(gmock_a2), \ |
497 | ::std::forward<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(gmock_a3), \ |
498 | ::std::forward<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(gmock_a4), \ |
499 | ::std::forward<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(gmock_a5), \ |
500 | ::std::forward<GMOCK_ARG_(tn, 6, __VA_ARGS__)>(gmock_a6), \ |
501 | ::std::forward<GMOCK_ARG_(tn, 7, __VA_ARGS__)>(gmock_a7), \ |
502 | ::std::forward<GMOCK_ARG_(tn, 8, __VA_ARGS__)>(gmock_a8), \ |
503 | ::std::forward<GMOCK_ARG_(tn, 9, __VA_ARGS__)>(gmock_a9)); \ |
504 | } \ |
505 | ::testing::MockSpec<__VA_ARGS__> \ |
506 | gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \ |
507 | GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \ |
508 | GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \ |
509 | GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \ |
510 | GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \ |
511 | GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6, \ |
512 | GMOCK_MATCHER_(tn, 7, __VA_ARGS__) gmock_a7, \ |
513 | GMOCK_MATCHER_(tn, 8, __VA_ARGS__) gmock_a8, \ |
514 | GMOCK_MATCHER_(tn, 9, __VA_ARGS__) gmock_a9) constness { \ |
515 | GMOCK_MOCKER_(9, constness, Method).RegisterOwner(this); \ |
516 | return GMOCK_MOCKER_(9, constness, Method).With(gmock_a1, gmock_a2, \ |
517 | gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, \ |
518 | gmock_a9); \ |
519 | } \ |
520 | ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \ |
521 | const ::testing::internal::WithoutMatchers&, \ |
522 | constness ::testing::internal::Function<__VA_ARGS__>* ) const { \ |
523 | return ::testing::internal::AdjustConstness_##constness(this)-> \ |
524 | gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \ |
525 | ::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(), \ |
526 | ::testing::A<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(), \ |
527 | ::testing::A<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(), \ |
528 | ::testing::A<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(), \ |
529 | ::testing::A<GMOCK_ARG_(tn, 6, __VA_ARGS__)>(), \ |
530 | ::testing::A<GMOCK_ARG_(tn, 7, __VA_ARGS__)>(), \ |
531 | ::testing::A<GMOCK_ARG_(tn, 8, __VA_ARGS__)>(), \ |
532 | ::testing::A<GMOCK_ARG_(tn, 9, __VA_ARGS__)>()); \ |
533 | } \ |
534 | mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(9, constness, \ |
535 | Method) |
536 | |
537 | // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! |
538 | #define GMOCK_METHOD10_(tn, constness, ct, Method, ...) \ |
539 | static_assert(10 == \ |
540 | ::testing::internal::Function<__VA_ARGS__>::ArgumentCount, \ |
541 | "MOCK_METHOD<N> must match argument count.");\ |
542 | GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \ |
543 | GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \ |
544 | __VA_ARGS__) gmock_a2, GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \ |
545 | GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, GMOCK_ARG_(tn, 5, \ |
546 | __VA_ARGS__) gmock_a5, GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6, \ |
547 | GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7, GMOCK_ARG_(tn, 8, \ |
548 | __VA_ARGS__) gmock_a8, GMOCK_ARG_(tn, 9, __VA_ARGS__) gmock_a9, \ |
549 | GMOCK_ARG_(tn, 10, __VA_ARGS__) gmock_a10) constness { \ |
550 | GMOCK_MOCKER_(10, constness, Method).SetOwnerAndName(this, #Method); \ |
551 | return GMOCK_MOCKER_(10, constness, \ |
552 | Method).Invoke(::std::forward<GMOCK_ARG_(tn, 1, \ |
553 | __VA_ARGS__)>(gmock_a1), \ |
554 | ::std::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(gmock_a2), \ |
555 | ::std::forward<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(gmock_a3), \ |
556 | ::std::forward<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(gmock_a4), \ |
557 | ::std::forward<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(gmock_a5), \ |
558 | ::std::forward<GMOCK_ARG_(tn, 6, __VA_ARGS__)>(gmock_a6), \ |
559 | ::std::forward<GMOCK_ARG_(tn, 7, __VA_ARGS__)>(gmock_a7), \ |
560 | ::std::forward<GMOCK_ARG_(tn, 8, __VA_ARGS__)>(gmock_a8), \ |
561 | ::std::forward<GMOCK_ARG_(tn, 9, __VA_ARGS__)>(gmock_a9), \ |
562 | ::std::forward<GMOCK_ARG_(tn, 10, __VA_ARGS__)>(gmock_a10)); \ |
563 | } \ |
564 | ::testing::MockSpec<__VA_ARGS__> \ |
565 | gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \ |
566 | GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \ |
567 | GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \ |
568 | GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \ |
569 | GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \ |
570 | GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6, \ |
571 | GMOCK_MATCHER_(tn, 7, __VA_ARGS__) gmock_a7, \ |
572 | GMOCK_MATCHER_(tn, 8, __VA_ARGS__) gmock_a8, \ |
573 | GMOCK_MATCHER_(tn, 9, __VA_ARGS__) gmock_a9, \ |
574 | GMOCK_MATCHER_(tn, 10, \ |
575 | __VA_ARGS__) gmock_a10) constness { \ |
576 | GMOCK_MOCKER_(10, constness, Method).RegisterOwner(this); \ |
577 | return GMOCK_MOCKER_(10, constness, Method).With(gmock_a1, gmock_a2, \ |
578 | gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, gmock_a9, \ |
579 | gmock_a10); \ |
580 | } \ |
581 | ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \ |
582 | const ::testing::internal::WithoutMatchers&, \ |
583 | constness ::testing::internal::Function<__VA_ARGS__>* ) const { \ |
584 | return ::testing::internal::AdjustConstness_##constness(this)-> \ |
585 | gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \ |
586 | ::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(), \ |
587 | ::testing::A<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(), \ |
588 | ::testing::A<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(), \ |
589 | ::testing::A<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(), \ |
590 | ::testing::A<GMOCK_ARG_(tn, 6, __VA_ARGS__)>(), \ |
591 | ::testing::A<GMOCK_ARG_(tn, 7, __VA_ARGS__)>(), \ |
592 | ::testing::A<GMOCK_ARG_(tn, 8, __VA_ARGS__)>(), \ |
593 | ::testing::A<GMOCK_ARG_(tn, 9, __VA_ARGS__)>(), \ |
594 | ::testing::A<GMOCK_ARG_(tn, 10, __VA_ARGS__)>()); \ |
595 | } \ |
596 | mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(10, constness, \ |
597 | Method) |
598 | |
599 | #define MOCK_METHOD0(m, ...) GMOCK_METHOD0_(, , , m, __VA_ARGS__) |
600 | #define MOCK_METHOD1(m, ...) GMOCK_METHOD1_(, , , m, __VA_ARGS__) |
601 | #define MOCK_METHOD2(m, ...) GMOCK_METHOD2_(, , , m, __VA_ARGS__) |
602 | #define MOCK_METHOD3(m, ...) GMOCK_METHOD3_(, , , m, __VA_ARGS__) |
603 | #define MOCK_METHOD4(m, ...) GMOCK_METHOD4_(, , , m, __VA_ARGS__) |
604 | #define MOCK_METHOD5(m, ...) GMOCK_METHOD5_(, , , m, __VA_ARGS__) |
605 | #define MOCK_METHOD6(m, ...) GMOCK_METHOD6_(, , , m, __VA_ARGS__) |
606 | #define MOCK_METHOD7(m, ...) GMOCK_METHOD7_(, , , m, __VA_ARGS__) |
607 | #define MOCK_METHOD8(m, ...) GMOCK_METHOD8_(, , , m, __VA_ARGS__) |
608 | #define MOCK_METHOD9(m, ...) GMOCK_METHOD9_(, , , m, __VA_ARGS__) |
609 | #define MOCK_METHOD10(m, ...) GMOCK_METHOD10_(, , , m, __VA_ARGS__) |
610 | |
611 | #define MOCK_CONST_METHOD0(m, ...) GMOCK_METHOD0_(, const, , m, __VA_ARGS__) |
612 | #define MOCK_CONST_METHOD1(m, ...) GMOCK_METHOD1_(, const, , m, __VA_ARGS__) |
613 | #define MOCK_CONST_METHOD2(m, ...) GMOCK_METHOD2_(, const, , m, __VA_ARGS__) |
614 | #define MOCK_CONST_METHOD3(m, ...) GMOCK_METHOD3_(, const, , m, __VA_ARGS__) |
615 | #define MOCK_CONST_METHOD4(m, ...) GMOCK_METHOD4_(, const, , m, __VA_ARGS__) |
616 | #define MOCK_CONST_METHOD5(m, ...) GMOCK_METHOD5_(, const, , m, __VA_ARGS__) |
617 | #define MOCK_CONST_METHOD6(m, ...) GMOCK_METHOD6_(, const, , m, __VA_ARGS__) |
618 | #define MOCK_CONST_METHOD7(m, ...) GMOCK_METHOD7_(, const, , m, __VA_ARGS__) |
619 | #define MOCK_CONST_METHOD8(m, ...) GMOCK_METHOD8_(, const, , m, __VA_ARGS__) |
620 | #define MOCK_CONST_METHOD9(m, ...) GMOCK_METHOD9_(, const, , m, __VA_ARGS__) |
621 | #define MOCK_CONST_METHOD10(m, ...) GMOCK_METHOD10_(, const, , m, __VA_ARGS__) |
622 | |
623 | #define MOCK_METHOD0_T(m, ...) GMOCK_METHOD0_(typename, , , m, __VA_ARGS__) |
624 | #define MOCK_METHOD1_T(m, ...) GMOCK_METHOD1_(typename, , , m, __VA_ARGS__) |
625 | #define MOCK_METHOD2_T(m, ...) GMOCK_METHOD2_(typename, , , m, __VA_ARGS__) |
626 | #define MOCK_METHOD3_T(m, ...) GMOCK_METHOD3_(typename, , , m, __VA_ARGS__) |
627 | #define MOCK_METHOD4_T(m, ...) GMOCK_METHOD4_(typename, , , m, __VA_ARGS__) |
628 | #define MOCK_METHOD5_T(m, ...) GMOCK_METHOD5_(typename, , , m, __VA_ARGS__) |
629 | #define MOCK_METHOD6_T(m, ...) GMOCK_METHOD6_(typename, , , m, __VA_ARGS__) |
630 | #define MOCK_METHOD7_T(m, ...) GMOCK_METHOD7_(typename, , , m, __VA_ARGS__) |
631 | #define MOCK_METHOD8_T(m, ...) GMOCK_METHOD8_(typename, , , m, __VA_ARGS__) |
632 | #define MOCK_METHOD9_T(m, ...) GMOCK_METHOD9_(typename, , , m, __VA_ARGS__) |
633 | #define MOCK_METHOD10_T(m, ...) GMOCK_METHOD10_(typename, , , m, __VA_ARGS__) |
634 | |
635 | #define MOCK_CONST_METHOD0_T(m, ...) \ |
636 | GMOCK_METHOD0_(typename, const, , m, __VA_ARGS__) |
637 | #define MOCK_CONST_METHOD1_T(m, ...) \ |
638 | GMOCK_METHOD1_(typename, const, , m, __VA_ARGS__) |
639 | #define MOCK_CONST_METHOD2_T(m, ...) \ |
640 | GMOCK_METHOD2_(typename, const, , m, __VA_ARGS__) |
641 | #define MOCK_CONST_METHOD3_T(m, ...) \ |
642 | GMOCK_METHOD3_(typename, const, , m, __VA_ARGS__) |
643 | #define MOCK_CONST_METHOD4_T(m, ...) \ |
644 | GMOCK_METHOD4_(typename, const, , m, __VA_ARGS__) |
645 | #define MOCK_CONST_METHOD5_T(m, ...) \ |
646 | GMOCK_METHOD5_(typename, const, , m, __VA_ARGS__) |
647 | #define MOCK_CONST_METHOD6_T(m, ...) \ |
648 | GMOCK_METHOD6_(typename, const, , m, __VA_ARGS__) |
649 | #define MOCK_CONST_METHOD7_T(m, ...) \ |
650 | GMOCK_METHOD7_(typename, const, , m, __VA_ARGS__) |
651 | #define MOCK_CONST_METHOD8_T(m, ...) \ |
652 | GMOCK_METHOD8_(typename, const, , m, __VA_ARGS__) |
653 | #define MOCK_CONST_METHOD9_T(m, ...) \ |
654 | GMOCK_METHOD9_(typename, const, , m, __VA_ARGS__) |
655 | #define MOCK_CONST_METHOD10_T(m, ...) \ |
656 | GMOCK_METHOD10_(typename, const, , m, __VA_ARGS__) |
657 | |
658 | #define MOCK_METHOD0_WITH_CALLTYPE(ct, m, ...) \ |
659 | GMOCK_METHOD0_(, , ct, m, __VA_ARGS__) |
660 | #define MOCK_METHOD1_WITH_CALLTYPE(ct, m, ...) \ |
661 | GMOCK_METHOD1_(, , ct, m, __VA_ARGS__) |
662 | #define MOCK_METHOD2_WITH_CALLTYPE(ct, m, ...) \ |
663 | GMOCK_METHOD2_(, , ct, m, __VA_ARGS__) |
664 | #define MOCK_METHOD3_WITH_CALLTYPE(ct, m, ...) \ |
665 | GMOCK_METHOD3_(, , ct, m, __VA_ARGS__) |
666 | #define MOCK_METHOD4_WITH_CALLTYPE(ct, m, ...) \ |
667 | GMOCK_METHOD4_(, , ct, m, __VA_ARGS__) |
668 | #define MOCK_METHOD5_WITH_CALLTYPE(ct, m, ...) \ |
669 | GMOCK_METHOD5_(, , ct, m, __VA_ARGS__) |
670 | #define MOCK_METHOD6_WITH_CALLTYPE(ct, m, ...) \ |
671 | GMOCK_METHOD6_(, , ct, m, __VA_ARGS__) |
672 | #define MOCK_METHOD7_WITH_CALLTYPE(ct, m, ...) \ |
673 | GMOCK_METHOD7_(, , ct, m, __VA_ARGS__) |
674 | #define MOCK_METHOD8_WITH_CALLTYPE(ct, m, ...) \ |
675 | GMOCK_METHOD8_(, , ct, m, __VA_ARGS__) |
676 | #define MOCK_METHOD9_WITH_CALLTYPE(ct, m, ...) \ |
677 | GMOCK_METHOD9_(, , ct, m, __VA_ARGS__) |
678 | #define MOCK_METHOD10_WITH_CALLTYPE(ct, m, ...) \ |
679 | GMOCK_METHOD10_(, , ct, m, __VA_ARGS__) |
680 | |
681 | #define MOCK_CONST_METHOD0_WITH_CALLTYPE(ct, m, ...) \ |
682 | GMOCK_METHOD0_(, const, ct, m, __VA_ARGS__) |
683 | #define MOCK_CONST_METHOD1_WITH_CALLTYPE(ct, m, ...) \ |
684 | GMOCK_METHOD1_(, const, ct, m, __VA_ARGS__) |
685 | #define MOCK_CONST_METHOD2_WITH_CALLTYPE(ct, m, ...) \ |
686 | GMOCK_METHOD2_(, const, ct, m, __VA_ARGS__) |
687 | #define MOCK_CONST_METHOD3_WITH_CALLTYPE(ct, m, ...) \ |
688 | GMOCK_METHOD3_(, const, ct, m, __VA_ARGS__) |
689 | #define MOCK_CONST_METHOD4_WITH_CALLTYPE(ct, m, ...) \ |
690 | GMOCK_METHOD4_(, const, ct, m, __VA_ARGS__) |
691 | #define MOCK_CONST_METHOD5_WITH_CALLTYPE(ct, m, ...) \ |
692 | GMOCK_METHOD5_(, const, ct, m, __VA_ARGS__) |
693 | #define MOCK_CONST_METHOD6_WITH_CALLTYPE(ct, m, ...) \ |
694 | GMOCK_METHOD6_(, const, ct, m, __VA_ARGS__) |
695 | #define MOCK_CONST_METHOD7_WITH_CALLTYPE(ct, m, ...) \ |
696 | GMOCK_METHOD7_(, const, ct, m, __VA_ARGS__) |
697 | #define MOCK_CONST_METHOD8_WITH_CALLTYPE(ct, m, ...) \ |
698 | GMOCK_METHOD8_(, const, ct, m, __VA_ARGS__) |
699 | #define MOCK_CONST_METHOD9_WITH_CALLTYPE(ct, m, ...) \ |
700 | GMOCK_METHOD9_(, const, ct, m, __VA_ARGS__) |
701 | #define MOCK_CONST_METHOD10_WITH_CALLTYPE(ct, m, ...) \ |
702 | GMOCK_METHOD10_(, const, ct, m, __VA_ARGS__) |
703 | |
704 | #define MOCK_METHOD0_T_WITH_CALLTYPE(ct, m, ...) \ |
705 | GMOCK_METHOD0_(typename, , ct, m, __VA_ARGS__) |
706 | #define MOCK_METHOD1_T_WITH_CALLTYPE(ct, m, ...) \ |
707 | GMOCK_METHOD1_(typename, , ct, m, __VA_ARGS__) |
708 | #define MOCK_METHOD2_T_WITH_CALLTYPE(ct, m, ...) \ |
709 | GMOCK_METHOD2_(typename, , ct, m, __VA_ARGS__) |
710 | #define MOCK_METHOD3_T_WITH_CALLTYPE(ct, m, ...) \ |
711 | GMOCK_METHOD3_(typename, , ct, m, __VA_ARGS__) |
712 | #define MOCK_METHOD4_T_WITH_CALLTYPE(ct, m, ...) \ |
713 | GMOCK_METHOD4_(typename, , ct, m, __VA_ARGS__) |
714 | #define MOCK_METHOD5_T_WITH_CALLTYPE(ct, m, ...) \ |
715 | GMOCK_METHOD5_(typename, , ct, m, __VA_ARGS__) |
716 | #define MOCK_METHOD6_T_WITH_CALLTYPE(ct, m, ...) \ |
717 | GMOCK_METHOD6_(typename, , ct, m, __VA_ARGS__) |
718 | #define MOCK_METHOD7_T_WITH_CALLTYPE(ct, m, ...) \ |
719 | GMOCK_METHOD7_(typename, , ct, m, __VA_ARGS__) |
720 | #define MOCK_METHOD8_T_WITH_CALLTYPE(ct, m, ...) \ |
721 | GMOCK_METHOD8_(typename, , ct, m, __VA_ARGS__) |
722 | #define MOCK_METHOD9_T_WITH_CALLTYPE(ct, m, ...) \ |
723 | GMOCK_METHOD9_(typename, , ct, m, __VA_ARGS__) |
724 | #define MOCK_METHOD10_T_WITH_CALLTYPE(ct, m, ...) \ |
725 | GMOCK_METHOD10_(typename, , ct, m, __VA_ARGS__) |
726 | |
727 | #define MOCK_CONST_METHOD0_T_WITH_CALLTYPE(ct, m, ...) \ |
728 | GMOCK_METHOD0_(typename, const, ct, m, __VA_ARGS__) |
729 | #define MOCK_CONST_METHOD1_T_WITH_CALLTYPE(ct, m, ...) \ |
730 | GMOCK_METHOD1_(typename, const, ct, m, __VA_ARGS__) |
731 | #define MOCK_CONST_METHOD2_T_WITH_CALLTYPE(ct, m, ...) \ |
732 | GMOCK_METHOD2_(typename, const, ct, m, __VA_ARGS__) |
733 | #define MOCK_CONST_METHOD3_T_WITH_CALLTYPE(ct, m, ...) \ |
734 | GMOCK_METHOD3_(typename, const, ct, m, __VA_ARGS__) |
735 | #define MOCK_CONST_METHOD4_T_WITH_CALLTYPE(ct, m, ...) \ |
736 | GMOCK_METHOD4_(typename, const, ct, m, __VA_ARGS__) |
737 | #define MOCK_CONST_METHOD5_T_WITH_CALLTYPE(ct, m, ...) \ |
738 | GMOCK_METHOD5_(typename, const, ct, m, __VA_ARGS__) |
739 | #define MOCK_CONST_METHOD6_T_WITH_CALLTYPE(ct, m, ...) \ |
740 | GMOCK_METHOD6_(typename, const, ct, m, __VA_ARGS__) |
741 | #define MOCK_CONST_METHOD7_T_WITH_CALLTYPE(ct, m, ...) \ |
742 | GMOCK_METHOD7_(typename, const, ct, m, __VA_ARGS__) |
743 | #define MOCK_CONST_METHOD8_T_WITH_CALLTYPE(ct, m, ...) \ |
744 | GMOCK_METHOD8_(typename, const, ct, m, __VA_ARGS__) |
745 | #define MOCK_CONST_METHOD9_T_WITH_CALLTYPE(ct, m, ...) \ |
746 | GMOCK_METHOD9_(typename, const, ct, m, __VA_ARGS__) |
747 | #define MOCK_CONST_METHOD10_T_WITH_CALLTYPE(ct, m, ...) \ |
748 | GMOCK_METHOD10_(typename, const, ct, m, __VA_ARGS__) |
749 | |
750 | } // namespace testing |
751 | |
752 | #endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_ |
753 | |