Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
Catch::StreamingReporterBase< DerivedT > Struct Template Reference

#include <catch_reporter_bases.hpp>

Inheritance diagram for Catch::StreamingReporterBase< DerivedT >:
Collaboration diagram for Catch::StreamingReporterBase< DerivedT >:

Public Member Functions

 StreamingReporterBase (ReporterConfig const &_config)
 
ReporterPreferences getPreferences () const override
 
 ~StreamingReporterBase () override=default
 
void noMatchingTestCases (std::string const &) override
 
void testRunStarting (TestRunInfo const &_testRunInfo) override
 
void testGroupStarting (GroupInfo const &_groupInfo) override
 
void testCaseStarting (TestCaseInfo const &_testInfo) override
 
void sectionStarting (SectionInfo const &_sectionInfo) override
 
void sectionEnded (SectionStats const &) override
 
void testCaseEnded (TestCaseStats const &) override
 
void testGroupEnded (TestGroupStats const &) override
 
void testRunEnded (TestRunStats const &) override
 
void skipTest (TestCaseInfo const &) override
 
- Public Member Functions inherited from Catch::IStreamingReporter
virtual ~IStreamingReporter ()=default
 
virtual void benchmarkStarting (BenchmarkInfo const &)
 
virtual void assertionStarting (AssertionInfo const &assertionInfo)=0
 
virtual bool assertionEnded (AssertionStats const &assertionStats)=0
 
virtual void benchmarkEnded (BenchmarkStats const &)
 
virtual void fatalErrorEncountered (StringRef name)
 
virtual bool isMulti () const
 

Static Public Member Functions

static std::set< VerbositygetSupportedVerbosities ()
 

Public Attributes

IConfigPtr m_config
 
std::ostream & stream
 
LazyStat< TestRunInfocurrentTestRunInfo
 
LazyStat< GroupInfocurrentGroupInfo
 
LazyStat< TestCaseInfocurrentTestCaseInfo
 
std::vector< SectionInfom_sectionStack
 
ReporterPreferences m_reporterPrefs
 

Detailed Description

template<typename DerivedT>
struct Catch::StreamingReporterBase< DerivedT >

Definition at line 31 of file catch_reporter_bases.hpp.

Constructor & Destructor Documentation

◆ StreamingReporterBase()

template<typename DerivedT >
Catch::StreamingReporterBase< DerivedT >::StreamingReporterBase ( ReporterConfig const & _config)
inline

Definition at line 33 of file catch_reporter_bases.hpp.

34 : m_config( _config.fullConfig() ),
35 stream( _config.stream() )
36 {
38 if( !DerivedT::getSupportedVerbosities().count( m_config->verbosity() ) )
39 CATCH_ERROR( "Verbosity level not supported by this reporter" );
40 }
#define CATCH_ERROR(msg)
int * count

◆ ~StreamingReporterBase()

template<typename DerivedT >
Catch::StreamingReporterBase< DerivedT >::~StreamingReporterBase ( )
overridedefault

Member Function Documentation

◆ getPreferences()

template<typename DerivedT >
ReporterPreferences Catch::StreamingReporterBase< DerivedT >::getPreferences ( ) const
inlineoverridevirtual

Implements Catch::IStreamingReporter.

Reimplemented in Catch::TAPReporter, and Catch::TAPReporter.

Definition at line 42 of file catch_reporter_bases.hpp.

42 {
43 return m_reporterPrefs;
44 }

◆ getSupportedVerbosities()

template<typename DerivedT >
static std::set< Verbosity > Catch::StreamingReporterBase< DerivedT >::getSupportedVerbosities ( )
inlinestatic

Definition at line 46 of file catch_reporter_bases.hpp.

46 {
47 return { Verbosity::Normal };
48 }

◆ noMatchingTestCases()

template<typename DerivedT >
void Catch::StreamingReporterBase< DerivedT >::noMatchingTestCases ( std::string const & )
inlineoverridevirtual

Implements Catch::IStreamingReporter.

Reimplemented in Catch::TAPReporter, Catch::TAPReporter, Catch::TeamCityReporter, Catch::TeamCityReporter, and Catch::XmlReporter.

Definition at line 52 of file catch_reporter_bases.hpp.

52{}
Here is the caller graph for this function:

◆ sectionEnded()

template<typename DerivedT >
void Catch::StreamingReporterBase< DerivedT >::sectionEnded ( SectionStats const & )
inlineoverridevirtual

Implements Catch::IStreamingReporter.

Reimplemented in Catch::XmlReporter.

Definition at line 69 of file catch_reporter_bases.hpp.

69 {
70 m_sectionStack.pop_back();
71 }
std::vector< SectionInfo > m_sectionStack
Here is the caller graph for this function:

◆ sectionStarting()

template<typename DerivedT >
void Catch::StreamingReporterBase< DerivedT >::sectionStarting ( SectionInfo const & _sectionInfo)
inlineoverridevirtual

Implements Catch::IStreamingReporter.

Reimplemented in Catch::TeamCityReporter, Catch::TeamCityReporter, and Catch::XmlReporter.

Definition at line 65 of file catch_reporter_bases.hpp.

65 {
66 m_sectionStack.push_back(_sectionInfo);
67 }
Here is the caller graph for this function:

◆ skipTest()

