diff options
| author | Martin Hořeňovský | 2022-04-06 21:56:29 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2022-04-07 12:50:13 +0200 |
| commit | d5bfce4d84f5dda55e1b77d2002a2726732130c6 (patch) | |
| tree | 559b58fb3ec9b096af5e6f97f22ecc9f1588c49a /src/catch2 | |
| parent | c43947eb473d19dc183cd55ed0a4f7b06155342e (diff) | |
| download | catch3-d5bfce4d84f5dda55e1b77d2002a2726732130c6.tar.gz | |
Rename config::colourMode to config::defaultConfigMode
This describes the actual intention much better.
Diffstat (limited to 'src/catch2')
| -rw-r--r-- | src/catch2/catch_config.cpp | 2 | ||||
| -rw-r--r-- | src/catch2/catch_config.hpp | 4 | ||||
| -rw-r--r-- | src/catch2/catch_session.cpp | 4 | ||||
| -rw-r--r-- | src/catch2/interfaces/catch_interfaces_config.hpp | 2 | ||||
| -rw-r--r-- | src/catch2/internal/catch_commandline.cpp | 7 |
5 files changed, 9 insertions, 10 deletions
diff --git a/src/catch2/catch_config.cpp b/src/catch2/catch_config.cpp index 75a92883..33ef9bdd 100644 --- a/src/catch2/catch_config.cpp +++ b/src/catch2/catch_config.cpp @@ -127,7 +127,7 @@ namespace Catch { uint32_t Config::rngSeed() const { return m_data.rngSeed; } unsigned int Config::shardCount() const { return m_data.shardCount; } unsigned int Config::shardIndex() const { return m_data.shardIndex; } - ColourMode Config::colourMode() const { return m_data.colourMode; } + ColourMode Config::defaultColourMode() const { return m_data.defaultColourMode; } bool Config::shouldDebugBreak() const { return m_data.shouldDebugBreak; } int Config::abortAfter() const { return m_data.abortAfter; } bool Config::showInvisibles() const { return m_data.showInvisibles; } diff --git a/src/catch2/catch_config.hpp b/src/catch2/catch_config.hpp index 324d634c..6b4a9205 100644 --- a/src/catch2/catch_config.hpp +++ b/src/catch2/catch_config.hpp @@ -56,7 +56,7 @@ namespace Catch { ShowDurations showDurations = ShowDurations::DefaultForReporter; double minDuration = -1; TestRunOrder runOrder = TestRunOrder::Declared; - ColourMode colourMode = ColourMode::PlatformDefault; + ColourMode defaultColourMode = ColourMode::PlatformDefault; WaitForKeypress::When waitForKeypress = WaitForKeypress::Never; std::string defaultOutputFilename; @@ -104,7 +104,7 @@ namespace Catch { uint32_t rngSeed() const override; unsigned int shardCount() const override; unsigned int shardIndex() const override; - ColourMode colourMode() const override; + ColourMode defaultColourMode() const override; bool shouldDebugBreak() const override; int abortAfter() const override; bool showInvisibles() const override; diff --git a/src/catch2/catch_session.cpp b/src/catch2/catch_session.cpp index 74731cd0..86295844 100644 --- a/src/catch2/catch_session.cpp +++ b/src/catch2/catch_session.cpp @@ -51,7 +51,7 @@ namespace Catch { ReporterConfig( config, stream, - spec.colourMode().valueOr( config->colourMode() ), + spec.colourMode().valueOr( config->defaultColourMode() ), spec.customOptions() ) ); } @@ -70,7 +70,7 @@ namespace Catch { ReporterConfig( config, stream, reporterSpec.colourMode().valueOr( - config->colourMode() ), + config->defaultColourMode() ), reporterSpec.customOptions() ) ) ); reporterIdx++; } diff --git a/src/catch2/interfaces/catch_interfaces_config.hpp b/src/catch2/interfaces/catch_interfaces_config.hpp index fb3b2977..968c868e 100644 --- a/src/catch2/interfaces/catch_interfaces_config.hpp +++ b/src/catch2/interfaces/catch_interfaces_config.hpp @@ -84,7 +84,7 @@ namespace Catch { virtual uint32_t rngSeed() const = 0; virtual unsigned int shardCount() const = 0; virtual unsigned int shardIndex() const = 0; - virtual ColourMode colourMode() const = 0; + virtual ColourMode defaultColourMode() const = 0; virtual std::vector<std::string> const& getSectionsToRun() const = 0; virtual Verbosity verbosity() const = 0; diff --git a/src/catch2/internal/catch_commandline.cpp b/src/catch2/internal/catch_commandline.cpp index 46b6d9d0..d16e7e37 100644 --- a/src/catch2/internal/catch_commandline.cpp +++ b/src/catch2/internal/catch_commandline.cpp @@ -97,8 +97,7 @@ namespace Catch { return ParserResult::runtimeError("Could not parse '" + seed + "' as seed"); } }; - auto const setColourMode = [&]( std::string const& - colourMode ) { + auto const setDefaultColourMode = [&]( std::string const& colourMode ) { Optional<ColourMode> maybeMode = Catch::Detail::stringToColourMode(toLower( colourMode )); if ( !maybeMode ) { return ParserResult::runtimeError( @@ -112,7 +111,7 @@ namespace Catch { "colour mode '" + colourMode + "' is not supported in this binary" ); } - config.colourMode = mode; + config.defaultColourMode = mode; return ParserResult::ok( ParseResultType::Matched ); }; auto const setWaitForKeypress = [&]( std::string const& keypress ) { @@ -290,7 +289,7 @@ namespace Catch { | Opt( setRngSeed, "'time'|'random-device'|number" ) ["--rng-seed"] ( "set a specific seed for random numbers" ) - | Opt( setColourMode, "ansi|win32|none|default" ) + | Opt( setDefaultColourMode, "ansi|win32|none|default" ) ["--colour-mode"] ( "what color mode should be used as default" ) | Opt( config.libIdentify ) |