Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
catch_interfaces_reporter.cpp
Go to the documentation of this file.
1/*
2 * Created by Martin on 19/07/2017.
3 *
4 * Distributed under the Boost Software License, Version 1.0. (See accompanying
5 * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 */
7
10
11namespace Catch {
12
14 : m_stream( &_fullConfig->stream() ), m_fullConfig( _fullConfig ) {}
15
16 ReporterConfig::ReporterConfig( IConfigPtr const& _fullConfig, std::ostream& _stream )
17 : m_stream( &_stream ), m_fullConfig( _fullConfig ) {}
18
19 std::ostream& ReporterConfig::stream() const { return *m_stream; }
20 IConfigPtr ReporterConfig::fullConfig() const { return m_fullConfig; }
21
22
23 TestRunInfo::TestRunInfo( std::string const& _name ) : name( _name ) {}
24
25 GroupInfo::GroupInfo( std::string const& _name,
26 std::size_t _groupIndex,
27 std::size_t _groupsCount )
28 : name( _name ),
29 groupIndex( _groupIndex ),
30 groupsCounts( _groupsCount )
31 {}
32
34 std::vector<MessageInfo> const& _infoMessages,
35 Totals const& _totals )
36 : assertionResult( _assertionResult ),
37 infoMessages( _infoMessages ),
38 totals( _totals )
39 {
40 assertionResult.m_resultData.lazyExpression.m_transientExpression = _assertionResult.m_resultData.lazyExpression.m_transientExpression;
41
43 // Copy message into messages list.
44 // !TBD This should have been done earlier, somewhere
45 MessageBuilder builder( assertionResult.getTestMacroName(), assertionResult.getSourceInfo(), assertionResult.getResultType() );
46 builder << assertionResult.getMessage();
47 builder.m_info.message = builder.m_stream.str();
48
49 infoMessages.push_back( builder.m_info );
50 }
51 }
52
54
56 Counts const& _assertions,
57 double _durationInSeconds,
58 bool _missingAssertions )
59 : sectionInfo( _sectionInfo ),
60 assertions( _assertions ),
61 durationInSeconds( _durationInSeconds ),
62 missingAssertions( _missingAssertions )
63 {}
64
66
67
69 Totals const& _totals,
70 std::string const& _stdOut,
71 std::string const& _stdErr,
72 bool _aborting )
73 : testInfo( _testInfo ),
74 totals( _totals ),
75 stdOut( _stdOut ),
76 stdErr( _stdErr ),
77 aborting( _aborting )
78 {}
79
81
82
84 Totals const& _totals,
85 bool _aborting )
86 : groupInfo( _groupInfo ),
87 totals( _totals ),
88 aborting( _aborting )
89 {}
90
92 : groupInfo( _groupInfo ),
93 aborting( false )
94 {}
95
97
99 Totals const& _totals,
100 bool _aborting )
101 : runInfo( _runInfo ),
102 totals( _totals ),
103 aborting( _aborting )
104 {}
105
106 TestRunStats::~TestRunStats() = default;
107
109 bool IStreamingReporter::isMulti() const { return false; }
110
113
114} // end namespace Catch
std::string name
AssertionResultData m_resultData
std::shared_ptr< IConfig const > IConfigPtr
AssertionStats(AssertionResult const &_assertionResult, std::vector< MessageInfo > const &_infoMessages, Totals const &_totals)
GroupInfo(std::string const &_name, std::size_t _groupIndex, std::size_t _groupsCount)
virtual void fatalErrorEncountered(StringRef name)
ReporterConfig(IConfigPtr const &_fullConfig)
SectionStats(SectionInfo const &_sectionInfo, Counts const &_assertions, double _durationInSeconds, bool _missingAssertions)
virtual ~SectionStats()
virtual ~TestCaseStats()
TestCaseStats(TestCaseInfo const &_testInfo, Totals const &_totals, std::string const &_stdOut, std::string const &_stdErr, bool _aborting)
TestGroupStats(GroupInfo const &_groupInfo, Totals const &_totals, bool _aborting)
TestRunInfo(std::string const &_name)
TestRunStats(TestRunInfo const &_runInfo, Totals const &_totals, bool _aborting)
virtual ~TestRunStats()