diff options
author | Andy Getzendanner <durandal@google.com> | 2023-05-23 15:46:35 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-05-23 15:47:23 -0700 |
commit | 52747821480e6cadd8b27a0947af5d7933f9dfb4 (patch) | |
tree | cc42f6dc30fa8eca19047efd799c769ead59b6c4 /absl/log | |
parent | 79ca5d7aad63973c83a4962a66ab07cd623131ea (diff) |
Migrate most RAW_LOGs and RAW_CHECKs in tests to regular LOG and CHECK.
The non-RAW_ versions provide better output but weren't available when most of these tests were written.
There are just a couple spots where RAW_ is actually needed, e.g. signal handlers and malloc hooks.
Also fix a couple warnings in layout_test.cc newly surfaced because the optimizer understands CHECK_XX differently than INTERNAL_CHECK.
PiperOrigin-RevId: 534584435
Change-Id: I8d36fa809ffdaae5a3813064bd602cb8611c1613
Diffstat (limited to 'absl/log')
-rw-r--r-- | absl/log/BUILD.bazel | 1 | ||||
-rw-r--r-- | absl/log/CMakeLists.txt | 1 | ||||
-rw-r--r-- | absl/log/log_sink_test.cc | 3 |
3 files changed, 1 insertions, 4 deletions
diff --git a/absl/log/BUILD.bazel b/absl/log/BUILD.bazel index 560f6c44..e1410637 100644 --- a/absl/log/BUILD.bazel +++ b/absl/log/BUILD.bazel @@ -459,7 +459,6 @@ cc_test( ":log_sink_registry", ":scoped_mock_log", "//absl/base:core_headers", - "//absl/base:raw_logging_internal", "//absl/log/internal:test_actions", "//absl/log/internal:test_helpers", "//absl/log/internal:test_matchers", diff --git a/absl/log/CMakeLists.txt b/absl/log/CMakeLists.txt index 2990984f..9320ce59 100644 --- a/absl/log/CMakeLists.txt +++ b/absl/log/CMakeLists.txt @@ -905,7 +905,6 @@ absl_cc_test( absl::log_sink absl::log_sink_registry absl::log_severity - absl::raw_logging_internal absl::scoped_mock_log absl::strings GTest::gtest_main diff --git a/absl/log/log_sink_test.cc b/absl/log/log_sink_test.cc index 8903da72..fa743060 100644 --- a/absl/log/log_sink_test.cc +++ b/absl/log/log_sink_test.cc @@ -18,7 +18,6 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" #include "absl/base/attributes.h" -#include "absl/base/internal/raw_logging.h" #include "absl/log/internal/test_actions.h" #include "absl/log/internal/test_helpers.h" #include "absl/log/internal/test_matchers.h" @@ -205,7 +204,7 @@ class ReentrancyTest : public ::testing::Test { << "The log is coming from *inside the sink*."; break; default: - ABSL_RAW_LOG(FATAL, "Invalid mode %d.\n", static_cast<int>(mode_)); + LOG(FATAL) << "Invalid mode " << static_cast<int>(mode_); } } |