Enables death tests on AIX, by Hady Zalek.
This commit is contained in:
parent
e9f093ae15
commit
17e4860871
@ -478,7 +478,8 @@
|
|||||||
// abort() in a VC 7.1 application compiled as GUI in debug config
|
// abort() in a VC 7.1 application compiled as GUI in debug config
|
||||||
// pops up a dialog window that cannot be suppressed programmatically.
|
// pops up a dialog window that cannot be suppressed programmatically.
|
||||||
#if (GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS || \
|
#if (GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS || \
|
||||||
(GTEST_OS_WINDOWS_DESKTOP && _MSC_VER >= 1400) || GTEST_OS_WINDOWS_MINGW)
|
(GTEST_OS_WINDOWS_DESKTOP && _MSC_VER >= 1400) || \
|
||||||
|
GTEST_OS_WINDOWS_MINGW || GTEST_OS_AIX)
|
||||||
#define GTEST_HAS_DEATH_TEST 1
|
#define GTEST_HAS_DEATH_TEST 1
|
||||||
#include <vector> // NOLINT
|
#include <vector> // NOLINT
|
||||||
#endif
|
#endif
|
||||||
|
@ -1805,6 +1805,8 @@ TestResult::~TestResult() {
|
|||||||
// range from 0 to total_part_count() - 1. If i is not in that range,
|
// range from 0 to total_part_count() - 1. If i is not in that range,
|
||||||
// aborts the program.
|
// aborts the program.
|
||||||
const TestPartResult& TestResult::GetTestPartResult(int i) const {
|
const TestPartResult& TestResult::GetTestPartResult(int i) const {
|
||||||
|
if (i < 0 || i >= total_part_count())
|
||||||
|
internal::posix::Abort();
|
||||||
return test_part_results_.at(i);
|
return test_part_results_.at(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1812,6 +1814,8 @@ const TestPartResult& TestResult::GetTestPartResult(int i) const {
|
|||||||
// test_property_count() - 1. If i is not in that range, aborts the
|
// test_property_count() - 1. If i is not in that range, aborts the
|
||||||
// program.
|
// program.
|
||||||
const TestProperty& TestResult::GetTestProperty(int i) const {
|
const TestProperty& TestResult::GetTestProperty(int i) const {
|
||||||
|
if (i < 0 || i >= test_property_count())
|
||||||
|
internal::posix::Abort();
|
||||||
return test_properties_.at(i);
|
return test_properties_.at(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user