From c6b9fcd60ab2b9c08c01c641d5b41fb13c577ce2 Mon Sep 17 00:00:00 2001 From: kosak Date: Sun, 19 Jul 2015 22:42:00 +0000 Subject: [PATCH] Add injection point for GTEST_KILLED_BY_SIGNAL_OVERRIDE. --- src/gtest-death-test.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gtest-death-test.cc b/src/gtest-death-test.cc index b049eb07..a6144074 100644 --- a/src/gtest-death-test.cc +++ b/src/gtest-death-test.cc @@ -169,6 +169,14 @@ KilledBySignal::KilledBySignal(int signum) : signum_(signum) { // KilledBySignal function-call operator. bool KilledBySignal::operator()(int exit_status) const { +# if defined(GTEST_KILLED_BY_SIGNAL_OVERRIDE_) + { + bool result; + if (GTEST_KILLED_BY_SIGNAL_OVERRIDE_(signum_, exit_status, &result)) { + return result; + } + } +# endif // defined(GTEST_KILLED_BY_SIGNAL_OVERRIDE_) return WIFSIGNALED(exit_status) && WTERMSIG(exit_status) == signum_; } # endif // !GTEST_OS_WINDOWS