diff options
author | Abseil Team <absl-team@google.com> | 2019-04-01 16:06:49 (GMT) |
---|---|---|
committer | Gennadiy Civil <misterg@google.com> | 2019-04-01 19:05:10 (GMT) |
commit | d9825431313a8ce466489cfc19f93820aee319ee (patch) | |
tree | 1e990b270e58ee75ca914c08eb7e0bcbb711737d /googlemock/include | |
parent | 5b752b1947bbb4df571848a1afad00f9b06f30e0 (diff) | |
download | googletest-d9825431313a8ce466489cfc19f93820aee319ee.zip googletest-d9825431313a8ce466489cfc19f93820aee319ee.tar.gz googletest-d9825431313a8ce466489cfc19f93820aee319ee.tar.bz2 |
Googletest export
Remove support for "global" ::string and ::wstring types.
This support existed for legacy codebases that existed from before namespaces
where a thing. It is no longer necessary.
PiperOrigin-RevId: 241335738
Diffstat (limited to 'googlemock/include')
-rw-r--r-- | googlemock/include/gmock/gmock-actions.h | 3 | ||||
-rw-r--r-- | googlemock/include/gmock/gmock-matchers.h | 12 |
2 files changed, 6 insertions, 9 deletions
diff --git a/googlemock/include/gmock/gmock-actions.h b/googlemock/include/gmock/gmock-actions.h index 8513e01..37727c0 100644 --- a/googlemock/include/gmock/gmock-actions.h +++ b/googlemock/include/gmock/gmock-actions.h @@ -139,9 +139,6 @@ class BuiltInDefaultValue<T*> { } GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(void, ); // NOLINT -#if GTEST_HAS_GLOBAL_STRING -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(::string, ""); -#endif // GTEST_HAS_GLOBAL_STRING GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(::std::string, ""); GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(bool, false); GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned char, '\0'); diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h index fa24fd2..3e4ee40 100644 --- a/googlemock/include/gmock/gmock-matchers.h +++ b/googlemock/include/gmock/gmock-matchers.h @@ -661,7 +661,7 @@ class StrEqualityMatcher { MatchResultListener* listener) const { // This should fail to compile if absl::string_view is used with wide // strings. - const StringType& str = string(s); + const StringType& str = std::string(s); return MatchAndExplain(str, listener); } #endif // GTEST_HAS_ABSL @@ -731,7 +731,7 @@ class HasSubstrMatcher { MatchResultListener* listener) const { // This should fail to compile if absl::string_view is used with wide // strings. - const StringType& str = string(s); + const StringType& str = std::string(s); return MatchAndExplain(str, listener); } #endif // GTEST_HAS_ABSL @@ -788,7 +788,7 @@ class StartsWithMatcher { MatchResultListener* listener) const { // This should fail to compile if absl::string_view is used with wide // strings. - const StringType& str = string(s); + const StringType& str = std::string(s); return MatchAndExplain(str, listener); } #endif // GTEST_HAS_ABSL @@ -844,7 +844,7 @@ class EndsWithMatcher { MatchResultListener* listener) const { // This should fail to compile if absl::string_view is used with wide // strings. - const StringType& str = string(s); + const StringType& str = std::string(s); return MatchAndExplain(str, listener); } #endif // GTEST_HAS_ABSL @@ -3852,7 +3852,7 @@ inline PolymorphicMatcher<internal::EndsWithMatcher<std::string> > EndsWith( return MakePolymorphicMatcher(internal::EndsWithMatcher<std::string>(suffix)); } -#if GTEST_HAS_GLOBAL_WSTRING || GTEST_HAS_STD_WSTRING +#if GTEST_HAS_STD_WSTRING // Wide string matchers. // Matches a string equal to str. @@ -3905,7 +3905,7 @@ inline PolymorphicMatcher<internal::EndsWithMatcher<std::wstring> > EndsWith( internal::EndsWithMatcher<std::wstring>(suffix)); } -#endif // GTEST_HAS_GLOBAL_WSTRING || GTEST_HAS_STD_WSTRING +#endif // GTEST_HAS_STD_WSTRING // Creates a polymorphic matcher that matches a 2-tuple where the // first field == the second field. |