class ScopedFakeTestPartResultReporter
Defined at line 54 of file ../../third_party/googletest/src/googletest/include/gtest/gtest-spi.h
This helper class can be used to mock out Google Test failure reporting
so that we can test Google Test or code that builds on Google Test.
An object of this class appends a TestPartResult object to the
TestPartResultArray object given in the constructor whenever a Google Test
failure is reported. It can either intercept only failures that are
generated in the same thread that created this object or it can intercept
all generated failures. The scope of this mock object can be controlled with
the second argument to the two arguments constructor.
Public Methods
void ScopedFakeTestPartResultReporter (TestPartResultArray * result)
The c'tor sets this object as the test part result reporter used
by Google Test. The 'result' parameter specifies where to report the
results. This reporter will only catch failures generated in the current
thread. DEPRECATED
void ScopedFakeTestPartResultReporter (InterceptMode intercept_mode, TestPartResultArray * result)
Same as above, but you can choose the interception scope of this object.
void ~ScopedFakeTestPartResultReporter ()
The d'tor restores the previous test part result reporter.
void ReportTestPartResult (const TestPartResult & result)
Appends the TestPartResult object to the TestPartResultArray
received in the constructor.
This method is from the TestPartResultReporterInterface
interface.
Enumerations
enum InterceptMode
| Name | Value |
|---|---|
| INTERCEPT_ONLY_CURRENT_THREAD | 0 |
| INTERCEPT_ALL_THREADS | 1 |
The two possible mocking modes of this object.
Defined at line 58 of file ../../third_party/googletest/src/googletest/include/gtest/gtest-spi.h