MCPcopy Create free account
hub / github.com/awslabs/aws-lambda-cpp / InDeathTestChild

Function InDeathTestChild

tests/gtest/gtest-all.cc:7742–7756  ·  view source on GitHub ↗

Returns a Boolean value indicating whether the caller is currently executing in the context of the death test child process. Tools such as Valgrind heap checkers may need this to modify their behavior in death tests. IMPORTANT: This is an internal utility. Using it may break the implementation of death tests. User code MUST NOT use it.

Source from the content-addressed store, hash-verified

7740// tests. IMPORTANT: This is an internal utility. Using it may break the
7741// implementation of death tests. User code MUST NOT use it.
7742bool InDeathTestChild() {
7743# if GTEST_OS_WINDOWS || GTEST_OS_FUCHSIA
7744
7745 // On Windows and Fuchsia, death tests are thread-safe regardless of the value
7746 // of the death_test_style flag.
7747 return !GTEST_FLAG(internal_run_death_test).empty();
7748
7749# else
7750
7751 if (GTEST_FLAG(death_test_style) == "threadsafe")
7752 return !GTEST_FLAG(internal_run_death_test).empty();
7753 else
7754 return g_in_fast_death_test_child;
7755#endif
7756}
7757
7758} // namespace internal
7759

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected