summaryrefslogtreecommitdiff
path: root/src/gtest.cc
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2010-06-16 22:47:13 +0000
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2010-06-16 22:47:13 +0000
commit63b4f32b442c767ebe54ec66aed8b65d9c0b6f5e (patch)
tree3a0d849ba9e72f411fbcc0b1b8f1acd880647736 /src/gtest.cc
parent9748de060f19f81fd9dd7ccabf2be4bb624237b5 (diff)
downloadgtest-63b4f32b442c767ebe54ec66aed8b65d9c0b6f5e.tar.gz
gtest-63b4f32b442c767ebe54ec66aed8b65d9c0b6f5e.tar.bz2
gtest-63b4f32b442c767ebe54ec66aed8b65d9c0b6f5e.tar.xz
Makes gtest report failures in ad hoc test assertions executed before RUN_ALL_TESTS().
git-svn-id: http://googletest.googlecode.com/svn/trunk@441 861a406c-534a-0410-8894-cb66d6ee9925
Diffstat (limited to 'src/gtest.cc')
-rw-r--r--src/gtest.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gtest.cc b/src/gtest.cc
index e136a18..cb2c34c 100644
--- a/src/gtest.cc
+++ b/src/gtest.cc
@@ -3999,7 +3999,9 @@ int UnitTestImpl::RunAllTests() {
// Repeats forever if the repeat count is negative.
const bool forever = repeat < 0;
for (int i = 0; forever || i != repeat; i++) {
- ClearResult();
+ // We want to preserve failures generated by ad-hoc test
+ // assertions executed before RUN_ALL_TESTS().
+ ClearNonAdHocTestResult();
const TimeInMillis start = GetTimeInMillis();