From 63b4f32b442c767ebe54ec66aed8b65d9c0b6f5e Mon Sep 17 00:00:00 2001 From: "zhanyong.wan" Date: Wed, 16 Jun 2010 22:47:13 +0000 Subject: 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 --- src/gtest-internal-inl.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/gtest-internal-inl.h') diff --git a/src/gtest-internal-inl.h b/src/gtest-internal-inl.h index 9e63aed..c5608c9 100644 --- a/src/gtest-internal-inl.h +++ b/src/gtest-internal-inl.h @@ -754,9 +754,13 @@ class GTEST_API_ UnitTestImpl { // doesn't apply there.) int RunAllTests(); - // Clears the results of all tests, including the ad hoc test. - void ClearResult() { + // Clears the results of all tests, except the ad hoc tests. + void ClearNonAdHocTestResult() { ForEach(test_cases_, TestCase::ClearTestCaseResult); + } + + // Clears the results of ad-hoc test assertions. + void ClearAdHocTestResult() { ad_hoc_test_result_.Clear(); } -- cgit v1.2.3