From 10493e3854db0c4709f9ddd1ac10b974d30219f5 Mon Sep 17 00:00:00 2001 From: Sergey Date: Tue, 21 Feb 2023 13:29:20 -0700 Subject: [PATCH] Fix error in_death_test_child_process: undeclared identifier The error occurs if !GTEST_HAS_DEATH_TEST on Windows. --- googletest/src/gtest.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc index a60a042c..dd7752cf 100644 --- a/googletest/src/gtest.cc +++ b/googletest/src/gtest.cc @@ -5416,6 +5416,9 @@ int UnitTest::Run() { impl()->set_catch_exceptions(GTEST_FLAG_GET(catch_exceptions)); #if GTEST_OS_WINDOWS +#if !GTEST_HAS_DEATH_TEST + const bool in_death_test_child_process = false; +#endif // Either the user wants Google Test to catch exceptions thrown by the // tests or this is executing in the context of death test child // process. In either case the user does not want to see pop-up dialogs