8#ifndef TWOBLUECUBES_CATCH_REPORTER_BASES_HPP_INCLUDED
9#define TWOBLUECUBES_CATCH_REPORTER_BASES_HPP_INCLUDED
30 template<
typename DerivedT>
38 if( !DerivedT::getSupportedVerbosities().
count(
m_config->verbosity() ) )
39 CATCH_ERROR(
"Verbosity level not supported by this reporter" );
100 template<
typename DerivedT>
102 template<
typename T,
typename ChildNodeT>
118 bool operator == (std::shared_ptr<SectionNode>
const& other)
const {
134 bool operator() (std::shared_ptr<SectionNode>
const& node)
const {
135 return ((node->stats.sectionInfo.name == m_other.
name) &&
136 (node->stats.sectionInfo.lineInfo == m_other.
lineInfo));
154 if( !DerivedT::getSupportedVerbosities().
count(
m_config->verbosity() ) )
155 CATCH_ERROR(
"Verbosity level not supported by this reporter" );
174 std::shared_ptr<SectionNode> node;
177 m_rootSection = std::make_shared<SectionNode>( incompleteStats );
187 node = std::make_shared<SectionNode>( incompleteStats );
208 sectionNode.
assertions.push_back(assertionStats);
214 node.
stats = sectionStats;
218 auto node = std::make_shared<TestCaseNode>(testCaseStats);
229 auto node = std::make_shared<TestGroupNode>(testGroupStats);
234 auto node = std::make_shared<TestRunNode>(testRunStats);
246 std::vector<std::vector<std::shared_ptr<SectionNode>>>
m_sections;
#define CATCH_CONFIG_CONSOLE_WIDTH
char const * getLineOfChars()
void prepareExpandedExpression(AssertionResult &result)
std::string serializeFilters(std::vector< std::string > const &container)
std::shared_ptr< IConfig const > IConfigPtr
std::string getFormattedDuration(double duration)
#define T(meth, val, expected)
AssertionResult assertionResult
bool operator()(std::shared_ptr< SectionNode > const &node) const
void operator=(BySectionInfo const &)=delete
BySectionInfo(SectionInfo const &other)
BySectionInfo(BySectionInfo const &other)
std::vector< std::shared_ptr< ChildNodeT > > ChildNodes
SectionNode(SectionStats const &_stats)
std::vector< AssertionStats > Assertions
bool operator==(SectionNode const &other) const
ChildSections childSections
std::vector< std::shared_ptr< SectionNode > > ChildSections
virtual ~SectionNode()=default
std::shared_ptr< SectionNode > m_deepestSection
void sectionEnded(SectionStats const §ionStats) override
void sectionStarting(SectionInfo const §ionInfo) override
void assertionStarting(AssertionInfo const &) override
void testGroupStarting(GroupInfo const &) override
std::shared_ptr< SectionNode > m_rootSection
ReporterPreferences m_reporterPrefs
ReporterPreferences getPreferences() const override
void testCaseStarting(TestCaseInfo const &) override
std::vector< std::vector< std::shared_ptr< SectionNode > > > m_sections
std::vector< std::shared_ptr< TestCaseNode > > m_testCases
std::vector< std::shared_ptr< TestRunNode > > m_testRuns
virtual void testRunEndedCumulative()=0
void testCaseEnded(TestCaseStats const &testCaseStats) override
void testGroupEnded(TestGroupStats const &testGroupStats) override
void testRunEnded(TestRunStats const &testRunStats) override
std::vector< std::shared_ptr< TestGroupNode > > m_testGroups
void testRunStarting(TestRunInfo const &) override
~CumulativeReporterBase() override=default
std::vector< AssertionStats > m_assertions
void skipTest(TestCaseInfo const &) override
CumulativeReporterBase(ReporterConfig const &_config)
bool assertionEnded(AssertionStats const &assertionStats) override
std::vector< std::shared_ptr< SectionNode > > m_sectionStack
static std::set< Verbosity > getSupportedVerbosities()
bool shouldRedirectStdOut
LazyStat< GroupInfo > currentGroupInfo
void sectionStarting(SectionInfo const &_sectionInfo) override
void noMatchingTestCases(std::string const &) override
void testRunStarting(TestRunInfo const &_testRunInfo) override
std::vector< SectionInfo > m_sectionStack
void testGroupStarting(GroupInfo const &_groupInfo) override
ReporterPreferences getPreferences() const override
void testRunEnded(TestRunStats const &) override
LazyStat< TestCaseInfo > currentTestCaseInfo
StreamingReporterBase(ReporterConfig const &_config)
ReporterPreferences m_reporterPrefs
void sectionEnded(SectionStats const &) override
static std::set< Verbosity > getSupportedVerbosities()
LazyStat< TestRunInfo > currentTestRunInfo
void testCaseStarting(TestCaseInfo const &_testInfo) override
~StreamingReporterBase() override=default
void skipTest(TestCaseInfo const &) override
void testCaseEnded(TestCaseStats const &) override
void testGroupEnded(TestGroupStats const &) override
bool assertionEnded(AssertionStats const &) override
static std::set< Verbosity > getSupportedVerbosities()
void assertionStarting(AssertionInfo const &) override
TestEventListenerBase(ReporterConfig const &_config)