summaryrefslogtreecommitdiffstats
path: root/googlemock/test/gmock-matchers_test.cc
diff options
context:
space:
mode:
authormisterg <misterg@google.com>2018-10-24 21:02:11 (GMT)
committerGennadiy Civil <misterg@google.com>2018-10-26 18:19:51 (GMT)
commita50e4f05b3d84c6a014c59a24263328242cc8236 (patch)
tree6b262d5156f04387467abbc48b4e5e98ec94e382 /googlemock/test/gmock-matchers_test.cc
parent8ec8ce1c8a51076950bfa7a7886d95f4c8aed11b (diff)
downloadgoogletest-a50e4f05b3d84c6a014c59a24263328242cc8236.zip
googletest-a50e4f05b3d84c6a014c59a24263328242cc8236.tar.gz
googletest-a50e4f05b3d84c6a014c59a24263328242cc8236.tar.bz2
Googletest export
Remove linked_ptr and use std::shared_ptr instead PiperOrigin-RevId: 218571466
Diffstat (limited to 'googlemock/test/gmock-matchers_test.cc')
-rw-r--r--googlemock/test/gmock-matchers_test.cc32
1 files changed, 6 insertions, 26 deletions
diff --git a/googlemock/test/gmock-matchers_test.cc b/googlemock/test/gmock-matchers_test.cc
index f4e9e9f..45006bf 100644
--- a/googlemock/test/gmock-matchers_test.cc
+++ b/googlemock/test/gmock-matchers_test.cc
@@ -143,13 +143,11 @@ using testing::internal::ExplainMatchFailureTupleTo;
using testing::internal::FloatingEqMatcher;
using testing::internal::FormatMatcherDescription;
using testing::internal::IsReadableTypeName;
-using testing::internal::linked_ptr;
using testing::internal::MatchMatrix;
using testing::internal::RE;
using testing::internal::scoped_ptr;
using testing::internal::StreamMatchResultListener;
using testing::internal::Strings;
-using testing::internal::linked_ptr;
using testing::internal::scoped_ptr;
using testing::internal::string;
@@ -1177,24 +1175,6 @@ TEST(IsNullTest, MatchesNullPointer) {
#endif
}
-TEST(IsNullTest, LinkedPtr) {
- const Matcher<linked_ptr<int> > m = IsNull();
- const linked_ptr<int> null_p;
- const linked_ptr<int> non_null_p(new int);
-
- EXPECT_TRUE(m.Matches(null_p));
- EXPECT_FALSE(m.Matches(non_null_p));
-}
-
-TEST(IsNullTest, ReferenceToConstLinkedPtr) {
- const Matcher<const linked_ptr<double>&> m = IsNull();
- const linked_ptr<double> null_p;
- const linked_ptr<double> non_null_p(new double);
-
- EXPECT_TRUE(m.Matches(null_p));
- EXPECT_FALSE(m.Matches(non_null_p));
-}
-
#if GTEST_LANG_CXX11
TEST(IsNullTest, StdFunction) {
const Matcher<std::function<void()>> m = IsNull();
@@ -1226,18 +1206,18 @@ TEST(NotNullTest, MatchesNonNullPointer) {
}
TEST(NotNullTest, LinkedPtr) {
- const Matcher<linked_ptr<int> > m = NotNull();
- const linked_ptr<int> null_p;
- const linked_ptr<int> non_null_p(new int);
+ const Matcher<std::shared_ptr<int>> m = NotNull();
+ const std::shared_ptr<int> null_p;
+ const std::shared_ptr<int> non_null_p(new int);
EXPECT_FALSE(m.Matches(null_p));
EXPECT_TRUE(m.Matches(non_null_p));
}
TEST(NotNullTest, ReferenceToConstLinkedPtr) {
- const Matcher<const linked_ptr<double>&> m = NotNull();
- const linked_ptr<double> null_p;
- const linked_ptr<double> non_null_p(new double);
+ const Matcher<const std::shared_ptr<double>&> m = NotNull();
+ const std::shared_ptr<double> null_p;
+ const std::shared_ptr<double> non_null_p(new double);
EXPECT_FALSE(m.Matches(null_p));
EXPECT_TRUE(m.Matches(non_null_p));