Added benchmark support to MultiReporters

- otherwise benchmarks are not reported if multiple reporters (usually reporter + listener(s)) are used
This commit is contained in:
Phil Nash 2017-09-21 09:32:46 +01:00
parent bd46f66754
commit 3d49d83128
2 changed files with 11 additions and 0 deletions

View File

@ -28,6 +28,14 @@ namespace Catch {
reporter->noMatchingTestCases( spec );
}
void MultipleReporters::benchmarkStarting( BenchmarkInfo const& benchmarkInfo ) {
for( auto const& reporter : m_reporters )
reporter->benchmarkStarting( benchmarkInfo );
}
void MultipleReporters::benchmarkEnded( BenchmarkStats const& benchmarkStats ) {
for( auto const& reporter : m_reporters )
reporter->benchmarkEnded( benchmarkStats );
}
void MultipleReporters::testRunStarting( TestRunInfo const& testRunInfo ) {
for( auto const& reporter : m_reporters )

View File

@ -26,6 +26,9 @@ namespace Catch {
static std::set<Verbosity> getSupportedVerbosities();
void benchmarkStarting( BenchmarkInfo const& benchmarkInfo ) override;
void benchmarkEnded( BenchmarkStats const& benchmarkStats ) override;
void testRunStarting( TestRunInfo const& testRunInfo ) override;
void testGroupStarting( GroupInfo const& groupInfo ) override;
void testCaseStarting( TestCaseInfo const& testInfo ) override;