diff options
| author | Abseil Team <absl-team@google.com> | 2018-11-20 10:39:44 -0500 | 
|---|---|---|
| committer | Gennadiy Civil <misterg@google.com> | 2018-11-20 13:30:24 -0500 | 
| commit | f7779eb3cb5d70387c747b9e4b7a1c839e1e1856 (patch) | |
| tree | 0914963209da527969b74b8aa185921e01059d0d /googlemock/test/gmock-pp-string_test.cc | |
| parent | 64368e0584e03bac626a1a431afe2982117a6e17 (diff) | |
| download | googletest-f7779eb3cb5d70387c747b9e4b7a1c839e1e1856.tar.gz googletest-f7779eb3cb5d70387c747b9e4b7a1c839e1e1856.tar.bz2 googletest-f7779eb3cb5d70387c747b9e4b7a1c839e1e1856.zip  | |
Googletest export
Remove unintended dependency.
PiperOrigin-RevId: 222243874
Diffstat (limited to 'googlemock/test/gmock-pp-string_test.cc')
| -rw-r--r-- | googlemock/test/gmock-pp-string_test.cc | 12 | 
1 files changed, 7 insertions, 5 deletions
diff --git a/googlemock/test/gmock-pp-string_test.cc b/googlemock/test/gmock-pp-string_test.cc index 4147a844..6f66cf15 100644 --- a/googlemock/test/gmock-pp-string_test.cc +++ b/googlemock/test/gmock-pp-string_test.cc @@ -32,8 +32,8 @@  // This file tests the internal preprocessor macro library.  #include "gmock/internal/gmock-pp.h" -#include "absl/strings/str_join.h" -#include "absl/strings/str_split.h" +#include <string> +  #include "gmock/gmock.h"  namespace testing { @@ -41,9 +41,11 @@ namespace {  // Matcher to verify that to strings are identical up to whitespace  // Not 100% correct, because it treats "AB" as equal to "A B". -::testing::Matcher<string> SameExceptSpaces(absl::string_view s) { -  auto remove_spaces = [](const absl::string_view& to_split) { -    return absl::StrJoin(absl::StrSplit(to_split, ' '), ""); +::testing::Matcher<const std::string&> SameExceptSpaces(const std::string& s) { +  auto remove_spaces = [](std::string to_split) { +    to_split.erase(std::remove(to_split.begin(), to_split.end(), ' '), +                   to_split.end()); +    return to_split;    };    return ::testing::ResultOf(remove_spaces, remove_spaces(s));  }  | 
