summaryrefslogtreecommitdiffstats
path: root/googlemock/test/gmock-generated-actions_test.cc
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2018-10-25 02:04:43 (GMT)
committerGennadiy Civil <misterg@google.com>2018-10-26 18:19:59 (GMT)
commitb57c703963be1ca9749b902c49083beac56648aa (patch)
treeb7f5433fce3803d121c9963dc69bcdeec4d35f7c /googlemock/test/gmock-generated-actions_test.cc
parenta50e4f05b3d84c6a014c59a24263328242cc8236 (diff)
downloadgoogletest-b57c703963be1ca9749b902c49083beac56648aa.zip
googletest-b57c703963be1ca9749b902c49083beac56648aa.tar.gz
googletest-b57c703963be1ca9749b902c49083beac56648aa.tar.bz2
Googletest export
Remove linked_ptr and use std::shared_ptr instead PiperOrigin-RevId: 218618184
Diffstat (limited to 'googlemock/test/gmock-generated-actions_test.cc')
-rw-r--r--googlemock/test/gmock-generated-actions_test.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/googlemock/test/gmock-generated-actions_test.cc b/googlemock/test/gmock-generated-actions_test.cc
index 3111d85..2d663a5 100644
--- a/googlemock/test/gmock-generated-actions_test.cc
+++ b/googlemock/test/gmock-generated-actions_test.cc
@@ -35,7 +35,6 @@
#include "gmock/gmock-generated-actions.h"
#include <functional>
-#include <memory>
#include <sstream>
#include <string>
#include "gmock/gmock.h"
@@ -1130,9 +1129,9 @@ ACTION_TEMPLATE(ReturnSmartPointer,
}
TEST(ActionTemplateTest, WorksForTemplateTemplateParameters) {
- const Action<std::shared_ptr<int>()> a =
- ReturnSmartPointer<std::shared_ptr>(42);
- std::shared_ptr<int> p = a.Perform(std::make_tuple());
+ using ::testing::internal::linked_ptr;
+ const Action<linked_ptr<int>()> a = ReturnSmartPointer<linked_ptr>(42);
+ linked_ptr<int> p = a.Perform(std::make_tuple());
EXPECT_EQ(42, *p);
}
@@ -1162,10 +1161,11 @@ ACTION_TEMPLATE(ReturnGiant,
}
TEST(ActionTemplateTest, WorksFor10TemplateParameters) {
- using Giant = GiantTemplate<std::shared_ptr<int>, bool, double, 5, true, 6,
- char, unsigned, int>;
- const Action<Giant()> a = ReturnGiant<int, bool, double, 5, true, 6, char,
- unsigned, int, std::shared_ptr>(42);
+ using ::testing::internal::linked_ptr;
+ typedef GiantTemplate<linked_ptr<int>, bool, double, 5,
+ true, 6, char, unsigned, int> Giant;
+ const Action<Giant()> a = ReturnGiant<
+ int, bool, double, 5, true, 6, char, unsigned, int, linked_ptr>(42);
Giant giant = a.Perform(std::make_tuple());
EXPECT_EQ(42, giant.value);
}