From c9b4867441940c11c483d86b05eac0032abc5038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Mon, 27 Jul 2020 08:46:35 +0200 Subject: [PATCH] Move some impls of StreamingReporterBase members to .cpp file --- src/catch2/reporters/catch_reporter_bases.cpp | 12 ++++++++++++ src/catch2/reporters/catch_reporter_bases.hpp | 10 ++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/catch2/reporters/catch_reporter_bases.cpp b/src/catch2/reporters/catch_reporter_bases.cpp index afcfcafc..3fcd9bfb 100644 --- a/src/catch2/reporters/catch_reporter_bases.cpp +++ b/src/catch2/reporters/catch_reporter_bases.cpp @@ -99,6 +99,18 @@ namespace Catch { StreamingReporterBase::~StreamingReporterBase() = default; + + void StreamingReporterBase::testGroupEnded( TestGroupStats const& ) { + currentGroupInfo.reset(); + } + + void StreamingReporterBase::testRunEnded( TestRunStats const& ) { + currentTestCaseInfo = nullptr; + currentGroupInfo.reset(); + currentTestRunInfo.reset(); + } + + CumulativeReporterBase::~CumulativeReporterBase() = default; void diff --git a/src/catch2/reporters/catch_reporter_bases.hpp b/src/catch2/reporters/catch_reporter_bases.hpp index 55cbd2d0..76aea01f 100644 --- a/src/catch2/reporters/catch_reporter_bases.hpp +++ b/src/catch2/reporters/catch_reporter_bases.hpp @@ -67,14 +67,8 @@ namespace Catch { void testCaseEnded(TestCaseStats const& /* _testCaseStats */) override { currentTestCaseInfo = nullptr; } - void testGroupEnded(TestGroupStats const& /* _testGroupStats */) override { - currentGroupInfo.reset(); - } - void testRunEnded(TestRunStats const& /* _testRunStats */) override { - currentTestCaseInfo = nullptr; - currentGroupInfo.reset(); - currentTestRunInfo.reset(); - } + void testGroupEnded( TestGroupStats const& ) override; + void testRunEnded( TestRunStats const& /* _testRunStats */ ) override; void skipTest(TestCaseInfo const&) override { // Don't do anything with this by default.