From 829402edcffe712ed4c79412ca020525cd8295ad Mon Sep 17 00:00:00 2001 From: vladlosev Date: Fri, 28 Oct 2011 16:19:04 +0000 Subject: Adds support for detection of running in death test child processes. --- include/gtest/gtest-death-test.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include') diff --git a/include/gtest/gtest-death-test.h b/include/gtest/gtest-death-test.h index a27883f0..16f08b87 100644 --- a/include/gtest/gtest-death-test.h +++ b/include/gtest/gtest-death-test.h @@ -51,6 +51,17 @@ GTEST_DECLARE_string_(death_test_style); #if GTEST_HAS_DEATH_TEST +namespace internal { + +// 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. +GTEST_API_ bool InDeathTestChild(); + +} // namespace internal + // The following macros are useful for writing death tests. // Here's what happens when an ASSERT_DEATH* or EXPECT_DEATH* is -- cgit v1.2.3