diff options
Diffstat (limited to 'googlemock/test')
-rw-r--r-- | googlemock/test/gmock-internal-utils_test.cc | 1 | ||||
-rw-r--r-- | googlemock/test/gmock-matchers_test.cc | 10 | ||||
-rw-r--r-- | googlemock/test/gmock-more-actions_test.cc | 1 |
3 files changed, 10 insertions, 2 deletions
diff --git a/googlemock/test/gmock-internal-utils_test.cc b/googlemock/test/gmock-internal-utils_test.cc index d000e692..19ba6fe5 100644 --- a/googlemock/test/gmock-internal-utils_test.cc +++ b/googlemock/test/gmock-internal-utils_test.cc @@ -40,7 +40,6 @@ #include <memory> #include <sstream> #include <string> -#include <type_traits> #include <vector> #include "gmock/gmock.h" diff --git a/googlemock/test/gmock-matchers_test.cc b/googlemock/test/gmock-matchers_test.cc index 88f144d1..03735267 100644 --- a/googlemock/test/gmock-matchers_test.cc +++ b/googlemock/test/gmock-matchers_test.cc @@ -4318,6 +4318,16 @@ TEST(ResultOfTest, WorksForLambdas) { EXPECT_FALSE(matcher.Matches(1)); } +TEST(ResultOfTest, WorksForNonCopyableArguments) { + Matcher<std::unique_ptr<int>> matcher = ResultOf( + [](const std::unique_ptr<int>& str_len) { + return std::string(static_cast<size_t>(*str_len), 'x'); + }, + "xxx"); + EXPECT_TRUE(matcher.Matches(std::unique_ptr<int>(new int(3)))); + EXPECT_FALSE(matcher.Matches(std::unique_ptr<int>(new int(1)))); +} + const int* ReferencingFunction(const int& n) { return &n; } struct ReferencingFunctor { diff --git a/googlemock/test/gmock-more-actions_test.cc b/googlemock/test/gmock-more-actions_test.cc index b4e0fc30..97ec5cf0 100644 --- a/googlemock/test/gmock-more-actions_test.cc +++ b/googlemock/test/gmock-more-actions_test.cc @@ -57,7 +57,6 @@ using testing::ReturnPointee; using testing::SaveArg; using testing::SaveArgPointee; using testing::SetArgReferee; -using testing::StaticAssertTypeEq; using testing::Unused; using testing::WithArg; using testing::WithoutArgs; |