diff options
Diffstat (limited to 'include/gmock/gmock-generated-actions.h')
-rw-r--r-- | include/gmock/gmock-generated-actions.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/gmock/gmock-generated-actions.h b/include/gmock/gmock-generated-actions.h index c0097175..06d9449e 100644 --- a/include/gmock/gmock-generated-actions.h +++ b/include/gmock/gmock-generated-actions.h @@ -2441,6 +2441,13 @@ ACTION_TEMPLATE(InvokeArgument, ::std::tr1::get<k>(args), p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); } +// Action ReturnArg<k>() returns the k-th argument of the mock function. +ACTION_TEMPLATE(ReturnArg, + HAS_1_TEMPLATE_PARAMS(int, k), + AND_0_VALUE_PARAMS()) { + return std::tr1::get<k>(args); +} + // Action SaveArg<k>(pointer) saves the k-th (0-based) argument of the // mock function to *pointer. ACTION_TEMPLATE(SaveArg, |