mirror of
https://github.com/catchorg/Catch2.git
synced 2025-06-01 17:37:57 +00:00
Final refactoring to remove direct access to encapsulated ConfigData once in Config
This commit is contained in:
parent
43fe6c6e9e
commit
6b8837bd93
2 changed files with 14 additions and 12 deletions
|
@ -33,7 +33,7 @@ namespace Catch {
|
|||
|
||||
Totals runTests() {
|
||||
|
||||
std::vector<TestCaseFilters> filterGroups = m_config->data().filters;
|
||||
std::vector<TestCaseFilters> filterGroups = m_config->filters();
|
||||
if( filterGroups.empty() ) {
|
||||
TestCaseFilters filterGroup( "" );
|
||||
filterGroups.push_back( filterGroup );
|
||||
|
@ -76,8 +76,8 @@ namespace Catch {
|
|||
|
||||
private:
|
||||
void openStream() {
|
||||
if( !m_config->data().stream.empty() )
|
||||
m_config->useStream( m_config->data().stream );
|
||||
if( !m_config->getStreamName().empty() )
|
||||
m_config->useStream( m_config->getStreamName() );
|
||||
|
||||
// Open output file, if specified
|
||||
if( !m_config->getFilename().empty() ) {
|
||||
|
@ -91,9 +91,9 @@ namespace Catch {
|
|||
}
|
||||
}
|
||||
void makeReporter() {
|
||||
std::string reporterName = m_config->data().reporter.empty()
|
||||
std::string reporterName = m_config->getReporterName().empty()
|
||||
? "console"
|
||||
: m_config->data().reporter;
|
||||
: m_config->getReporterName();
|
||||
|
||||
m_reporter = getRegistryHub().getReporterRegistry().create( reporterName, m_config.get() );
|
||||
if( !m_reporter ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue