From 17e4860871d225bce440a3ca9ef1bdaceaed60d8 Mon Sep 17 00:00:00 2001 From: "zhanyong.wan" Date: Tue, 23 Mar 2010 19:53:07 +0000 Subject: Enables death tests on AIX, by Hady Zalek. --- src/gtest.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/gtest.cc b/src/gtest.cc index 987e6904..342d4582 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); } -- cgit v1.2.3