Horizon
|
The common base for all reporters and event listeners. More...
#include <catch_amalgamated.hpp>
Public Member Functions | |
IEventListener (IConfig const *config) | |
ReporterPreferences const & | getPreferences () const |
virtual void | noMatchingTestCases (StringRef unmatchedSpec)=0 |
Called when no test cases match provided test spec. | |
virtual void | reportInvalidTestSpec (StringRef invalidArgument)=0 |
Called for all invalid test specs from the cli. | |
virtual void | testRunStarting (TestRunInfo const &testRunInfo)=0 |
Called once in a testing run before tests are started. | |
virtual void | testCaseStarting (TestCaseInfo const &testInfo)=0 |
Called once for each TEST_CASE, no matter how many times it is entered. | |
virtual void | testCasePartialStarting (TestCaseInfo const &testInfo, uint64_t partNumber)=0 |
Called every time a TEST_CASE is entered, including repeats (due to sections) | |
virtual void | sectionStarting (SectionInfo const §ionInfo)=0 |
Called when a SECTION is being entered. Not called for skipped sections. | |
virtual void | benchmarkPreparing (StringRef benchmarkName)=0 |
Called when user-code is being probed before the actual benchmark runs. | |
virtual void | benchmarkStarting (BenchmarkInfo const &benchmarkInfo)=0 |
Called after probe but before the user-code is being benchmarked. | |
virtual void | benchmarkEnded (BenchmarkStats<> const &benchmarkStats)=0 |
Called with the benchmark results if benchmark successfully finishes. | |
virtual void | benchmarkFailed (StringRef benchmarkName)=0 |
Called if running the benchmarks fails for any reason. | |
virtual void | assertionStarting (AssertionInfo const &assertionInfo)=0 |
Called before assertion success/failure is evaluated. | |
virtual void | assertionEnded (AssertionStats const &assertionStats)=0 |
Called after assertion was fully evaluated. | |
virtual void | sectionEnded (SectionStats const §ionStats)=0 |
Called after a SECTION has finished running. | |
virtual void | testCasePartialEnded (TestCaseStats const &testCaseStats, uint64_t partNumber)=0 |
Called every time a TEST_CASE is entered, including repeats (due to sections) | |
virtual void | testCaseEnded (TestCaseStats const &testCaseStats)=0 |
Called once for each TEST_CASE, no matter how many times it is entered. | |
virtual void | testRunEnded (TestRunStats const &testRunStats)=0 |
Called once after all tests in a testing run are finished. | |
virtual void | skipTest (TestCaseInfo const &testInfo)=0 |
Called with test cases that are skipped due to the test run aborting. | |
virtual void | fatalErrorEncountered (StringRef error)=0 |
Called if a fatal error (signal/structured exception) occured. | |
virtual void | listReporters (std::vector< ReporterDescription > const &descriptions)=0 |
Writes out information about provided reporters using reporter-specific format. | |
virtual void | listListeners (std::vector< ListenerDescription > const &descriptions)=0 |
Writes out the provided listeners descriptions using reporter-specific format. | |
virtual void | listTests (std::vector< TestCaseHandle > const &tests)=0 |
Writes out information about provided tests using reporter-specific format. | |
virtual void | listTags (std::vector< TagInfo > const &tags)=0 |
Writes out information about the provided tags using reporter-specific format. | |
Protected Attributes | |
ReporterPreferences | m_preferences |
Derived classes can set up their preferences here. | |
IConfig const * | m_config |
The test run's config as filled in from CLI and defaults. | |
The common base for all reporters and event listeners.
Implementing classes must also implement:
//! User-friendly description of the reporter/listener type static std::string getDescription()
Generally shouldn't be derived from by users of Catch2 directly, instead they should derive from one of the utility bases that derive from this class.
|
pure virtual |
Called after assertion was fully evaluated.
Implemented in Catch::StreamingReporterBase, Catch::CompactReporter, Catch::ConsoleReporter, Catch::EventListenerBase, and Catch::JunitReporter.
|
pure virtual |
Called before assertion success/failure is evaluated.
Implemented in Catch::StreamingReporterBase, Catch::ConsoleReporter, and Catch::EventListenerBase.
|
pure virtual |
Called with the benchmark results if benchmark successfully finishes.
Implemented in Catch::StreamingReporterBase, Catch::EventListenerBase, and Catch::ConsoleReporter.
|
pure virtual |
Called if running the benchmarks fails for any reason.
Implemented in Catch::ConsoleReporter, Catch::EventListenerBase, and Catch::StreamingReporterBase.
|
pure virtual |
Called when user-code is being probed before the actual benchmark runs.
Implemented in Catch::ConsoleReporter, Catch::EventListenerBase, and Catch::StreamingReporterBase.
|
pure virtual |
Called after probe but before the user-code is being benchmarked.
Implemented in Catch::StreamingReporterBase, Catch::EventListenerBase, and Catch::ConsoleReporter.
|
pure virtual |
Called if a fatal error (signal/structured exception) occured.
Implemented in Catch::EventListenerBase, and Catch::StreamingReporterBase.
|
pure virtual |
Writes out the provided listeners descriptions using reporter-specific format.
Implemented in Catch::ReporterBase, and Catch::EventListenerBase.
|
pure virtual |
Writes out information about provided reporters using reporter-specific format.
Implemented in Catch::ReporterBase, and Catch::EventListenerBase.
|
pure virtual |
Writes out information about the provided tags using reporter-specific format.
Implemented in Catch::EventListenerBase, and Catch::ReporterBase.
|
pure virtual |
Writes out information about provided tests using reporter-specific format.
Implemented in Catch::ReporterBase, and Catch::EventListenerBase.
|
pure virtual |
Called when no test cases match provided test spec.
Implemented in Catch::CompactReporter, Catch::ConsoleReporter, Catch::EventListenerBase, and Catch::StreamingReporterBase.
|
pure virtual |
Called for all invalid test specs from the cli.
Implemented in Catch::ConsoleReporter, Catch::EventListenerBase, and Catch::StreamingReporterBase.
|
pure virtual |
Called after a SECTION
has finished running.
Implemented in Catch::StreamingReporterBase, Catch::CompactReporter, Catch::ConsoleReporter, and Catch::EventListenerBase.
|
pure virtual |
Called when a SECTION
is being entered. Not called for skipped sections.
Implemented in Catch::StreamingReporterBase, Catch::ConsoleReporter, and Catch::EventListenerBase.
|
pure virtual |
Called with test cases that are skipped due to the test run aborting.
Implemented in Catch::StreamingReporterBase, Catch::AutomakeReporter, and Catch::EventListenerBase.
|
pure virtual |
Called once for each TEST_CASE, no matter how many times it is entered.
Implemented in Catch::StreamingReporterBase, Catch::AutomakeReporter, Catch::ConsoleReporter, Catch::EventListenerBase, and Catch::JunitReporter.
|
pure virtual |
Called every time a TEST_CASE is entered, including repeats (due to sections)
Implemented in Catch::StreamingReporterBase, and Catch::EventListenerBase.
|
pure virtual |
Called every time a TEST_CASE is entered, including repeats (due to sections)
Implemented in Catch::StreamingReporterBase, and Catch::EventListenerBase.
|
pure virtual |
Called once for each TEST_CASE, no matter how many times it is entered.
Implemented in Catch::StreamingReporterBase, Catch::JunitReporter, and Catch::EventListenerBase.
|
pure virtual |
Called once after all tests in a testing run are finished.
Not called if tests weren't run (e.g. only listings happened)
Implemented in Catch::StreamingReporterBase, Catch::CompactReporter, Catch::ConsoleReporter, and Catch::EventListenerBase.
|
pure virtual |
Called once in a testing run before tests are started.
Not called if tests won't be run (e.g. only listing will happen)
Implemented in Catch::CompactReporter, Catch::StreamingReporterBase, Catch::ConsoleReporter, Catch::JunitReporter, Catch::EventListenerBase, and Catch::SonarQubeReporter.