diff options
author | Gennadiy Civil <gennadiycivil@users.noreply.github.com> | 2018-09-14 11:43:05 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-14 11:43:05 -0400 |
commit | 28c2989eeaa33f5642213ad884b9b9251a8b3875 (patch) | |
tree | 2e1a2f2b44cac26738457d767ddbdc3b6140308b /googlemock/include | |
parent | f46c174d1c885283543afa550b3690abe1825aa0 (diff) | |
parent | ffc9baeb4cb81a7db250249920a9bd3d5ace760a (diff) | |
download | googletest-28c2989eeaa33f5642213ad884b9b9251a8b3875.tar.gz googletest-28c2989eeaa33f5642213ad884b9b9251a8b3875.tar.bz2 googletest-28c2989eeaa33f5642213ad884b9b9251a8b3875.zip |
Merge pull request #1837 from google/9A681768AABE08D1EFA5CA77528236A4
Googletest export
Diffstat (limited to 'googlemock/include')
-rw-r--r-- | googlemock/include/gmock/gmock-matchers.h | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h index a7bcfc83..fa26bf9b 100644 --- a/googlemock/include/gmock/gmock-matchers.h +++ b/googlemock/include/gmock/gmock-matchers.h @@ -1307,9 +1307,6 @@ class StrEqualityMatcher { #if GTEST_HAS_ABSL bool MatchAndExplain(const absl::string_view& s, MatchResultListener* listener) const { - if (s.data() == NULL) { - return !expect_eq_; - } // This should fail to compile if absl::string_view is used with wide // strings. const StringType& str = string(s); @@ -1380,9 +1377,6 @@ class HasSubstrMatcher { #if GTEST_HAS_ABSL bool MatchAndExplain(const absl::string_view& s, MatchResultListener* listener) const { - if (s.data() == NULL) { - return false; - } // This should fail to compile if absl::string_view is used with wide // strings. const StringType& str = string(s); @@ -1440,9 +1434,6 @@ class StartsWithMatcher { #if GTEST_HAS_ABSL bool MatchAndExplain(const absl::string_view& s, MatchResultListener* listener) const { - if (s.data() == NULL) { - return false; - } // This should fail to compile if absl::string_view is used with wide // strings. const StringType& str = string(s); @@ -1499,9 +1490,6 @@ class EndsWithMatcher { #if GTEST_HAS_ABSL bool MatchAndExplain(const absl::string_view& s, MatchResultListener* listener) const { - if (s.data() == NULL) { - return false; - } // This should fail to compile if absl::string_view is used with wide // strings. const StringType& str = string(s); @@ -1558,7 +1546,7 @@ class MatchesRegexMatcher { #if GTEST_HAS_ABSL bool MatchAndExplain(const absl::string_view& s, MatchResultListener* listener) const { - return s.data() && MatchAndExplain(string(s), listener); + return MatchAndExplain(string(s), listener); } #endif // GTEST_HAS_ABSL |