aboutsummaryrefslogtreecommitdiffstats
path: root/include/gmock/gmock-more-actions.h
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@8415998a-534a-0410-bf83-d39667b30386>2010-07-03 00:16:42 +0000
committerzhanyong.wan <zhanyong.wan@8415998a-534a-0410-bf83-d39667b30386>2010-07-03 00:16:42 +0000
commite3bd0981ca06e682bcd03659286d7a3267c4d999 (patch)
treef5d9cad74e0398f6b18613220b5c7b0c52464a0d /include/gmock/gmock-more-actions.h
parent02c1505ebfaadbc34b4cb85546796521d6f0e634 (diff)
downloadgoogletest-e3bd0981ca06e682bcd03659286d7a3267c4d999.tar.gz
googletest-e3bd0981ca06e682bcd03659286d7a3267c4d999.tar.bz2
googletest-e3bd0981ca06e682bcd03659286d7a3267c4d999.zip
Implements ReturnPointee() and ReturnRefOfCopy().
Diffstat (limited to 'include/gmock/gmock-more-actions.h')
-rw-r--r--include/gmock/gmock-more-actions.h3
1 files changed, 3 insertions, 0 deletions
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<k>(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