Googletest export

Introduce GTEST_FLAG_GET and GTEST_FLAG_SET macros.

PiperOrigin-RevId: 382808313
This commit is contained in:
Abseil Team
2021-07-02 17:01:11 -04:00
committed by Derek Mauro
parent 4cfd14984f
commit 977cffc442
21 changed files with 469 additions and 487 deletions

View File

@@ -440,7 +440,8 @@ TEST(LogTest, NoSkippingStackFrameInOptMode) {
const std::string log = GetCapturedStdout();
std::string expected_trace =
(testing::Message() << GTEST_FLAG(stack_trace_depth) << "::").GetString();
(testing::Message() << GTEST_FLAG_GET(stack_trace_depth) << "::")
.GetString();
std::string expected_message =
"\nGMOCK WARNING:\n"
"Test log.\n"

View File

@@ -6328,7 +6328,7 @@ TEST_P(BipartiteRandomTest, LargerNets) {
int iters = GetParam().second;
MatchMatrix graph(static_cast<size_t>(nodes), static_cast<size_t>(nodes));
auto seed = static_cast<uint32_t>(GTEST_FLAG(random_seed));
auto seed = static_cast<uint32_t>(GTEST_FLAG_GET(random_seed));
if (seed == 0) {
seed = static_cast<uint32_t>(time(nullptr));
}