From c22ce88775eaa364d085de7741a3625f3f0d5055 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Mon, 2 Aug 2021 06:19:40 -0400 Subject: [PATCH] Googletest export Standardize access to GoogleTest flags on GTEST_FLAG_GET/GTEST_FLAG_SET Custom implementations can decide how access to flags is performed depending on the implementation of flags being used. PiperOrigin-RevId: 388181424 --- docs/advanced.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/advanced.md b/docs/advanced.md index 34aacb6b..3d970dad 100644 --- a/docs/advanced.md +++ b/docs/advanced.md @@ -568,12 +568,12 @@ restored afterwards, so you need not do that yourself. For example: ```c++ int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - testing::FLAGS_gtest_death_test_style = "fast"; + GTEST_FLAG_SET(gtest_death_test_style, "fast"); return RUN_ALL_TESTS(); } TEST(MyDeathTest, TestOne) { - testing::FLAGS_gtest_death_test_style = "threadsafe"; + GTEST_FLAG_SET(gtest_death_test_style, "threadsafe"); // This test is run in the "threadsafe" style: ASSERT_DEATH(ThisShouldDie(), ""); }