Use googletest flag macros to access googletest flags.

The implementation details of flags can change; fixing this proactively
makes it easier to roll googletest in chromium.

Bug: chromium:1409870
Change-Id: Ib27a922a5b3147386a36f98b42e60950e2215190
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/5081703
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
This commit is contained in:
Daniel Cheng 2023-12-02 14:38:59 -08:00 committed by Crashpad LUCI CQ
parent 5613499bbd
commit 5fc60aeb3b
2 changed files with 2 additions and 2 deletions

View File

@ -157,7 +157,7 @@ class TestMultiprocessClosePipe final : public Multiprocess {
who_closes_(who_closes),
what_closes_(what_closes) {
// Fails under "threadsafe" mode on macOS 10.11.
testing::GTEST_FLAG(death_test_style) = "fast";
GTEST_FLAG_SET(death_test_style, "fast");
}
TestMultiprocessClosePipe(const TestMultiprocessClosePipe&) = delete;

View File

@ -23,7 +23,7 @@ namespace test {
namespace {
TEST(ScopedGuardedPage, BasicFunctionality) {
::testing::FLAGS_gtest_death_test_style = "threadsafe";
GTEST_FLAG_SET(death_test_style, "threadsafe");
ScopedGuardedPage page;
char* address = (char*)page.Pointer();