From 52747821480e6cadd8b27a0947af5d7933f9dfb4 Mon Sep 17 00:00:00 2001 From: Andy Getzendanner Date: Tue, 23 May 2023 15:46:35 -0700 Subject: 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 --- absl/log/BUILD.bazel | 1 - absl/log/CMakeLists.txt | 1 - absl/log/log_sink_test.cc | 3 +-- 3 files changed, 1 insertion(+), 4 deletions(-) (limited to 'absl/log') 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(mode_)); + LOG(FATAL) << "Invalid mode " << static_cast(mode_); } } -- cgit v1.2.3