summaryrefslogtreecommitdiff
path: root/absl/base
diff options
context:
space:
mode:
authorGravatar Andy Getzendanner <durandal@google.com>2023-12-21 12:00:50 -0800
committerGravatar Copybara-Service <copybara-worker@google.com>2023-12-21 12:01:50 -0800
commit8184f16e898fcb13b310b40430e13ba40679cf0e (patch)
tree2216371d4feb7f6e1bc3c1721764180872cfd0f9 /absl/base
parent258e5a15759cc3d122d4a4826bc499af91d40aa9 (diff)
Release a few bits and pieces of DFATAL that were left behind: flag parsing & some tests.
PiperOrigin-RevId: 592918704 Change-Id: Iacef0e069c012a04960211c032454244822f9634
Diffstat (limited to 'absl/base')
-rw-r--r--absl/base/internal/raw_logging.h2
-rw-r--r--absl/base/log_severity_test.cc10
2 files changed, 10 insertions, 2 deletions
diff --git a/absl/base/internal/raw_logging.h b/absl/base/internal/raw_logging.h
index b79550b2..d7cfbc57 100644
--- a/absl/base/internal/raw_logging.h
+++ b/absl/base/internal/raw_logging.h
@@ -108,6 +108,7 @@
#define ABSL_RAW_LOG_INTERNAL_WARNING ::absl::LogSeverity::kWarning
#define ABSL_RAW_LOG_INTERNAL_ERROR ::absl::LogSeverity::kError
#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
+#define ABSL_RAW_LOG_INTERNAL_DFATAL ::absl::kLogDebugFatal
#define ABSL_RAW_LOG_INTERNAL_LEVEL(severity) \
::absl::NormalizeLogSeverity(severity)
@@ -115,6 +116,7 @@
#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_WARNING
#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_ERROR
#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_FATAL ABSL_UNREACHABLE()
+#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_DFATAL
#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_LEVEL(severity)
namespace absl {
diff --git a/absl/base/log_severity_test.cc b/absl/base/log_severity_test.cc
index 16091a5b..3394ecd7 100644
--- a/absl/base/log_severity_test.cc
+++ b/absl/base/log_severity_test.cc
@@ -146,7 +146,12 @@ INSTANTIATE_TEST_SUITE_P(
std::make_tuple("fatal", absl::LogSeverity::kFatal),
std::make_tuple("kFatal", absl::LogSeverity::kFatal),
std::make_tuple("FaTaL", absl::LogSeverity::kFatal),
- std::make_tuple("KfAtAl", absl::LogSeverity::kFatal)));
+ std::make_tuple("KfAtAl", absl::LogSeverity::kFatal),
+ std::make_tuple("DFATAL", absl::kLogDebugFatal),
+ std::make_tuple("dfatal", absl::kLogDebugFatal),
+ std::make_tuple("kLogDebugFatal", absl::kLogDebugFatal),
+ std::make_tuple("dFaTaL", absl::kLogDebugFatal),
+ std::make_tuple("kLoGdEbUgFaTaL", absl::kLogDebugFatal)));
TEST_P(ParseFlagFromEnumeratorTest, YieldsExpectedValue) {
const absl::string_view to_parse = std::get<0>(GetParam());
const absl::LogSeverity expected = std::get<1>(GetParam());
@@ -158,7 +163,8 @@ TEST_P(ParseFlagFromEnumeratorTest, YieldsExpectedValue) {
using ParseFlagFromGarbageTest = TestWithParam<absl::string_view>;
INSTANTIATE_TEST_SUITE_P(Instantiation, ParseFlagFromGarbageTest,
- Values("", "\0", " ", "garbage", "kkinfo", "I"));
+ Values("", "\0", " ", "garbage", "kkinfo", "I",
+ "kDFATAL", "LogDebugFatal", "lOgDeBuGfAtAl"));
TEST_P(ParseFlagFromGarbageTest, ReturnsError) {
const absl::string_view to_parse = GetParam();
absl::LogSeverity value;