diff options
author | lmat <dartme18@gmail.com> | 2021-10-30 23:05:17 (GMT) |
---|---|---|
committer | lmat <dartme18@gmail.com> | 2021-11-01 20:17:25 (GMT) |
commit | 3c958ac47cfc00d463f2a8efe62542b322d89164 (patch) | |
tree | 9f03daa139b2572f75cc445606a45100ff7f8cae /googletest/include | |
parent | 16f637fbf4ffc3f7a01fa4eceb7906634565242f (diff) | |
download | googletest-3c958ac47cfc00d463f2a8efe62542b322d89164.zip googletest-3c958ac47cfc00d463f2a8efe62542b322d89164.tar.gz googletest-3c958ac47cfc00d463f2a8efe62542b322d89164.tar.bz2 |
Re #3637 Show Disabled Tests in testing outputrefs/pull/3638/head
Showing disabled tests is implemented by a new member function on the
TestEventListener interface (which is responsible for printing
testing output). The new function is called OnTestSkipped and it is
invoked when a disabled test is encountered.
The PrettyUnitTestResultPrinter has the canonical implementation of this
new function. The BriefUnitTestResultPrinter and the
EmptyTestEventListener get a nullary implementation. The
JsonUnitTestResultPrinter and XmlUnitTestResultPrinter
inherit that trivial implementation from the EmptyTestEventListener.
Diffstat (limited to 'googletest/include')
-rw-r--r-- | googletest/include/gtest/gtest.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/googletest/include/gtest/gtest.h b/googletest/include/gtest/gtest.h index 3d04b89..fe9b433 100644 --- a/googletest/include/gtest/gtest.h +++ b/googletest/include/gtest/gtest.h @@ -1123,6 +1123,9 @@ class TestEventListener { // Fired before the test starts. virtual void OnTestStart(const TestInfo& test_info) = 0; + // Fired when skipping a test + virtual void OnTestSkipped(const TestInfo& test_info) = 0; + // Fired after a failed assertion or a SUCCEED() invocation. // If you want to throw an exception from this function to skip to the next // TEST, it must be AssertionException defined above, or inherited from it. @@ -1172,6 +1175,7 @@ class EmptyTestEventListener : public TestEventListener { #endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_ void OnTestStart(const TestInfo& /*test_info*/) override {} + void OnTestSkipped(const TestInfo& /*test_info*/) override {} void OnTestPartResult(const TestPartResult& /*test_part_result*/) override {} void OnTestEnd(const TestInfo& /*test_info*/) override {} void OnTestSuiteEnd(const TestSuite& /*test_suite*/) override {} |