Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2
diff options
context:
space:
mode:
authorMartin Hořeňovský2020-11-26 09:43:23 +0100
committerMartin Hořeňovský2020-11-26 09:43:23 +0100
commitb10a19545b55c78c517f0fe9dbb16d80e118d28b (patch)
treeca55b92221ab8596d9e511460a417cb5480492a4 /src/catch2
parente5ccb79bf865cdf681f2a50bc7c9a724b2e04021 (diff)
downloadcatch3-b10a19545b55c78c517f0fe9dbb16d80e118d28b.tar.gz
CumulativeReporterBase stores TestRunNodes directly
Diffstat (limited to 'src/catch2')
-rw-r--r--src/catch2/reporters/catch_reporter_cumulative_base.cpp5
-rw-r--r--src/catch2/reporters/catch_reporter_cumulative_base.hpp2
2 files changed, 3 insertions, 4 deletions
diff --git a/src/catch2/reporters/catch_reporter_cumulative_base.cpp b/src/catch2/reporters/catch_reporter_cumulative_base.cpp
index 740b1a32..67154d95 100644
--- a/src/catch2/reporters/catch_reporter_cumulative_base.cpp
+++ b/src/catch2/reporters/catch_reporter_cumulative_base.cpp
@@ -103,9 +103,8 @@ namespace Catch {
}
void CumulativeReporterBase::testRunEnded( TestRunStats const& testRunStats ) {
- auto node = Detail::make_unique<TestRunNode>( testRunStats );
- node->children.swap( m_testGroups );
- m_testRuns.push_back( std::move(node) );
+ m_testRuns.emplace_back( testRunStats );
+ m_testRuns.back().children.swap( m_testGroups );
testRunEndedCumulative();
}
diff --git a/src/catch2/reporters/catch_reporter_cumulative_base.hpp b/src/catch2/reporters/catch_reporter_cumulative_base.hpp
index 0df65aea..26c62ef5 100644
--- a/src/catch2/reporters/catch_reporter_cumulative_base.hpp
+++ b/src/catch2/reporters/catch_reporter_cumulative_base.hpp
@@ -73,7 +73,7 @@ namespace Catch {
std::vector<std::shared_ptr<TestCaseNode>> m_testCases;
std::vector<std::shared_ptr<TestGroupNode>> m_testGroups;
- std::vector<Detail::unique_ptr<TestRunNode>> m_testRuns;
+ std::vector<TestRunNode> m_testRuns;
std::shared_ptr<SectionNode> m_rootSection;
SectionNode* m_deepestSection = nullptr;