Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: testing/gmock/include/gmock/gmock-generated-function-mockers.h

Issue 3427004: clang: update gtest/gmock (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: yakshave Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // This file was GENERATED by a script. DO NOT EDIT BY HAND!!! 1 // This file was GENERATED by a script. DO NOT EDIT BY HAND!!!
2 2
3 // Copyright 2007, Google Inc. 3 // Copyright 2007, Google Inc.
4 // All rights reserved. 4 // All rights reserved.
5 // 5 //
6 // Redistribution and use in source and binary forms, with or without 6 // Redistribution and use in source and binary forms, with or without
7 // modification, are permitted provided that the following conditions are 7 // modification, are permitted provided that the following conditions are
8 // met: 8 // met:
9 // 9 //
10 // * Redistributions of source code must retain the above copyright 10 // * Redistributions of source code must retain the above copyright
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 #define GMOCK_MATCHER_(tn, F, N) const ::testing::Matcher<GMOCK_ARG_(tn, F, N)>& 337 #define GMOCK_MATCHER_(tn, F, N) const ::testing::Matcher<GMOCK_ARG_(tn, F, N)>&
338 338
339 // The variable for mocking the given method. 339 // The variable for mocking the given method.
340 // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! 340 // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
341 #define GMOCK_MOCKER_(arity, constness, Method) \ 341 #define GMOCK_MOCKER_(arity, constness, Method) \
342 GMOCK_CONCAT_TOKEN_(gmock##constness##arity##_##Method##_, __LINE__) 342 GMOCK_CONCAT_TOKEN_(gmock##constness##arity##_##Method##_, __LINE__)
343 343
344 // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! 344 // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
345 #define GMOCK_METHOD0_(tn, constness, ct, Method, F) \ 345 #define GMOCK_METHOD0_(tn, constness, ct, Method, F) \
346 GMOCK_RESULT_(tn, F) ct Method() constness { \ 346 GMOCK_RESULT_(tn, F) ct Method() constness { \
347 GMOCK_COMPILE_ASSERT_(::std::tr1::tuple_size< \ 347 GTEST_COMPILE_ASSERT_(::std::tr1::tuple_size< \
348 tn ::testing::internal::Function<F>::ArgumentTuple>::value == 0, \ 348 tn ::testing::internal::Function<F>::ArgumentTuple>::value == 0, \
349 this_method_does_not_take_0_arguments); \ 349 this_method_does_not_take_0_arguments); \
350 GMOCK_MOCKER_(0, constness, Method).SetOwnerAndName(this, #Method); \ 350 GMOCK_MOCKER_(0, constness, Method).SetOwnerAndName(this, #Method); \
351 return GMOCK_MOCKER_(0, constness, Method).Invoke(); \ 351 return GMOCK_MOCKER_(0, constness, Method).Invoke(); \
352 } \ 352 } \
353 ::testing::MockSpec<F>& \ 353 ::testing::MockSpec<F>& \
354 gmock_##Method() constness { \ 354 gmock_##Method() constness { \
355 return GMOCK_MOCKER_(0, constness, Method).RegisterOwner(this).With(); \ 355 return GMOCK_MOCKER_(0, constness, Method).RegisterOwner(this).With(); \
356 } \ 356 } \
357 mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(0, constness, Method) 357 mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(0, constness, Method)
358 358
359 // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! 359 // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
360 #define GMOCK_METHOD1_(tn, constness, ct, Method, F) \ 360 #define GMOCK_METHOD1_(tn, constness, ct, Method, F) \
361 GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1) constness { \ 361 GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1) constness { \
362 GMOCK_COMPILE_ASSERT_(::std::tr1::tuple_size< \ 362 GTEST_COMPILE_ASSERT_(::std::tr1::tuple_size< \
363 tn ::testing::internal::Function<F>::ArgumentTuple>::value == 1, \ 363 tn ::testing::internal::Function<F>::ArgumentTuple>::value == 1, \
364 this_method_does_not_take_1_argument); \ 364 this_method_does_not_take_1_argument); \
365 GMOCK_MOCKER_(1, constness, Method).SetOwnerAndName(this, #Method); \ 365 GMOCK_MOCKER_(1, constness, Method).SetOwnerAndName(this, #Method); \
366 return GMOCK_MOCKER_(1, constness, Method).Invoke(gmock_a1); \ 366 return GMOCK_MOCKER_(1, constness, Method).Invoke(gmock_a1); \
367 } \ 367 } \
368 ::testing::MockSpec<F>& \ 368 ::testing::MockSpec<F>& \
369 gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1) constness { \ 369 gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1) constness { \
370 return GMOCK_MOCKER_(1, constness, \ 370 return GMOCK_MOCKER_(1, constness, \
371 Method).RegisterOwner(this).With(gmock_a1); \ 371 Method).RegisterOwner(this).With(gmock_a1); \
372 } \ 372 } \
373 mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(1, constness, Method) 373 mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(1, constness, Method)
374 374
375 // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! 375 // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
376 #define GMOCK_METHOD2_(tn, constness, ct, Method, F) \ 376 #define GMOCK_METHOD2_(tn, constness, ct, Method, F) \
377 GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \ 377 GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \
378 GMOCK_ARG_(tn, F, 2) gmock_a2) constness { \ 378 GMOCK_ARG_(tn, F, 2) gmock_a2) constness { \
379 GMOCK_COMPILE_ASSERT_(::std::tr1::tuple_size< \ 379 GTEST_COMPILE_ASSERT_(::std::tr1::tuple_size< \
380 tn ::testing::internal::Function<F>::ArgumentTuple>::value == 2, \ 380 tn ::testing::internal::Function<F>::ArgumentTuple>::value == 2, \
381 this_method_does_not_take_2_arguments); \ 381 this_method_does_not_take_2_arguments); \
382 GMOCK_MOCKER_(2, constness, Method).SetOwnerAndName(this, #Method); \ 382 GMOCK_MOCKER_(2, constness, Method).SetOwnerAndName(this, #Method); \
383 return GMOCK_MOCKER_(2, constness, Method).Invoke(gmock_a1, gmock_a2); \ 383 return GMOCK_MOCKER_(2, constness, Method).Invoke(gmock_a1, gmock_a2); \
384 } \ 384 } \
385 ::testing::MockSpec<F>& \ 385 ::testing::MockSpec<F>& \
386 gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \ 386 gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \
387 GMOCK_MATCHER_(tn, F, 2) gmock_a2) constness { \ 387 GMOCK_MATCHER_(tn, F, 2) gmock_a2) constness { \
388 return GMOCK_MOCKER_(2, constness, \ 388 return GMOCK_MOCKER_(2, constness, \
389 Method).RegisterOwner(this).With(gmock_a1, gmock_a2); \ 389 Method).RegisterOwner(this).With(gmock_a1, gmock_a2); \
390 } \ 390 } \
391 mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(2, constness, Method) 391 mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(2, constness, Method)
392 392
393 // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! 393 // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
394 #define GMOCK_METHOD3_(tn, constness, ct, Method, F) \ 394 #define GMOCK_METHOD3_(tn, constness, ct, Method, F) \
395 GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \ 395 GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \
396 GMOCK_ARG_(tn, F, 2) gmock_a2, \ 396 GMOCK_ARG_(tn, F, 2) gmock_a2, \
397 GMOCK_ARG_(tn, F, 3) gmock_a3) constness { \ 397 GMOCK_ARG_(tn, F, 3) gmock_a3) constness { \
398 GMOCK_COMPILE_ASSERT_(::std::tr1::tuple_size< \ 398 GTEST_COMPILE_ASSERT_(::std::tr1::tuple_size< \
399 tn ::testing::internal::Function<F>::ArgumentTuple>::value == 3, \ 399 tn ::testing::internal::Function<F>::ArgumentTuple>::value == 3, \
400 this_method_does_not_take_3_arguments); \ 400 this_method_does_not_take_3_arguments); \
401 GMOCK_MOCKER_(3, constness, Method).SetOwnerAndName(this, #Method); \ 401 GMOCK_MOCKER_(3, constness, Method).SetOwnerAndName(this, #Method); \
402 return GMOCK_MOCKER_(3, constness, Method).Invoke(gmock_a1, gmock_a2, \ 402 return GMOCK_MOCKER_(3, constness, Method).Invoke(gmock_a1, gmock_a2, \
403 gmock_a3); \ 403 gmock_a3); \
404 } \ 404 } \
405 ::testing::MockSpec<F>& \ 405 ::testing::MockSpec<F>& \
406 gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \ 406 gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \
407 GMOCK_MATCHER_(tn, F, 2) gmock_a2, \ 407 GMOCK_MATCHER_(tn, F, 2) gmock_a2, \
408 GMOCK_MATCHER_(tn, F, 3) gmock_a3) constness { \ 408 GMOCK_MATCHER_(tn, F, 3) gmock_a3) constness { \
409 return GMOCK_MOCKER_(3, constness, \ 409 return GMOCK_MOCKER_(3, constness, \
410 Method).RegisterOwner(this).With(gmock_a1, gmock_a2, gmock_a3); \ 410 Method).RegisterOwner(this).With(gmock_a1, gmock_a2, gmock_a3); \
411 } \ 411 } \
412 mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(3, constness, Method) 412 mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(3, constness, Method)
413 413
414 // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! 414 // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
415 #define GMOCK_METHOD4_(tn, constness, ct, Method, F) \ 415 #define GMOCK_METHOD4_(tn, constness, ct, Method, F) \
416 GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \ 416 GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \
417 GMOCK_ARG_(tn, F, 2) gmock_a2, \ 417 GMOCK_ARG_(tn, F, 2) gmock_a2, \
418 GMOCK_ARG_(tn, F, 3) gmock_a3, \ 418 GMOCK_ARG_(tn, F, 3) gmock_a3, \
419 GMOCK_ARG_(tn, F, 4) gmock_a4) constness { \ 419 GMOCK_ARG_(tn, F, 4) gmock_a4) constness { \
420 GMOCK_COMPILE_ASSERT_(::std::tr1::tuple_size< \ 420 GTEST_COMPILE_ASSERT_(::std::tr1::tuple_size< \
421 tn ::testing::internal::Function<F>::ArgumentTuple>::value == 4, \ 421 tn ::testing::internal::Function<F>::ArgumentTuple>::value == 4, \
422 this_method_does_not_take_4_arguments); \ 422 this_method_does_not_take_4_arguments); \
423 GMOCK_MOCKER_(4, constness, Method).SetOwnerAndName(this, #Method); \ 423 GMOCK_MOCKER_(4, constness, Method).SetOwnerAndName(this, #Method); \
424 return GMOCK_MOCKER_(4, constness, Method).Invoke(gmock_a1, gmock_a2, \ 424 return GMOCK_MOCKER_(4, constness, Method).Invoke(gmock_a1, gmock_a2, \
425 gmock_a3, gmock_a4); \ 425 gmock_a3, gmock_a4); \
426 } \ 426 } \
427 ::testing::MockSpec<F>& \ 427 ::testing::MockSpec<F>& \
428 gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \ 428 gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \
429 GMOCK_MATCHER_(tn, F, 2) gmock_a2, \ 429 GMOCK_MATCHER_(tn, F, 2) gmock_a2, \
430 GMOCK_MATCHER_(tn, F, 3) gmock_a3, \ 430 GMOCK_MATCHER_(tn, F, 3) gmock_a3, \
431 GMOCK_MATCHER_(tn, F, 4) gmock_a4) constness { \ 431 GMOCK_MATCHER_(tn, F, 4) gmock_a4) constness { \
432 return GMOCK_MOCKER_(4, constness, \ 432 return GMOCK_MOCKER_(4, constness, \
433 Method).RegisterOwner(this).With(gmock_a1, gmock_a2, gmock_a3, \ 433 Method).RegisterOwner(this).With(gmock_a1, gmock_a2, gmock_a3, \
434 gmock_a4); \ 434 gmock_a4); \
435 } \ 435 } \
436 mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(4, constness, Method) 436 mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(4, constness, Method)
437 437
438 // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! 438 // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
439 #define GMOCK_METHOD5_(tn, constness, ct, Method, F) \ 439 #define GMOCK_METHOD5_(tn, constness, ct, Method, F) \
440 GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \ 440 GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \
441 GMOCK_ARG_(tn, F, 2) gmock_a2, \ 441 GMOCK_ARG_(tn, F, 2) gmock_a2, \
442 GMOCK_ARG_(tn, F, 3) gmock_a3, \ 442 GMOCK_ARG_(tn, F, 3) gmock_a3, \
443 GMOCK_ARG_(tn, F, 4) gmock_a4, \ 443 GMOCK_ARG_(tn, F, 4) gmock_a4, \
444 GMOCK_ARG_(tn, F, 5) gmock_a5) constness { \ 444 GMOCK_ARG_(tn, F, 5) gmock_a5) constness { \
445 GMOCK_COMPILE_ASSERT_(::std::tr1::tuple_size< \ 445 GTEST_COMPILE_ASSERT_(::std::tr1::tuple_size< \
446 tn ::testing::internal::Function<F>::ArgumentTuple>::value == 5, \ 446 tn ::testing::internal::Function<F>::ArgumentTuple>::value == 5, \
447 this_method_does_not_take_5_arguments); \ 447 this_method_does_not_take_5_arguments); \
448 GMOCK_MOCKER_(5, constness, Method).SetOwnerAndName(this, #Method); \ 448 GMOCK_MOCKER_(5, constness, Method).SetOwnerAndName(this, #Method); \
449 return GMOCK_MOCKER_(5, constness, Method).Invoke(gmock_a1, gmock_a2, \ 449 return GMOCK_MOCKER_(5, constness, Method).Invoke(gmock_a1, gmock_a2, \
450 gmock_a3, gmock_a4, gmock_a5); \ 450 gmock_a3, gmock_a4, gmock_a5); \
451 } \ 451 } \
452 ::testing::MockSpec<F>& \ 452 ::testing::MockSpec<F>& \
453 gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \ 453 gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \
454 GMOCK_MATCHER_(tn, F, 2) gmock_a2, \ 454 GMOCK_MATCHER_(tn, F, 2) gmock_a2, \
455 GMOCK_MATCHER_(tn, F, 3) gmock_a3, \ 455 GMOCK_MATCHER_(tn, F, 3) gmock_a3, \
456 GMOCK_MATCHER_(tn, F, 4) gmock_a4, \ 456 GMOCK_MATCHER_(tn, F, 4) gmock_a4, \
457 GMOCK_MATCHER_(tn, F, 5) gmock_a5) constness { \ 457 GMOCK_MATCHER_(tn, F, 5) gmock_a5) constness { \
458 return GMOCK_MOCKER_(5, constness, \ 458 return GMOCK_MOCKER_(5, constness, \
459 Method).RegisterOwner(this).With(gmock_a1, gmock_a2, gmock_a3, \ 459 Method).RegisterOwner(this).With(gmock_a1, gmock_a2, gmock_a3, \
460 gmock_a4, gmock_a5); \ 460 gmock_a4, gmock_a5); \
461 } \ 461 } \
462 mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(5, constness, Method) 462 mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(5, constness, Method)
463 463
464 // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! 464 // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
465 #define GMOCK_METHOD6_(tn, constness, ct, Method, F) \ 465 #define GMOCK_METHOD6_(tn, constness, ct, Method, F) \
466 GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \ 466 GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \
467 GMOCK_ARG_(tn, F, 2) gmock_a2, \ 467 GMOCK_ARG_(tn, F, 2) gmock_a2, \
468 GMOCK_ARG_(tn, F, 3) gmock_a3, \ 468 GMOCK_ARG_(tn, F, 3) gmock_a3, \
469 GMOCK_ARG_(tn, F, 4) gmock_a4, \ 469 GMOCK_ARG_(tn, F, 4) gmock_a4, \
470 GMOCK_ARG_(tn, F, 5) gmock_a5, \ 470 GMOCK_ARG_(tn, F, 5) gmock_a5, \
471 GMOCK_ARG_(tn, F, 6) gmock_a6) constness { \ 471 GMOCK_ARG_(tn, F, 6) gmock_a6) constness { \
472 GMOCK_COMPILE_ASSERT_(::std::tr1::tuple_size< \ 472 GTEST_COMPILE_ASSERT_(::std::tr1::tuple_size< \
473 tn ::testing::internal::Function<F>::ArgumentTuple>::value == 6, \ 473 tn ::testing::internal::Function<F>::ArgumentTuple>::value == 6, \
474 this_method_does_not_take_6_arguments); \ 474 this_method_does_not_take_6_arguments); \
475 GMOCK_MOCKER_(6, constness, Method).SetOwnerAndName(this, #Method); \ 475 GMOCK_MOCKER_(6, constness, Method).SetOwnerAndName(this, #Method); \
476 return GMOCK_MOCKER_(6, constness, Method).Invoke(gmock_a1, gmock_a2, \ 476 return GMOCK_MOCKER_(6, constness, Method).Invoke(gmock_a1, gmock_a2, \
477 gmock_a3, gmock_a4, gmock_a5, gmock_a6); \ 477 gmock_a3, gmock_a4, gmock_a5, gmock_a6); \
478 } \ 478 } \
479 ::testing::MockSpec<F>& \ 479 ::testing::MockSpec<F>& \
480 gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \ 480 gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \
481 GMOCK_MATCHER_(tn, F, 2) gmock_a2, \ 481 GMOCK_MATCHER_(tn, F, 2) gmock_a2, \
482 GMOCK_MATCHER_(tn, F, 3) gmock_a3, \ 482 GMOCK_MATCHER_(tn, F, 3) gmock_a3, \
483 GMOCK_MATCHER_(tn, F, 4) gmock_a4, \ 483 GMOCK_MATCHER_(tn, F, 4) gmock_a4, \
484 GMOCK_MATCHER_(tn, F, 5) gmock_a5, \ 484 GMOCK_MATCHER_(tn, F, 5) gmock_a5, \
485 GMOCK_MATCHER_(tn, F, 6) gmock_a6) constness { \ 485 GMOCK_MATCHER_(tn, F, 6) gmock_a6) constness { \
486 return GMOCK_MOCKER_(6, constness, \ 486 return GMOCK_MOCKER_(6, constness, \
487 Method).RegisterOwner(this).With(gmock_a1, gmock_a2, gmock_a3, \ 487 Method).RegisterOwner(this).With(gmock_a1, gmock_a2, gmock_a3, \
488 gmock_a4, gmock_a5, gmock_a6); \ 488 gmock_a4, gmock_a5, gmock_a6); \
489 } \ 489 } \
490 mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(6, constness, Method) 490 mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(6, constness, Method)
491 491
492 // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! 492 // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
493 #define GMOCK_METHOD7_(tn, constness, ct, Method, F) \ 493 #define GMOCK_METHOD7_(tn, constness, ct, Method, F) \
494 GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \ 494 GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \
495 GMOCK_ARG_(tn, F, 2) gmock_a2, \ 495 GMOCK_ARG_(tn, F, 2) gmock_a2, \
496 GMOCK_ARG_(tn, F, 3) gmock_a3, \ 496 GMOCK_ARG_(tn, F, 3) gmock_a3, \
497 GMOCK_ARG_(tn, F, 4) gmock_a4, \ 497 GMOCK_ARG_(tn, F, 4) gmock_a4, \
498 GMOCK_ARG_(tn, F, 5) gmock_a5, \ 498 GMOCK_ARG_(tn, F, 5) gmock_a5, \
499 GMOCK_ARG_(tn, F, 6) gmock_a6, \ 499 GMOCK_ARG_(tn, F, 6) gmock_a6, \
500 GMOCK_ARG_(tn, F, 7) gmock_a7) constness { \ 500 GMOCK_ARG_(tn, F, 7) gmock_a7) constness { \
501 GMOCK_COMPILE_ASSERT_(::std::tr1::tuple_size< \ 501 GTEST_COMPILE_ASSERT_(::std::tr1::tuple_size< \
502 tn ::testing::internal::Function<F>::ArgumentTuple>::value == 7, \ 502 tn ::testing::internal::Function<F>::ArgumentTuple>::value == 7, \
503 this_method_does_not_take_7_arguments); \ 503 this_method_does_not_take_7_arguments); \
504 GMOCK_MOCKER_(7, constness, Method).SetOwnerAndName(this, #Method); \ 504 GMOCK_MOCKER_(7, constness, Method).SetOwnerAndName(this, #Method); \
505 return GMOCK_MOCKER_(7, constness, Method).Invoke(gmock_a1, gmock_a2, \ 505 return GMOCK_MOCKER_(7, constness, Method).Invoke(gmock_a1, gmock_a2, \
506 gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7); \ 506 gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7); \
507 } \ 507 } \
508 ::testing::MockSpec<F>& \ 508 ::testing::MockSpec<F>& \
509 gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \ 509 gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \
510 GMOCK_MATCHER_(tn, F, 2) gmock_a2, \ 510 GMOCK_MATCHER_(tn, F, 2) gmock_a2, \
511 GMOCK_MATCHER_(tn, F, 3) gmock_a3, \ 511 GMOCK_MATCHER_(tn, F, 3) gmock_a3, \
(...skipping 10 matching lines...) Expand all
522 // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! 522 // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
523 #define GMOCK_METHOD8_(tn, constness, ct, Method, F) \ 523 #define GMOCK_METHOD8_(tn, constness, ct, Method, F) \
524 GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \ 524 GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \
525 GMOCK_ARG_(tn, F, 2) gmock_a2, \ 525 GMOCK_ARG_(tn, F, 2) gmock_a2, \
526 GMOCK_ARG_(tn, F, 3) gmock_a3, \ 526 GMOCK_ARG_(tn, F, 3) gmock_a3, \
527 GMOCK_ARG_(tn, F, 4) gmock_a4, \ 527 GMOCK_ARG_(tn, F, 4) gmock_a4, \
528 GMOCK_ARG_(tn, F, 5) gmock_a5, \ 528 GMOCK_ARG_(tn, F, 5) gmock_a5, \
529 GMOCK_ARG_(tn, F, 6) gmock_a6, \ 529 GMOCK_ARG_(tn, F, 6) gmock_a6, \
530 GMOCK_ARG_(tn, F, 7) gmock_a7, \ 530 GMOCK_ARG_(tn, F, 7) gmock_a7, \
531 GMOCK_ARG_(tn, F, 8) gmock_a8) constness { \ 531 GMOCK_ARG_(tn, F, 8) gmock_a8) constness { \
532 GMOCK_COMPILE_ASSERT_(::std::tr1::tuple_size< \ 532 GTEST_COMPILE_ASSERT_(::std::tr1::tuple_size< \
533 tn ::testing::internal::Function<F>::ArgumentTuple>::value == 8, \ 533 tn ::testing::internal::Function<F>::ArgumentTuple>::value == 8, \
534 this_method_does_not_take_8_arguments); \ 534 this_method_does_not_take_8_arguments); \
535 GMOCK_MOCKER_(8, constness, Method).SetOwnerAndName(this, #Method); \ 535 GMOCK_MOCKER_(8, constness, Method).SetOwnerAndName(this, #Method); \
536 return GMOCK_MOCKER_(8, constness, Method).Invoke(gmock_a1, gmock_a2, \ 536 return GMOCK_MOCKER_(8, constness, Method).Invoke(gmock_a1, gmock_a2, \
537 gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8); \ 537 gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8); \
538 } \ 538 } \
539 ::testing::MockSpec<F>& \ 539 ::testing::MockSpec<F>& \
540 gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \ 540 gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \
541 GMOCK_MATCHER_(tn, F, 2) gmock_a2, \ 541 GMOCK_MATCHER_(tn, F, 2) gmock_a2, \
542 GMOCK_MATCHER_(tn, F, 3) gmock_a3, \ 542 GMOCK_MATCHER_(tn, F, 3) gmock_a3, \
(...skipping 12 matching lines...) Expand all
555 #define GMOCK_METHOD9_(tn, constness, ct, Method, F) \ 555 #define GMOCK_METHOD9_(tn, constness, ct, Method, F) \
556 GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \ 556 GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \
557 GMOCK_ARG_(tn, F, 2) gmock_a2, \ 557 GMOCK_ARG_(tn, F, 2) gmock_a2, \
558 GMOCK_ARG_(tn, F, 3) gmock_a3, \ 558 GMOCK_ARG_(tn, F, 3) gmock_a3, \
559 GMOCK_ARG_(tn, F, 4) gmock_a4, \ 559 GMOCK_ARG_(tn, F, 4) gmock_a4, \
560 GMOCK_ARG_(tn, F, 5) gmock_a5, \ 560 GMOCK_ARG_(tn, F, 5) gmock_a5, \
561 GMOCK_ARG_(tn, F, 6) gmock_a6, \ 561 GMOCK_ARG_(tn, F, 6) gmock_a6, \
562 GMOCK_ARG_(tn, F, 7) gmock_a7, \ 562 GMOCK_ARG_(tn, F, 7) gmock_a7, \
563 GMOCK_ARG_(tn, F, 8) gmock_a8, \ 563 GMOCK_ARG_(tn, F, 8) gmock_a8, \
564 GMOCK_ARG_(tn, F, 9) gmock_a9) constness { \ 564 GMOCK_ARG_(tn, F, 9) gmock_a9) constness { \
565 GMOCK_COMPILE_ASSERT_(::std::tr1::tuple_size< \ 565 GTEST_COMPILE_ASSERT_(::std::tr1::tuple_size< \
566 tn ::testing::internal::Function<F>::ArgumentTuple>::value == 9, \ 566 tn ::testing::internal::Function<F>::ArgumentTuple>::value == 9, \
567 this_method_does_not_take_9_arguments); \ 567 this_method_does_not_take_9_arguments); \
568 GMOCK_MOCKER_(9, constness, Method).SetOwnerAndName(this, #Method); \ 568 GMOCK_MOCKER_(9, constness, Method).SetOwnerAndName(this, #Method); \
569 return GMOCK_MOCKER_(9, constness, Method).Invoke(gmock_a1, gmock_a2, \ 569 return GMOCK_MOCKER_(9, constness, Method).Invoke(gmock_a1, gmock_a2, \
570 gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, \ 570 gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, \
571 gmock_a9); \ 571 gmock_a9); \
572 } \ 572 } \
573 ::testing::MockSpec<F>& \ 573 ::testing::MockSpec<F>& \
574 gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \ 574 gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \
575 GMOCK_MATCHER_(tn, F, 2) gmock_a2, \ 575 GMOCK_MATCHER_(tn, F, 2) gmock_a2, \
(...skipping 15 matching lines...) Expand all
591 GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \ 591 GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \
592 GMOCK_ARG_(tn, F, 2) gmock_a2, \ 592 GMOCK_ARG_(tn, F, 2) gmock_a2, \
593 GMOCK_ARG_(tn, F, 3) gmock_a3, \ 593 GMOCK_ARG_(tn, F, 3) gmock_a3, \
594 GMOCK_ARG_(tn, F, 4) gmock_a4, \ 594 GMOCK_ARG_(tn, F, 4) gmock_a4, \
595 GMOCK_ARG_(tn, F, 5) gmock_a5, \ 595 GMOCK_ARG_(tn, F, 5) gmock_a5, \
596 GMOCK_ARG_(tn, F, 6) gmock_a6, \ 596 GMOCK_ARG_(tn, F, 6) gmock_a6, \
597 GMOCK_ARG_(tn, F, 7) gmock_a7, \ 597 GMOCK_ARG_(tn, F, 7) gmock_a7, \
598 GMOCK_ARG_(tn, F, 8) gmock_a8, \ 598 GMOCK_ARG_(tn, F, 8) gmock_a8, \
599 GMOCK_ARG_(tn, F, 9) gmock_a9, \ 599 GMOCK_ARG_(tn, F, 9) gmock_a9, \
600 GMOCK_ARG_(tn, F, 10) gmock_a10) constness { \ 600 GMOCK_ARG_(tn, F, 10) gmock_a10) constness { \
601 GMOCK_COMPILE_ASSERT_(::std::tr1::tuple_size< \ 601 GTEST_COMPILE_ASSERT_(::std::tr1::tuple_size< \
602 tn ::testing::internal::Function<F>::ArgumentTuple>::value == 10, \ 602 tn ::testing::internal::Function<F>::ArgumentTuple>::value == 10, \
603 this_method_does_not_take_10_arguments); \ 603 this_method_does_not_take_10_arguments); \
604 GMOCK_MOCKER_(10, constness, Method).SetOwnerAndName(this, #Method); \ 604 GMOCK_MOCKER_(10, constness, Method).SetOwnerAndName(this, #Method); \
605 return GMOCK_MOCKER_(10, constness, Method).Invoke(gmock_a1, gmock_a2, \ 605 return GMOCK_MOCKER_(10, constness, Method).Invoke(gmock_a1, gmock_a2, \
606 gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, gmock_a9, \ 606 gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, gmock_a9, \
607 gmock_a10); \ 607 gmock_a10); \
608 } \ 608 } \
609 ::testing::MockSpec<F>& \ 609 ::testing::MockSpec<F>& \
610 gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \ 610 gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \
611 GMOCK_MATCHER_(tn, F, 2) gmock_a2, \ 611 GMOCK_MATCHER_(tn, F, 2) gmock_a2, \
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
915 915
916 MOCK_METHOD10_T(Call, R(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9)); 916 MOCK_METHOD10_T(Call, R(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9));
917 917
918 private: 918 private:
919 GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction); 919 GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction);
920 }; 920 };
921 921
922 } // namespace testing 922 } // namespace testing
923 923
924 #endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_ 924 #endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_
OLDNEW
« no previous file with comments | « testing/gmock/include/gmock/gmock-actions.h ('k') | testing/gmock/include/gmock/gmock-generated-function-mockers.h.pump » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698