37 #ifndef GOOGLETEST_GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_MORE_ACTIONS_H_
38 #define GOOGLETEST_GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_MORE_ACTIONS_H_
43 #include "gmock/gmock-actions.h"
44 #include "gmock/internal/gmock-port.h"
47 #include "gmock/internal/custom/gmock-generated-actions.h"
131 #define GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS(kind0, name0) kind0 name0
132 #define GMOCK_INTERNAL_DECL_HAS_2_TEMPLATE_PARAMS(kind0, name0, kind1, \
133 name1) kind0 name0, kind1 name1
134 #define GMOCK_INTERNAL_DECL_HAS_3_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
135 kind2, name2) kind0 name0, kind1 name1, kind2 name2
136 #define GMOCK_INTERNAL_DECL_HAS_4_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
137 kind2, name2, kind3, name3) kind0 name0, kind1 name1, kind2 name2, \
139 #define GMOCK_INTERNAL_DECL_HAS_5_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
140 kind2, name2, kind3, name3, kind4, name4) kind0 name0, kind1 name1, \
141 kind2 name2, kind3 name3, kind4 name4
142 #define GMOCK_INTERNAL_DECL_HAS_6_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
143 kind2, name2, kind3, name3, kind4, name4, kind5, name5) kind0 name0, \
144 kind1 name1, kind2 name2, kind3 name3, kind4 name4, kind5 name5
145 #define GMOCK_INTERNAL_DECL_HAS_7_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
146 kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \
147 name6) kind0 name0, kind1 name1, kind2 name2, kind3 name3, kind4 name4, \
148 kind5 name5, kind6 name6
149 #define GMOCK_INTERNAL_DECL_HAS_8_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
150 kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \
151 kind7, name7) kind0 name0, kind1 name1, kind2 name2, kind3 name3, \
152 kind4 name4, kind5 name5, kind6 name6, kind7 name7
153 #define GMOCK_INTERNAL_DECL_HAS_9_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
154 kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \
155 kind7, name7, kind8, name8) kind0 name0, kind1 name1, kind2 name2, \
156 kind3 name3, kind4 name4, kind5 name5, kind6 name6, kind7 name7, \
158 #define GMOCK_INTERNAL_DECL_HAS_10_TEMPLATE_PARAMS(kind0, name0, kind1, \
159 name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \
160 name6, kind7, name7, kind8, name8, kind9, name9) kind0 name0, \
161 kind1 name1, kind2 name2, kind3 name3, kind4 name4, kind5 name5, \
162 kind6 name6, kind7 name7, kind8 name8, kind9 name9
165 #define GMOCK_INTERNAL_LIST_HAS_1_TEMPLATE_PARAMS(kind0, name0) name0
166 #define GMOCK_INTERNAL_LIST_HAS_2_TEMPLATE_PARAMS(kind0, name0, kind1, \
168 #define GMOCK_INTERNAL_LIST_HAS_3_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
169 kind2, name2) name0, name1, name2
170 #define GMOCK_INTERNAL_LIST_HAS_4_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
171 kind2, name2, kind3, name3) name0, name1, name2, name3
172 #define GMOCK_INTERNAL_LIST_HAS_5_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
173 kind2, name2, kind3, name3, kind4, name4) name0, name1, name2, name3, \
175 #define GMOCK_INTERNAL_LIST_HAS_6_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
176 kind2, name2, kind3, name3, kind4, name4, kind5, name5) name0, name1, \
177 name2, name3, name4, name5
178 #define GMOCK_INTERNAL_LIST_HAS_7_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
179 kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \
180 name6) name0, name1, name2, name3, name4, name5, name6
181 #define GMOCK_INTERNAL_LIST_HAS_8_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
182 kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \
183 kind7, name7) name0, name1, name2, name3, name4, name5, name6, name7
184 #define GMOCK_INTERNAL_LIST_HAS_9_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
185 kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \
186 kind7, name7, kind8, name8) name0, name1, name2, name3, name4, name5, \
188 #define GMOCK_INTERNAL_LIST_HAS_10_TEMPLATE_PARAMS(kind0, name0, kind1, \
189 name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \
190 name6, kind7, name7, kind8, name8, kind9, name9) name0, name1, name2, \
191 name3, name4, name5, name6, name7, name8, name9
194 #define GMOCK_INTERNAL_DECL_TYPE_AND_0_VALUE_PARAMS()
195 #define GMOCK_INTERNAL_DECL_TYPE_AND_1_VALUE_PARAMS(p0) , typename p0##_type
196 #define GMOCK_INTERNAL_DECL_TYPE_AND_2_VALUE_PARAMS(p0, p1) , \
197 typename p0##_type, typename p1##_type
198 #define GMOCK_INTERNAL_DECL_TYPE_AND_3_VALUE_PARAMS(p0, p1, p2) , \
199 typename p0##_type, typename p1##_type, typename p2##_type
200 #define GMOCK_INTERNAL_DECL_TYPE_AND_4_VALUE_PARAMS(p0, p1, p2, p3) , \
201 typename p0##_type, typename p1##_type, typename p2##_type, \
203 #define GMOCK_INTERNAL_DECL_TYPE_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) , \
204 typename p0##_type, typename p1##_type, typename p2##_type, \
205 typename p3##_type, typename p4##_type
206 #define GMOCK_INTERNAL_DECL_TYPE_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) , \
207 typename p0##_type, typename p1##_type, typename p2##_type, \
208 typename p3##_type, typename p4##_type, typename p5##_type
209 #define GMOCK_INTERNAL_DECL_TYPE_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
210 p6) , typename p0##_type, typename p1##_type, typename p2##_type, \
211 typename p3##_type, typename p4##_type, typename p5##_type, \
213 #define GMOCK_INTERNAL_DECL_TYPE_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
214 p6, p7) , typename p0##_type, typename p1##_type, typename p2##_type, \
215 typename p3##_type, typename p4##_type, typename p5##_type, \
216 typename p6##_type, typename p7##_type
217 #define GMOCK_INTERNAL_DECL_TYPE_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
218 p6, p7, p8) , typename p0##_type, typename p1##_type, typename p2##_type, \
219 typename p3##_type, typename p4##_type, typename p5##_type, \
220 typename p6##_type, typename p7##_type, typename p8##_type
221 #define GMOCK_INTERNAL_DECL_TYPE_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
222 p6, p7, p8, p9) , typename p0##_type, typename p1##_type, \
223 typename p2##_type, typename p3##_type, typename p4##_type, \
224 typename p5##_type, typename p6##_type, typename p7##_type, \
225 typename p8##_type, typename p9##_type
228 #define GMOCK_INTERNAL_INIT_AND_0_VALUE_PARAMS()\
230 #define GMOCK_INTERNAL_INIT_AND_1_VALUE_PARAMS(p0)\
231 (p0##_type gmock_p0) : p0(::std::move(gmock_p0))
232 #define GMOCK_INTERNAL_INIT_AND_2_VALUE_PARAMS(p0, p1)\
233 (p0##_type gmock_p0, p1##_type gmock_p1) : p0(::std::move(gmock_p0)), \
234 p1(::std::move(gmock_p1))
235 #define GMOCK_INTERNAL_INIT_AND_3_VALUE_PARAMS(p0, p1, p2)\
236 (p0##_type gmock_p0, p1##_type gmock_p1, \
237 p2##_type gmock_p2) : p0(::std::move(gmock_p0)), \
238 p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2))
239 #define GMOCK_INTERNAL_INIT_AND_4_VALUE_PARAMS(p0, p1, p2, p3)\
240 (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
241 p3##_type gmock_p3) : p0(::std::move(gmock_p0)), \
242 p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \
243 p3(::std::move(gmock_p3))
244 #define GMOCK_INTERNAL_INIT_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)\
245 (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
246 p3##_type gmock_p3, p4##_type gmock_p4) : p0(::std::move(gmock_p0)), \
247 p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \
248 p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4))
249 #define GMOCK_INTERNAL_INIT_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)\
250 (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
251 p3##_type gmock_p3, p4##_type gmock_p4, \
252 p5##_type gmock_p5) : p0(::std::move(gmock_p0)), \
253 p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \
254 p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4)), \
255 p5(::std::move(gmock_p5))
256 #define GMOCK_INTERNAL_INIT_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)\
257 (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
258 p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
259 p6##_type gmock_p6) : p0(::std::move(gmock_p0)), \
260 p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \
261 p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4)), \
262 p5(::std::move(gmock_p5)), p6(::std::move(gmock_p6))
263 #define GMOCK_INTERNAL_INIT_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)\
264 (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
265 p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
266 p6##_type gmock_p6, p7##_type gmock_p7) : p0(::std::move(gmock_p0)), \
267 p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \
268 p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4)), \
269 p5(::std::move(gmock_p5)), p6(::std::move(gmock_p6)), \
270 p7(::std::move(gmock_p7))
271 #define GMOCK_INTERNAL_INIT_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
273 (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
274 p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
275 p6##_type gmock_p6, p7##_type gmock_p7, \
276 p8##_type gmock_p8) : p0(::std::move(gmock_p0)), \
277 p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \
278 p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4)), \
279 p5(::std::move(gmock_p5)), p6(::std::move(gmock_p6)), \
280 p7(::std::move(gmock_p7)), p8(::std::move(gmock_p8))
281 #define GMOCK_INTERNAL_INIT_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
283 (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
284 p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
285 p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8, \
286 p9##_type gmock_p9) : p0(::std::move(gmock_p0)), \
287 p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \
288 p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4)), \
289 p5(::std::move(gmock_p5)), p6(::std::move(gmock_p6)), \
290 p7(::std::move(gmock_p7)), p8(::std::move(gmock_p8)), \
291 p9(::std::move(gmock_p9))
294 #define GMOCK_INTERNAL_DEFN_COPY_AND_0_VALUE_PARAMS() \
296 #define GMOCK_INTERNAL_DEFN_COPY_AND_1_VALUE_PARAMS(...) = default;
297 #define GMOCK_INTERNAL_DEFN_COPY_AND_2_VALUE_PARAMS(...) = default;
298 #define GMOCK_INTERNAL_DEFN_COPY_AND_3_VALUE_PARAMS(...) = default;
299 #define GMOCK_INTERNAL_DEFN_COPY_AND_4_VALUE_PARAMS(...) = default;
300 #define GMOCK_INTERNAL_DEFN_COPY_AND_5_VALUE_PARAMS(...) = default;
301 #define GMOCK_INTERNAL_DEFN_COPY_AND_6_VALUE_PARAMS(...) = default;
302 #define GMOCK_INTERNAL_DEFN_COPY_AND_7_VALUE_PARAMS(...) = default;
303 #define GMOCK_INTERNAL_DEFN_COPY_AND_8_VALUE_PARAMS(...) = default;
304 #define GMOCK_INTERNAL_DEFN_COPY_AND_9_VALUE_PARAMS(...) = default;
305 #define GMOCK_INTERNAL_DEFN_COPY_AND_10_VALUE_PARAMS(...) = default;
308 #define GMOCK_INTERNAL_DEFN_AND_0_VALUE_PARAMS()
309 #define GMOCK_INTERNAL_DEFN_AND_1_VALUE_PARAMS(p0) p0##_type p0;
310 #define GMOCK_INTERNAL_DEFN_AND_2_VALUE_PARAMS(p0, p1) p0##_type p0; \
312 #define GMOCK_INTERNAL_DEFN_AND_3_VALUE_PARAMS(p0, p1, p2) p0##_type p0; \
313 p1##_type p1; p2##_type p2;
314 #define GMOCK_INTERNAL_DEFN_AND_4_VALUE_PARAMS(p0, p1, p2, p3) p0##_type p0; \
315 p1##_type p1; p2##_type p2; p3##_type p3;
316 #define GMOCK_INTERNAL_DEFN_AND_5_VALUE_PARAMS(p0, p1, p2, p3, \
317 p4) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4;
318 #define GMOCK_INTERNAL_DEFN_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, \
319 p5) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; \
321 #define GMOCK_INTERNAL_DEFN_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
322 p6) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; \
323 p5##_type p5; p6##_type p6;
324 #define GMOCK_INTERNAL_DEFN_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
325 p7) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; \
326 p5##_type p5; p6##_type p6; p7##_type p7;
327 #define GMOCK_INTERNAL_DEFN_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
328 p7, p8) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; \
329 p4##_type p4; p5##_type p5; p6##_type p6; p7##_type p7; p8##_type p8;
330 #define GMOCK_INTERNAL_DEFN_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
331 p7, p8, p9) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; \
332 p4##_type p4; p5##_type p5; p6##_type p6; p7##_type p7; p8##_type p8; \
336 #define GMOCK_INTERNAL_LIST_AND_0_VALUE_PARAMS()
337 #define GMOCK_INTERNAL_LIST_AND_1_VALUE_PARAMS(p0) p0
338 #define GMOCK_INTERNAL_LIST_AND_2_VALUE_PARAMS(p0, p1) p0, p1
339 #define GMOCK_INTERNAL_LIST_AND_3_VALUE_PARAMS(p0, p1, p2) p0, p1, p2
340 #define GMOCK_INTERNAL_LIST_AND_4_VALUE_PARAMS(p0, p1, p2, p3) p0, p1, p2, p3
341 #define GMOCK_INTERNAL_LIST_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) p0, p1, \
343 #define GMOCK_INTERNAL_LIST_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) p0, \
345 #define GMOCK_INTERNAL_LIST_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
346 p6) p0, p1, p2, p3, p4, p5, p6
347 #define GMOCK_INTERNAL_LIST_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
348 p7) p0, p1, p2, p3, p4, p5, p6, p7
349 #define GMOCK_INTERNAL_LIST_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
350 p7, p8) p0, p1, p2, p3, p4, p5, p6, p7, p8
351 #define GMOCK_INTERNAL_LIST_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
352 p7, p8, p9) p0, p1, p2, p3, p4, p5, p6, p7, p8, p9
355 #define GMOCK_INTERNAL_LIST_TYPE_AND_0_VALUE_PARAMS()
356 #define GMOCK_INTERNAL_LIST_TYPE_AND_1_VALUE_PARAMS(p0) , p0##_type
357 #define GMOCK_INTERNAL_LIST_TYPE_AND_2_VALUE_PARAMS(p0, p1) , p0##_type, \
359 #define GMOCK_INTERNAL_LIST_TYPE_AND_3_VALUE_PARAMS(p0, p1, p2) , p0##_type, \
361 #define GMOCK_INTERNAL_LIST_TYPE_AND_4_VALUE_PARAMS(p0, p1, p2, p3) , \
362 p0##_type, p1##_type, p2##_type, p3##_type
363 #define GMOCK_INTERNAL_LIST_TYPE_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) , \
364 p0##_type, p1##_type, p2##_type, p3##_type, p4##_type
365 #define GMOCK_INTERNAL_LIST_TYPE_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) , \
366 p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, p5##_type
367 #define GMOCK_INTERNAL_LIST_TYPE_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
368 p6) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, p5##_type, \
370 #define GMOCK_INTERNAL_LIST_TYPE_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
371 p6, p7) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
372 p5##_type, p6##_type, p7##_type
373 #define GMOCK_INTERNAL_LIST_TYPE_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
374 p6, p7, p8) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
375 p5##_type, p6##_type, p7##_type, p8##_type
376 #define GMOCK_INTERNAL_LIST_TYPE_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
377 p6, p7, p8, p9) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
378 p5##_type, p6##_type, p7##_type, p8##_type, p9##_type
381 #define GMOCK_INTERNAL_DECL_AND_0_VALUE_PARAMS()
382 #define GMOCK_INTERNAL_DECL_AND_1_VALUE_PARAMS(p0) p0##_type p0
383 #define GMOCK_INTERNAL_DECL_AND_2_VALUE_PARAMS(p0, p1) p0##_type p0, \
385 #define GMOCK_INTERNAL_DECL_AND_3_VALUE_PARAMS(p0, p1, p2) p0##_type p0, \
386 p1##_type p1, p2##_type p2
387 #define GMOCK_INTERNAL_DECL_AND_4_VALUE_PARAMS(p0, p1, p2, p3) p0##_type p0, \
388 p1##_type p1, p2##_type p2, p3##_type p3
389 #define GMOCK_INTERNAL_DECL_AND_5_VALUE_PARAMS(p0, p1, p2, p3, \
390 p4) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4
391 #define GMOCK_INTERNAL_DECL_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, \
392 p5) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \
394 #define GMOCK_INTERNAL_DECL_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
395 p6) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \
396 p5##_type p5, p6##_type p6
397 #define GMOCK_INTERNAL_DECL_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
398 p7) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \
399 p5##_type p5, p6##_type p6, p7##_type p7
400 #define GMOCK_INTERNAL_DECL_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
401 p7, p8) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
402 p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8
403 #define GMOCK_INTERNAL_DECL_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
404 p7, p8, p9) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
405 p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8, \
409 #define GMOCK_INTERNAL_COUNT_AND_0_VALUE_PARAMS()
410 #define GMOCK_INTERNAL_COUNT_AND_1_VALUE_PARAMS(p0) P
411 #define GMOCK_INTERNAL_COUNT_AND_2_VALUE_PARAMS(p0, p1) P2
412 #define GMOCK_INTERNAL_COUNT_AND_3_VALUE_PARAMS(p0, p1, p2) P3
413 #define GMOCK_INTERNAL_COUNT_AND_4_VALUE_PARAMS(p0, p1, p2, p3) P4
414 #define GMOCK_INTERNAL_COUNT_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) P5
415 #define GMOCK_INTERNAL_COUNT_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) P6
416 #define GMOCK_INTERNAL_COUNT_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6) P7
417 #define GMOCK_INTERNAL_COUNT_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
419 #define GMOCK_INTERNAL_COUNT_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
421 #define GMOCK_INTERNAL_COUNT_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
425 #define GMOCK_ACTION_CLASS_(name, value_params)\
426 GTEST_CONCAT_TOKEN_(name##Action, GMOCK_INTERNAL_COUNT_##value_params)
428 #define ACTION_TEMPLATE(name, template_params, value_params) \
429 template <GMOCK_INTERNAL_DECL_##template_params \
430 GMOCK_INTERNAL_DECL_TYPE_##value_params> \
431 class GMOCK_ACTION_CLASS_(name, value_params) { \
433 explicit GMOCK_ACTION_CLASS_(name, value_params)( \
434 GMOCK_INTERNAL_DECL_##value_params) \
435 GMOCK_PP_IF(GMOCK_PP_IS_EMPTY(GMOCK_INTERNAL_COUNT_##value_params), \
437 : impl_(std::make_shared<gmock_Impl>( \
438 GMOCK_INTERNAL_LIST_##value_params)) { }) \
439 GMOCK_ACTION_CLASS_(name, value_params)( \
440 const GMOCK_ACTION_CLASS_(name, value_params)&) noexcept \
441 GMOCK_INTERNAL_DEFN_COPY_##value_params \
442 GMOCK_ACTION_CLASS_(name, value_params)( \
443 GMOCK_ACTION_CLASS_(name, value_params)&&) noexcept \
444 GMOCK_INTERNAL_DEFN_COPY_##value_params \
445 template <typename F> \
446 operator ::testing::Action<F>() const { \
447 return GMOCK_PP_IF( \
448 GMOCK_PP_IS_EMPTY(GMOCK_INTERNAL_COUNT_##value_params), \
449 (::testing::internal::MakeAction<F, gmock_Impl>()), \
450 (::testing::internal::MakeAction<F>(impl_))); \
455 explicit gmock_Impl GMOCK_INTERNAL_INIT_##value_params {} \
456 template <typename function_type, typename return_type, \
457 typename args_type, GMOCK_ACTION_TEMPLATE_ARGS_NAMES_> \
458 return_type gmock_PerformImpl(GMOCK_ACTION_ARG_TYPES_AND_NAMES_) const; \
459 GMOCK_INTERNAL_DEFN_##value_params \
461 GMOCK_PP_IF(GMOCK_PP_IS_EMPTY(GMOCK_INTERNAL_COUNT_##value_params), \
462 , std::shared_ptr<const gmock_Impl> impl_;) \
464 template <GMOCK_INTERNAL_DECL_##template_params \
465 GMOCK_INTERNAL_DECL_TYPE_##value_params> \
466 GMOCK_ACTION_CLASS_(name, value_params)< \
467 GMOCK_INTERNAL_LIST_##template_params \
468 GMOCK_INTERNAL_LIST_TYPE_##value_params> name( \
469 GMOCK_INTERNAL_DECL_##value_params) GTEST_MUST_USE_RESULT_; \
470 template <GMOCK_INTERNAL_DECL_##template_params \
471 GMOCK_INTERNAL_DECL_TYPE_##value_params> \
472 inline GMOCK_ACTION_CLASS_(name, value_params)< \
473 GMOCK_INTERNAL_LIST_##template_params \
474 GMOCK_INTERNAL_LIST_TYPE_##value_params> name( \
475 GMOCK_INTERNAL_DECL_##value_params) { \
476 return GMOCK_ACTION_CLASS_(name, value_params)< \
477 GMOCK_INTERNAL_LIST_##template_params \
478 GMOCK_INTERNAL_LIST_TYPE_##value_params>( \
479 GMOCK_INTERNAL_LIST_##value_params); \
481 template <GMOCK_INTERNAL_DECL_##template_params \
482 GMOCK_INTERNAL_DECL_TYPE_##value_params> \
483 template <typename function_type, typename return_type, typename args_type, \
484 GMOCK_ACTION_TEMPLATE_ARGS_NAMES_> \
485 return_type GMOCK_ACTION_CLASS_(name, value_params)< \
486 GMOCK_INTERNAL_LIST_##template_params \
487 GMOCK_INTERNAL_LIST_TYPE_##value_params>::gmock_Impl::gmock_PerformImpl( \
488 GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
498 # pragma warning(push)
499 # pragma warning(disable:4100)
508 template <
typename F,
typename... Args>
513 template <std::size_t index,
typename... Params>
515 template <
typename... Args>
517 std::get<index>(std::forward_as_tuple(std::forward<Args>(args)...)),
518 std::declval<const Params&>()...)) {
520 std::forward<Args>(args)...);
521 return params.Apply([&](
const Params&... unpacked_params) {
522 auto&& callable = args_tuple.template Get<index>();
524 std::forward<decltype(callable)>(callable), unpacked_params...);
560 template <std::size_t index,
typename... Params>
568 # pragma warning(pop)
Definition: cmake-build-release/googletest-src/googletest/include/gtest/internal/gtest-internal.h:1278
auto InvokeArgument(F f, Args... args) -> decltype(f(args...))
Definition: cmake-build-debug/googletest-src/googlemock/include/gmock/gmock-more-actions.h:509
Definition: cmake-build-debug/googletest-src/googlemock/include/gmock/gmock-actions.h:154
internal::InvokeArgumentAction< index, typename std::decay< Params >::type... > InvokeArgument(Params &&... params)
Definition: cmake-build-debug/googletest-src/googlemock/include/gmock/gmock-more-actions.h:562
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-internal.h:1214
Definition: cmake-build-debug/googletest-src/googlemock/include/gmock/gmock-more-actions.h:514
internal::FlatTuple< Params... > params
Definition: cmake-build-debug/googletest-src/googlemock/include/gmock/gmock-more-actions.h:528
auto operator()(Args &&... args) const -> decltype(internal::InvokeArgument(std::get< index >(std::forward_as_tuple(std::forward< Args >(args)...)), std::declval< const Params & >()...))
Definition: cmake-build-debug/googletest-src/googlemock/include/gmock/gmock-more-actions.h:516