diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc index 09af1517..e97e7445 100644 --- a/googletest/src/gtest.cc +++ b/googletest/src/gtest.cc @@ -5457,7 +5457,8 @@ void UnitTest::AddTestPartResult(TestPartResult::Type result_type, // in the code (perhaps in order to use Google Test assertions // with another testing framework) and specify the former on the // command line for debugging. - if (GTEST_FLAG_GET(break_on_failure)) { + if (GTEST_FLAG_GET(break_on_failure) && + result_type != TestPartResult::kNonFatalFailure) { #if defined(GTEST_OS_WINDOWS) && !defined(GTEST_OS_WINDOWS_PHONE) && \ !defined(GTEST_OS_WINDOWS_RT) // Using DebugBreak on Windows allows gtest to still break into a debugger diff --git a/googletest/test/googletest-throw-on-failure-test_.cc b/googletest/test/googletest-throw-on-failure-test_.cc index 3b81a5a1..f388df6c 100644 --- a/googletest/test/googletest-throw-on-failure-test_.cc +++ b/googletest/test/googletest-throw-on-failure-test_.cc @@ -54,6 +54,7 @@ int main(int argc, char** argv) { std::set_terminate(&TerminateHandler); #endif testing::InitGoogleTest(&argc, argv); + GTEST_FLAG_SET(throw_on_failure, true); // We want to ensure that people can use Google Test assertions in // other testing frameworks, as long as they initialize Google Test