diff options
| author | Martin Hořeňovský | 2020-11-26 09:43:23 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-11-26 09:43:23 +0100 |
| commit | b10a19545b55c78c517f0fe9dbb16d80e118d28b (patch) | |
| tree | ca55b92221ab8596d9e511460a417cb5480492a4 /src | |
| parent | e5ccb79bf865cdf681f2a50bc7c9a724b2e04021 (diff) | |
| download | catch3-b10a19545b55c78c517f0fe9dbb16d80e118d28b.tar.gz | |
CumulativeReporterBase stores TestRunNodes directly
Diffstat (limited to 'src')
| -rw-r--r-- | src/catch2/reporters/catch_reporter_cumulative_base.cpp | 5 | ||||
| -rw-r--r-- | src/catch2/reporters/catch_reporter_cumulative_base.hpp | 2 |
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; |