mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-23 11:43:29 +01:00
Don't use shared_ptr to store test run info in CumulativeReporterBase
Part of #2089
This commit is contained in:
parent
0fa133a0c5
commit
4f14922aa3
@ -105,9 +105,9 @@ namespace Catch {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CumulativeReporterBase::testRunEnded( TestRunStats const& testRunStats ) {
|
void CumulativeReporterBase::testRunEnded( TestRunStats const& testRunStats ) {
|
||||||
auto node = std::make_shared<TestRunNode>( testRunStats );
|
auto node = Detail::make_unique<TestRunNode>( testRunStats );
|
||||||
node->children.swap( m_testGroups );
|
node->children.swap( m_testGroups );
|
||||||
m_testRuns.push_back( node );
|
m_testRuns.push_back( std::move(node) );
|
||||||
testRunEndedCumulative();
|
testRunEndedCumulative();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#define CATCH_REPORTER_CUMULATIVE_BASE_HPP_INCLUDED
|
#define CATCH_REPORTER_CUMULATIVE_BASE_HPP_INCLUDED
|
||||||
|
|
||||||
#include <catch2/interfaces/catch_interfaces_reporter.hpp>
|
#include <catch2/interfaces/catch_interfaces_reporter.hpp>
|
||||||
|
#include <catch2/internal/catch_unique_ptr.hpp>
|
||||||
|
|
||||||
#include <iosfwd>
|
#include <iosfwd>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
@ -77,7 +78,7 @@ namespace Catch {
|
|||||||
std::vector<std::shared_ptr<TestCaseNode>> m_testCases;
|
std::vector<std::shared_ptr<TestCaseNode>> m_testCases;
|
||||||
std::vector<std::shared_ptr<TestGroupNode>> m_testGroups;
|
std::vector<std::shared_ptr<TestGroupNode>> m_testGroups;
|
||||||
|
|
||||||
std::vector<std::shared_ptr<TestRunNode>> m_testRuns;
|
std::vector<Detail::unique_ptr<TestRunNode>> m_testRuns;
|
||||||
|
|
||||||
std::shared_ptr<SectionNode> m_rootSection;
|
std::shared_ptr<SectionNode> m_rootSection;
|
||||||
std::shared_ptr<SectionNode> m_deepestSection;
|
std::shared_ptr<SectionNode> m_deepestSection;
|
||||||
|
Loading…
Reference in New Issue
Block a user