diff options
author | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2010-03-23 19:53:07 +0000 |
---|---|---|
committer | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2010-03-23 19:53:07 +0000 |
commit | dd40afa307d95e1fae723b719ffc1af389e41ce6 (patch) | |
tree | 2fea0b6700e66fd71c920f04a3a7d85874b764cc /src | |
parent | 71f86a51ca3b6ee99a016830903b848ce9d18877 (diff) | |
download | googletest-dd40afa307d95e1fae723b719ffc1af389e41ce6.tar.gz |
Enables death tests on AIX, by Hady Zalek.
git-svn-id: http://googletest.googlecode.com/svn/trunk@402 861a406c-534a-0410-8894-cb66d6ee9925
Diffstat (limited to 'src')
-rw-r--r-- | src/gtest.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gtest.cc b/src/gtest.cc index 987e690..342d458 100644 --- a/src/gtest.cc +++ b/src/gtest.cc @@ -1805,6 +1805,8 @@ TestResult::~TestResult() { // range from 0 to total_part_count() - 1. If i is not in that range, // aborts the program. const TestPartResult& TestResult::GetTestPartResult(int i) const { + if (i < 0 || i >= total_part_count()) + internal::posix::Abort(); 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 // program. const TestProperty& TestResult::GetTestProperty(int i) const { + if (i < 0 || i >= test_property_count()) + internal::posix::Abort(); return test_properties_.at(i); } |