mirror of
https://github.com/catchorg/Catch2.git
synced 2025-01-16 07:08:01 +00:00
Compare commits
5 Commits
0fa133a0c5
...
166c520598
Author | SHA1 | Date | |
---|---|---|---|
|
166c520598 | ||
|
a29deeb129 | ||
|
1cef51b69b | ||
|
79c1bf9301 | ||
|
4f14922aa3 |
@ -58,8 +58,9 @@ namespace Catch {
|
||||
node = *it;
|
||||
}
|
||||
}
|
||||
m_sectionStack.push_back( node );
|
||||
m_deepestSection = std::move( node );
|
||||
|
||||
m_deepestSection = node.get();
|
||||
m_sectionStack.push_back( std::move(node) );
|
||||
}
|
||||
|
||||
bool CumulativeReporterBase::assertionEnded(
|
||||
@ -105,9 +106,9 @@ namespace Catch {
|
||||
}
|
||||
|
||||
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 );
|
||||
m_testRuns.push_back( node );
|
||||
m_testRuns.push_back( std::move(node) );
|
||||
testRunEndedCumulative();
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
#define CATCH_REPORTER_CUMULATIVE_BASE_HPP_INCLUDED
|
||||
|
||||
#include <catch2/interfaces/catch_interfaces_reporter.hpp>
|
||||
#include <catch2/internal/catch_unique_ptr.hpp>
|
||||
|
||||
#include <iosfwd>
|
||||
#include <memory>
|
||||
@ -21,7 +22,7 @@ namespace Catch {
|
||||
template<typename T, typename ChildNodeT>
|
||||
struct Node {
|
||||
explicit Node( T const& _value ) : value( _value ) {}
|
||||
virtual ~Node() {}
|
||||
virtual ~Node() = default;
|
||||
|
||||
using ChildNodes = std::vector<std::shared_ptr<ChildNodeT>>;
|
||||
T value;
|
||||
@ -72,15 +73,13 @@ namespace Catch {
|
||||
|
||||
IConfig const* m_config;
|
||||
std::ostream& stream;
|
||||
std::vector<AssertionStats> m_assertions;
|
||||
std::vector<std::vector<std::shared_ptr<SectionNode>>> m_sections;
|
||||
std::vector<std::shared_ptr<TestCaseNode>> m_testCases;
|
||||
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_deepestSection;
|
||||
SectionNode* m_deepestSection = nullptr;
|
||||
std::vector<std::shared_ptr<SectionNode>> m_sectionStack;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user