Commit c22ce887 authored by Abseil Team's avatar Abseil Team Committed by Andy Soffer
Browse files

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
parent 29d25406
......@@ -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(), "");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment