Export of internal Abseil changes

--
dea3e4f33f16bdb1d89cad1f8055b81c0c0cb554 by Andy Getzendanner <durandal@google.com>:

Validate in log_severity_test that flags of type absl::LogSeverity are lock-free.

PiperOrigin-RevId: 293454285

--
2a0cd2d8dc193a0cbff4ffa6c5c7037745507419 by Derek Mauro <dmauro@google.com>:

Update the testing instructions in CONTRIBUTING.md

PiperOrigin-RevId: 293436013

--
cec91c3f635b0b4c8a60955e5926dba4ed980898 by Gennadiy Rozental <rogeeff@google.com>:

Introduce struct to represent storage for flag value and normalize naming of internal structs in Flag implementation.

There is no semantic changes in this CL. All the internal structs are now named as Flag... We also stop using flags_internal:: qualifications for most of them since the names are unique enough by themselves.

PiperOrigin-RevId: 293251467
GitOrigin-RevId: dea3e4f33f16bdb1d89cad1f8055b81c0c0cb554
Change-Id: I161aecc9509edae3e4b77eead02df684b2ce7087
This commit is contained in:
Abseil Team 2020-02-05 14:38:00 -08:00 committed by Andy Getz
parent 08a7e7bf97
commit 72382c21fe
9 changed files with 356 additions and 321 deletions

View file

@ -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",

View file

@ -610,6 +610,7 @@ absl_cc_test(
SRCS
"log_severity_test.cc"
DEPS
absl::flags_internal
absl::flags_marshalling
absl::log_severity
absl::strings

View file

@ -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,