From e3bd0981ca06e682bcd03659286d7a3267c4d999 Mon Sep 17 00:00:00 2001 From: "zhanyong.wan" Date: Sat, 3 Jul 2010 00:16:42 +0000 Subject: Implements ReturnPointee() and ReturnRefOfCopy(). --- include/gmock/gmock-more-actions.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/gmock/gmock-more-actions.h') diff --git a/include/gmock/gmock-more-actions.h b/include/gmock/gmock-more-actions.h index 6d686cd1..c60557e6 100644 --- a/include/gmock/gmock-more-actions.h +++ b/include/gmock/gmock-more-actions.h @@ -195,6 +195,9 @@ ACTION_TEMPLATE(DeleteArg, delete ::std::tr1::get(args); } +// This action returns the value pointed to by 'pointer'. +ACTION_P(ReturnPointee, pointer) { return *pointer; } + // Action Throw(exception) can be used in a mock function of any type // to throw the given exception. Any copyable value can be thrown. #if GTEST_HAS_EXCEPTIONS -- cgit v1.2.3