diff options
author | Abseil Team <absl-team@google.com> | 2021-08-20 12:36:26 (GMT) |
---|---|---|
committer | Samuel Benzaquen <sbenza@google.com> | 2021-08-20 19:08:40 (GMT) |
commit | 2f80c2ba71c0e8922a03b9b855e5b019ad1f7064 (patch) | |
tree | 8bf5ed6465e3ffa1d0dfc360b1913bd4fb74a8a5 /docs/advanced.md | |
parent | 0134d73a4902574269ff2e42827f7573d3df08ae (diff) | |
download | googletest-2f80c2ba71c0e8922a03b9b855e5b019ad1f7064.zip googletest-2f80c2ba71c0e8922a03b9b855e5b019ad1f7064.tar.gz googletest-2f80c2ba71c0e8922a03b9b855e5b019ad1f7064.tar.bz2 |
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: 391971115
Diffstat (limited to 'docs/advanced.md')
-rw-r--r-- | docs/advanced.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/advanced.md b/docs/advanced.md index 1b99964..620180f 100644 --- a/docs/advanced.md +++ b/docs/advanced.md @@ -557,7 +557,7 @@ The automated testing framework does not set the style flag. You can choose a particular style of death tests by setting the flag programmatically: ```c++ -testing::FLAGS_gtest_death_test_style="threadsafe" +GTEST_FLAG_SET(death_test_style, "threadsafe") ``` You can do this in `main()` to set the style for all death tests in the binary, @@ -567,12 +567,12 @@ restored afterwards, so you need not do that yourself. For example: ```c++ int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - GTEST_FLAG_SET(gtest_death_test_style, "fast"); + GTEST_FLAG_SET(death_test_style, "fast"); return RUN_ALL_TESTS(); } TEST(MyDeathTest, TestOne) { - GTEST_FLAG_SET(gtest_death_test_style, "threadsafe"); + GTEST_FLAG_SET(death_test_style, "threadsafe"); // This test is run in the "threadsafe" style: ASSERT_DEATH(ThisShouldDie(), ""); } |