diff --git a/BUILD.bazel b/BUILD.bazel index 91dd3b74..6d828294 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -104,6 +104,7 @@ cc_library( deps = select ({ ":has_absl": [ "@com_google_absl//absl/types:optional", + "@com_google_absl//absl/strings" ], "//conditions:default": [], } diff --git a/ci/build-linux-bazel.sh b/ci/build-linux-bazel.sh index 2f63896a..3f1c7849 100755 --- a/ci/build-linux-bazel.sh +++ b/ci/build-linux-bazel.sh @@ -33,3 +33,4 @@ set -e bazel build --curses=no //...:all bazel test --curses=no //...:all +bazel test --curses=no //...:all --define absl=1 diff --git a/googletest/include/gtest/gtest-printers.h b/googletest/include/gtest/gtest-printers.h index fa7da7ee..4deaad05 100644 --- a/googletest/include/gtest/gtest-printers.h +++ b/googletest/include/gtest/gtest-printers.h @@ -113,6 +113,7 @@ #if GTEST_HAS_ABSL #include "absl/types/optional.h" +#include "absl/strings/string_view.h" #endif // GTEST_HAS_ABSL namespace testing { @@ -629,7 +630,7 @@ inline void PrintTo(const ::std::wstring& s, ::std::ostream* os) { #if GTEST_HAS_ABSL // Overload for absl::string_view. inline void PrintTo(absl::string_view sp, ::std::ostream* os) { - PrintTo(string(sp), os); + PrintTo(::std::string(sp), os); } #endif // GTEST_HAS_ABSL