aboutsummaryrefslogtreecommitdiffstats
path: root/test/gmock-more-actions_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/gmock-more-actions_test.cc')
-rw-r--r--test/gmock-more-actions_test.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/gmock-more-actions_test.cc b/test/gmock-more-actions_test.cc
index b3b17d33..be7b1273 100644
--- a/test/gmock-more-actions_test.cc
+++ b/test/gmock-more-actions_test.cc
@@ -57,6 +57,7 @@ using testing::DeleteArg;
using testing::Invoke;
using testing::Return;
using testing::ReturnArg;
+using testing::ReturnPointee;
using testing::SaveArg;
using testing::SetArgReferee;
using testing::SetArgumentPointee;
@@ -664,5 +665,14 @@ TEST(SetArrayArgumentTest, SetsTheNthArrayWithIteratorArgument) {
EXPECT_EQ(letters, s);
}
+TEST(ReturnPointeeTest, Works) {
+ int n = 42;
+ const Action<int()> a = ReturnPointee(&n);
+ EXPECT_EQ(42, a.Perform(make_tuple()));
+
+ n = 43;
+ EXPECT_EQ(43, a.Perform(make_tuple()));
+}
+
} // namespace gmock_generated_actions_test
} // namespace testing