MCPcopy Create free account
hub / github.com/EmbeddedRPC/erpc / InDeathTestChild

Function InDeathTestChild

test/common/gtest/gtest.cpp:7058–7072  ·  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

7056// tests. IMPORTANT: This is an internal utility. Using it may break the
7057// implementation of death tests. User code MUST NOT use it.
7058bool InDeathTestChild() {
7059# if GTEST_OS_WINDOWS
7060
7061 // On Windows, death tests are thread-safe regardless of the value of the
7062 // death_test_style flag.
7063 return !GTEST_FLAG(internal_run_death_test).empty();
7064
7065# else
7066
7067 if (GTEST_FLAG(death_test_style) == "threadsafe")
7068 return !GTEST_FLAG(internal_run_death_test).empty();
7069 else
7070 return g_in_fast_death_test_child;
7071#endif
7072}
7073
7074} // namespace internal
7075

Callers

nothing calls this directly

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected