diff options
author | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-06-25 20:49:23 +0000 |
---|---|---|
committer | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-06-25 20:49:23 +0000 |
commit | aaebfcdc4005afb22b68df61b58edd1ccc002913 (patch) | |
tree | bc94526059c6fbb60f7443ef2e95b5f340d9d8af /src/gtest-test-part.cc | |
parent | e6095deec89dcf5237948b3460d84a137622f16c (diff) | |
download | googletest-aaebfcdc4005afb22b68df61b58edd1ccc002913.tar.gz googletest-aaebfcdc4005afb22b68df61b58edd1ccc002913.tar.bz2 googletest-aaebfcdc4005afb22b68df61b58edd1ccc002913.zip |
Refactors for the event listener API (by Vlad Losev): hides some methods in UnitTest; implements the result printers using the public API.
Diffstat (limited to 'src/gtest-test-part.cc')
-rw-r--r-- | src/gtest-test-part.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gtest-test-part.cc b/src/gtest-test-part.cc index 9aacd2be..49a6fe5a 100644 --- a/src/gtest-test-part.cc +++ b/src/gtest-test-part.cc @@ -44,6 +44,8 @@ namespace testing { +using internal::GetUnitTestImpl; + // Gets the summary of the failure message by omitting the stack trace // in it. internal::String TestPartResult::ExtractSummary(const char* message) { @@ -101,14 +103,13 @@ namespace internal { HasNewFatalFailureHelper::HasNewFatalFailureHelper() : has_new_fatal_failure_(false), - original_reporter_(UnitTest::GetInstance()->impl()-> + original_reporter_(GetUnitTestImpl()-> GetTestPartResultReporterForCurrentThread()) { - UnitTest::GetInstance()->impl()->SetTestPartResultReporterForCurrentThread( - this); + GetUnitTestImpl()->SetTestPartResultReporterForCurrentThread(this); } HasNewFatalFailureHelper::~HasNewFatalFailureHelper() { - UnitTest::GetInstance()->impl()->SetTestPartResultReporterForCurrentThread( + GetUnitTestImpl()->SetTestPartResultReporterForCurrentThread( original_reporter_); } |