template<typename DerivedT >
void Catch::StreamingReporterBase< DerivedT >::skipTest ( TestCaseInfo const & )
inlineoverridevirtual

Implements Catch::IStreamingReporter.

Reimplemented in Catch::TeamCityReporter, and Catch::TeamCityReporter.

Definition at line 84 of file catch_reporter_bases.hpp.

84 {
85 // Don't do anything with this by default.
86 // It can optionally be overridden in the derived class.
87 }

◆ testCaseEnded()

template<typename DerivedT >
void Catch::StreamingReporterBase< DerivedT >::testCaseEnded ( TestCaseStats const & )
inlineoverridevirtual

Implements Catch::IStreamingReporter.

Reimplemented in Catch::TeamCityReporter, Catch::TeamCityReporter, and Catch::XmlReporter.

Definition at line 72 of file catch_reporter_bases.hpp.

72 {
73 currentTestCaseInfo.reset();
74 }
LazyStat< TestCaseInfo > currentTestCaseInfo
Here is the caller graph for this function:

◆ testCaseStarting()

template<typename DerivedT >
void Catch::StreamingReporterBase< DerivedT >::testCaseStarting ( TestCaseInfo const & _testInfo)
inlineoverridevirtual

Implements Catch::IStreamingReporter.

Reimplemented in Catch::TeamCityReporter, Catch::TeamCityReporter, and Catch::XmlReporter.

Definition at line 62 of file catch_reporter_bases.hpp.

62 {
63 currentTestCaseInfo = _testInfo;
64 }
Here is the caller graph for this function:

◆ testGroupEnded()

template<typename DerivedT >
void Catch::StreamingReporterBase< DerivedT >::testGroupEnded ( TestGroupStats const & )
inlineoverridevirtual

Implements Catch::IStreamingReporter.

Reimplemented in Catch::TeamCityReporter, Catch::TeamCityReporter, and Catch::XmlReporter.

Definition at line 75 of file catch_reporter_bases.hpp.

75 {
76 currentGroupInfo.reset();
77 }
LazyStat< GroupInfo > currentGroupInfo
Here is the caller graph for this function:

◆ testGroupStarting()

template<typename DerivedT >
void Catch::StreamingReporterBase< DerivedT >::testGroupStarting ( GroupInfo const & _groupInfo)
inlineoverridevirtual

Implements Catch::IStreamingReporter.

Reimplemented in Catch::TeamCityReporter, Catch::TeamCityReporter, and Catch::XmlReporter.

Definition at line 58 of file catch_reporter_bases.hpp.

58 {
59 currentGroupInfo = _groupInfo;
60 }
Here is the caller graph for this function:

◆ testRunEnded()

template<typename DerivedT >
void Catch::StreamingReporterBase< DerivedT >::testRunEnded ( TestRunStats const & )
inlineoverridevirtual

Implements Catch::IStreamingReporter.

Reimplemented in Catch::TAPReporter, Catch::TAPReporter, and Catch::XmlReporter.

Definition at line 78 of file catch_reporter_bases.hpp.

78 {
79 currentTestCaseInfo.reset();
80 currentGroupInfo.reset();
81 currentTestRunInfo.reset();
82 }
LazyStat< TestRunInfo > currentTestRunInfo
Here is the caller graph for this function:

◆ testRunStarting()

template<typename DerivedT >
void Catch::StreamingReporterBase< DerivedT >::testRunStarting ( TestRunInfo const & _testRunInfo)
inlineoverridevirtual

Implements Catch::IStreamingReporter.

Reimplemented in Catch::XmlReporter.

Definition at line 54 of file catch_reporter_bases.hpp.

54 {
55 currentTestRunInfo = _testRunInfo;
56 }
Here is the caller graph for this function:

Member Data Documentation

◆ currentGroupInfo

template<typename DerivedT >
LazyStat<GroupInfo> Catch::StreamingReporterBase< DerivedT >::currentGroupInfo

Definition at line 93 of file catch_reporter_bases.hpp.

◆ currentTestCaseInfo

template<typename DerivedT >
LazyStat<TestCaseInfo> Catch::StreamingReporterBase< DerivedT >::currentTestCaseInfo

Definition at line 94 of file catch_reporter_bases.hpp.

◆ currentTestRunInfo

template<typename DerivedT >
LazyStat<TestRunInfo> Catch::StreamingReporterBase< DerivedT >::currentTestRunInfo

Definition at line 92 of file catch_reporter_bases.hpp.

◆ m_config

template<typename DerivedT >
IConfigPtr Catch::StreamingReporterBase< DerivedT >::m_config

Definition at line 89 of file catch_reporter_bases.hpp.

◆ m_reporterPrefs

template<typename DerivedT >
ReporterPreferences Catch::StreamingReporterBase< DerivedT >::m_reporterPrefs

Definition at line 97 of file catch_reporter_bases.hpp.

◆ m_sectionStack

template<typename DerivedT >
std::vector<SectionInfo> Catch::StreamingReporterBase< DerivedT >::m_sectionStack

Definition at line 96 of file catch_reporter_bases.hpp.

◆ stream

template<typename DerivedT >
std::ostream& Catch::StreamingReporterBase< DerivedT >::stream

Definition at line 90 of file catch_reporter_bases.hpp.


The documentation for this struct was generated from the following file: