MCPcopy Create free account
hub / github.com/FidoProject/Fido / CumulativeReporterBase

Class CumulativeReporterBase

tests/catch.h:8591–8732  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8589 };
8590
8591 struct CumulativeReporterBase : SharedImpl<IStreamingReporter> {
8592 template<typename T, typename ChildNodeT>
8593 struct Node : SharedImpl<> {
8594 explicit Node( T const& _value ) : value( _value ) {}
8595 virtual ~Node() {}
8596
8597 typedef std::vector<Ptr<ChildNodeT> > ChildNodes;
8598 T value;
8599 ChildNodes children;
8600 };
8601 struct SectionNode : SharedImpl<> {
8602 explicit SectionNode( SectionStats const& _stats ) : stats( _stats ) {}
8603 virtual ~SectionNode();
8604
8605 bool operator == ( SectionNode const& other ) const {
8606 return stats.sectionInfo.lineInfo == other.stats.sectionInfo.lineInfo;
8607 }
8608 bool operator == ( Ptr<SectionNode> const& other ) const {
8609 return operator==( *other );
8610 }
8611
8612 SectionStats stats;
8613 typedef std::vector<Ptr<SectionNode> > ChildSections;
8614 typedef std::vector<AssertionStats> Assertions;
8615 ChildSections childSections;
8616 Assertions assertions;
8617 std::string stdOut;
8618 std::string stdErr;
8619 };
8620
8621 struct BySectionInfo {
8622 BySectionInfo( SectionInfo const& other ) : m_other( other ) {}
8623 BySectionInfo( BySectionInfo const& other ) : m_other( other.m_other ) {}
8624 bool operator() ( Ptr<SectionNode> const& node ) const {
8625 return node->stats.sectionInfo.lineInfo == m_other.lineInfo;
8626 }
8627 private:
8628 void operator=( BySectionInfo const& );
8629 SectionInfo const& m_other;
8630 };
8631
8632 typedef Node<TestCaseStats, SectionNode> TestCaseNode;
8633 typedef Node<TestGroupStats, TestCaseNode> TestGroupNode;
8634 typedef Node<TestRunStats, TestGroupNode> TestRunNode;
8635
8636 CumulativeReporterBase( ReporterConfig const& _config )
8637 : m_config( _config.fullConfig() ),
8638 stream( _config.stream() )
8639 {
8640 m_reporterPrefs.shouldRedirectStdOut = false;
8641 }
8642 ~CumulativeReporterBase();
8643
8644 virtual ReporterPreferences getPreferences() const CATCH_OVERRIDE {
8645 return m_reporterPrefs;
8646 }
8647
8648 virtual void testRunStarting( TestRunInfo const& ) CATCH_OVERRIDE {}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected