diff options
Diffstat (limited to 'absl/base')
-rw-r--r-- | absl/base/BUILD.bazel | 1 | ||||
-rw-r--r-- | absl/base/CMakeLists.txt | 1 | ||||
-rw-r--r-- | absl/base/log_severity_test.cc | 5 |
3 files changed, 7 insertions, 0 deletions
diff --git a/absl/base/BUILD.bazel b/absl/base/BUILD.bazel index 9814e4200af4..c6948a272f35 100644 --- a/absl/base/BUILD.bazel +++ b/absl/base/BUILD.bazel @@ -675,6 +675,7 @@ cc_test( linkopts = ABSL_DEFAULT_LINKOPTS, deps = [ ":log_severity", + "//absl/flags:flag_internal", "//absl/flags:marshalling", "//absl/strings", "@com_google_googletest//:gtest_main", diff --git a/absl/base/CMakeLists.txt b/absl/base/CMakeLists.txt index 3ca985a910cc..c21571be9b8c 100644 --- a/absl/base/CMakeLists.txt +++ b/absl/base/CMakeLists.txt @@ -610,6 +610,7 @@ absl_cc_test( SRCS "log_severity_test.cc" DEPS + absl::flags_internal absl::flags_marshalling absl::log_severity absl::strings diff --git a/absl/base/log_severity_test.cc b/absl/base/log_severity_test.cc index 1e3aafa56619..2302aa12086a 100644 --- a/absl/base/log_severity_test.cc +++ b/absl/base/log_severity_test.cc @@ -24,6 +24,7 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" +#include "absl/flags/internal/flag.h" #include "absl/flags/marshalling.h" #include "absl/strings/str_cat.h" @@ -51,6 +52,10 @@ TEST(StreamTest, Works) { Eq("absl::LogSeverity(4)")); } +static_assert( + absl::flags_internal::IsAtomicFlagTypeTrait<absl::LogSeverity>::value, + "Flags of type absl::LogSeverity ought to be lock-free."); + using ParseFlagFromOutOfRangeIntegerTest = TestWithParam<int64_t>; INSTANTIATE_TEST_SUITE_P( Instantiation, ParseFlagFromOutOfRangeIntegerTest, |