diff --git a/include/gtest/internal/gtest-param-util.h b/include/gtest/internal/gtest-param-util.h index 61c3e378..0f7b331c 100644 --- a/include/gtest/internal/gtest-param-util.h +++ b/include/gtest/internal/gtest-param-util.h @@ -579,7 +579,7 @@ class ParameterizedTestCaseRegistry { // and terminate the program since we cannot guaranty correct // test case setup and tear-down in this case. ReportInvalidTestCaseType(test_case_name, file, line); - abort(); + posix::Abort(); } else { // At this point we are sure that the object we found is of the same // type we are looking for, so we downcast it to that type diff --git a/src/gtest-death-test.cc b/src/gtest-death-test.cc index a0ed80d1..603fccc1 100644 --- a/src/gtest-death-test.cc +++ b/src/gtest-death-test.cc @@ -225,7 +225,7 @@ void DeathTestAbort(const String& message) { } else { fprintf(stderr, "%s", message.c_str()); fflush(stderr); - abort(); + posix::Abort(); } } diff --git a/test/gtest_environment_test.cc b/test/gtest_environment_test.cc index 744b405e..ec9aa2cd 100644 --- a/test/gtest_environment_test.cc +++ b/test/gtest_environment_test.cc @@ -115,7 +115,7 @@ TEST(FooTest, Bar) { void Check(bool condition, const char* msg) { if (!condition) { printf("FAILED: %s\n", msg); - abort(); + testing::internal::posix::Abort(); } } diff --git a/test/gtest_repeat_test.cc b/test/gtest_repeat_test.cc index ff9063a4..5223dc0e 100644 --- a/test/gtest_repeat_test.cc +++ b/test/gtest_repeat_test.cc @@ -69,7 +69,7 @@ namespace { << " Actual: " << actual_val << "\n"\ << "Expected: " #expected "\n"\ << "Which is: " << expected_val << "\n";\ - abort();\ + ::testing::internal::posix::Abort();\ }\ } while(::testing::internal::AlwaysFalse()) @@ -113,10 +113,10 @@ TEST(BarDeathTest, ThreadSafeAndFast) { g_death_test_count++; GTEST_FLAG(death_test_style) = "threadsafe"; - EXPECT_DEATH_IF_SUPPORTED(abort(), ""); + EXPECT_DEATH_IF_SUPPORTED(::testing::internal::posix::Abort(), ""); GTEST_FLAG(death_test_style) = "fast"; - EXPECT_DEATH_IF_SUPPORTED(abort(), ""); + EXPECT_DEATH_IF_SUPPORTED(::testing::internal::posix::Abort(), ""); } #if GTEST_HAS_PARAM_TEST