From 4dcf8382c70c25a3ccfbe5d9e37276adf7c6058f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Mon, 13 Sep 2021 23:09:08 +0200 Subject: [PATCH] Default-implement assertion* events in StreamingReporterBase This means that a reporter deriving from `StreamingReporterBase` does not have to override them if it isn't interested in the individual assertions. --- src/catch2/reporters/catch_reporter_streaming_base.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/catch2/reporters/catch_reporter_streaming_base.hpp b/src/catch2/reporters/catch_reporter_streaming_base.hpp index ddd10c5e..c51595e6 100644 --- a/src/catch2/reporters/catch_reporter_streaming_base.hpp +++ b/src/catch2/reporters/catch_reporter_streaming_base.hpp @@ -55,6 +55,9 @@ namespace Catch { m_sectionStack.push_back(_sectionInfo); } + void assertionStarting( AssertionInfo const& ) override {} + bool assertionEnded( AssertionStats const& ) override { return true; } + void sectionEnded(SectionStats const& /* _sectionStats */) override { m_sectionStack.pop_back(); }