mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 13:26:10 +01:00
Rename config::colourMode to config::defaultConfigMode
This describes the actual intention much better.
This commit is contained in:
parent
c43947eb47
commit
d5bfce4d84
@ -127,7 +127,7 @@ namespace Catch {
|
|||||||
uint32_t Config::rngSeed() const { return m_data.rngSeed; }
|
uint32_t Config::rngSeed() const { return m_data.rngSeed; }
|
||||||
unsigned int Config::shardCount() const { return m_data.shardCount; }
|
unsigned int Config::shardCount() const { return m_data.shardCount; }
|
||||||
unsigned int Config::shardIndex() const { return m_data.shardIndex; }
|
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; }
|
bool Config::shouldDebugBreak() const { return m_data.shouldDebugBreak; }
|
||||||
int Config::abortAfter() const { return m_data.abortAfter; }
|
int Config::abortAfter() const { return m_data.abortAfter; }
|
||||||
bool Config::showInvisibles() const { return m_data.showInvisibles; }
|
bool Config::showInvisibles() const { return m_data.showInvisibles; }
|
||||||
|
@ -56,7 +56,7 @@ namespace Catch {
|
|||||||
ShowDurations showDurations = ShowDurations::DefaultForReporter;
|
ShowDurations showDurations = ShowDurations::DefaultForReporter;
|
||||||
double minDuration = -1;
|
double minDuration = -1;
|
||||||
TestRunOrder runOrder = TestRunOrder::Declared;
|
TestRunOrder runOrder = TestRunOrder::Declared;
|
||||||
ColourMode colourMode = ColourMode::PlatformDefault;
|
ColourMode defaultColourMode = ColourMode::PlatformDefault;
|
||||||
WaitForKeypress::When waitForKeypress = WaitForKeypress::Never;
|
WaitForKeypress::When waitForKeypress = WaitForKeypress::Never;
|
||||||
|
|
||||||
std::string defaultOutputFilename;
|
std::string defaultOutputFilename;
|
||||||
@ -104,7 +104,7 @@ namespace Catch {
|
|||||||
uint32_t rngSeed() const override;
|
uint32_t rngSeed() const override;
|
||||||
unsigned int shardCount() const override;
|
unsigned int shardCount() const override;
|
||||||
unsigned int shardIndex() const override;
|
unsigned int shardIndex() const override;
|
||||||
ColourMode colourMode() const override;
|
ColourMode defaultColourMode() const override;
|
||||||
bool shouldDebugBreak() const override;
|
bool shouldDebugBreak() const override;
|
||||||
int abortAfter() const override;
|
int abortAfter() const override;
|
||||||
bool showInvisibles() const override;
|
bool showInvisibles() const override;
|
||||||
|
@ -51,7 +51,7 @@ namespace Catch {
|
|||||||
ReporterConfig(
|
ReporterConfig(
|
||||||
config,
|
config,
|
||||||
stream,
|
stream,
|
||||||
spec.colourMode().valueOr( config->colourMode() ),
|
spec.colourMode().valueOr( config->defaultColourMode() ),
|
||||||
spec.customOptions() ) );
|
spec.customOptions() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,7 +70,7 @@ namespace Catch {
|
|||||||
ReporterConfig( config,
|
ReporterConfig( config,
|
||||||
stream,
|
stream,
|
||||||
reporterSpec.colourMode().valueOr(
|
reporterSpec.colourMode().valueOr(
|
||||||
config->colourMode() ),
|
config->defaultColourMode() ),
|
||||||
reporterSpec.customOptions() ) ) );
|
reporterSpec.customOptions() ) ) );
|
||||||
reporterIdx++;
|
reporterIdx++;
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,7 @@ namespace Catch {
|
|||||||
virtual uint32_t rngSeed() const = 0;
|
virtual uint32_t rngSeed() const = 0;
|
||||||
virtual unsigned int shardCount() const = 0;
|
virtual unsigned int shardCount() const = 0;
|
||||||
virtual unsigned int shardIndex() 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 std::vector<std::string> const& getSectionsToRun() const = 0;
|
||||||
virtual Verbosity verbosity() const = 0;
|
virtual Verbosity verbosity() const = 0;
|
||||||
|
|
||||||
|
@ -97,8 +97,7 @@ namespace Catch {
|
|||||||
return ParserResult::runtimeError("Could not parse '" + seed + "' as seed");
|
return ParserResult::runtimeError("Could not parse '" + seed + "' as seed");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
auto const setColourMode = [&]( std::string const&
|
auto const setDefaultColourMode = [&]( std::string const& colourMode ) {
|
||||||
colourMode ) {
|
|
||||||
Optional<ColourMode> maybeMode = Catch::Detail::stringToColourMode(toLower( colourMode ));
|
Optional<ColourMode> maybeMode = Catch::Detail::stringToColourMode(toLower( colourMode ));
|
||||||
if ( !maybeMode ) {
|
if ( !maybeMode ) {
|
||||||
return ParserResult::runtimeError(
|
return ParserResult::runtimeError(
|
||||||
@ -112,7 +111,7 @@ namespace Catch {
|
|||||||
"colour mode '" + colourMode +
|
"colour mode '" + colourMode +
|
||||||
"' is not supported in this binary" );
|
"' is not supported in this binary" );
|
||||||
}
|
}
|
||||||
config.colourMode = mode;
|
config.defaultColourMode = mode;
|
||||||
return ParserResult::ok( ParseResultType::Matched );
|
return ParserResult::ok( ParseResultType::Matched );
|
||||||
};
|
};
|
||||||
auto const setWaitForKeypress = [&]( std::string const& keypress ) {
|
auto const setWaitForKeypress = [&]( std::string const& keypress ) {
|
||||||
@ -290,7 +289,7 @@ namespace Catch {
|
|||||||
| Opt( setRngSeed, "'time'|'random-device'|number" )
|
| Opt( setRngSeed, "'time'|'random-device'|number" )
|
||||||
["--rng-seed"]
|
["--rng-seed"]
|
||||||
( "set a specific seed for random numbers" )
|
( "set a specific seed for random numbers" )
|
||||||
| Opt( setColourMode, "ansi|win32|none|default" )
|
| Opt( setDefaultColourMode, "ansi|win32|none|default" )
|
||||||
["--colour-mode"]
|
["--colour-mode"]
|
||||||
( "what color mode should be used as default" )
|
( "what color mode should be used as default" )
|
||||||
| Opt( config.libIdentify )
|
| Opt( config.libIdentify )
|
||||||
|
@ -1381,13 +1381,13 @@ CmdLine.tests.cpp:<line number>: passed: config.abortAfter == 1 for: 1 == 1
|
|||||||
CmdLine.tests.cpp:<line number>: passed: config.shouldDebugBreak for: true
|
CmdLine.tests.cpp:<line number>: passed: config.shouldDebugBreak for: true
|
||||||
CmdLine.tests.cpp:<line number>: passed: config.noThrow == true for: true == true
|
CmdLine.tests.cpp:<line number>: passed: config.noThrow == true for: true == true
|
||||||
CmdLine.tests.cpp:<line number>: passed: cli.parse({"test"}) for: {?}
|
CmdLine.tests.cpp:<line number>: passed: cli.parse({"test"}) for: {?}
|
||||||
CmdLine.tests.cpp:<line number>: passed: config.colourMode == ColourMode::PlatformDefault for: 0 == 0
|
CmdLine.tests.cpp:<line number>: passed: config.defaultColourMode == ColourMode::PlatformDefault for: 0 == 0
|
||||||
CmdLine.tests.cpp:<line number>: passed: cli.parse( { "test", "--colour-mode", "default" } ) for: {?}
|
CmdLine.tests.cpp:<line number>: passed: cli.parse( { "test", "--colour-mode", "default" } ) for: {?}
|
||||||
CmdLine.tests.cpp:<line number>: passed: config.colourMode == ColourMode::PlatformDefault for: 0 == 0
|
CmdLine.tests.cpp:<line number>: passed: config.defaultColourMode == ColourMode::PlatformDefault for: 0 == 0
|
||||||
CmdLine.tests.cpp:<line number>: passed: cli.parse({"test", "--colour-mode", "ansi"}) for: {?}
|
CmdLine.tests.cpp:<line number>: passed: cli.parse({"test", "--colour-mode", "ansi"}) for: {?}
|
||||||
CmdLine.tests.cpp:<line number>: passed: config.colourMode == ColourMode::ANSI for: 1 == 1
|
CmdLine.tests.cpp:<line number>: passed: config.defaultColourMode == ColourMode::ANSI for: 1 == 1
|
||||||
CmdLine.tests.cpp:<line number>: passed: cli.parse({"test", "--colour-mode", "none"}) for: {?}
|
CmdLine.tests.cpp:<line number>: passed: cli.parse({"test", "--colour-mode", "none"}) for: {?}
|
||||||
CmdLine.tests.cpp:<line number>: passed: config.colourMode == ColourMode::None for: 3 == 3
|
CmdLine.tests.cpp:<line number>: passed: config.defaultColourMode == ColourMode::None for: 3 == 3
|
||||||
CmdLine.tests.cpp:<line number>: passed: !result for: true
|
CmdLine.tests.cpp:<line number>: passed: !result for: true
|
||||||
CmdLine.tests.cpp:<line number>: passed: result.errorMessage(), ContainsSubstring( "colour mode must be one of" ) for: "colour mode must be one of: default, ansi, win32, or none. 'wrong' is not recognised" contains: "colour mode must be one of"
|
CmdLine.tests.cpp:<line number>: passed: result.errorMessage(), ContainsSubstring( "colour mode must be one of" ) for: "colour mode must be one of: default, ansi, win32, or none. 'wrong' is not recognised" contains: "colour mode must be one of"
|
||||||
CmdLine.tests.cpp:<line number>: passed: cli.parse({ "test", "--benchmark-samples=200" }) for: {?}
|
CmdLine.tests.cpp:<line number>: passed: cli.parse({ "test", "--benchmark-samples=200" }) for: {?}
|
||||||
|
@ -1379,13 +1379,13 @@ CmdLine.tests.cpp:<line number>: passed: config.abortAfter == 1 for: 1 == 1
|
|||||||
CmdLine.tests.cpp:<line number>: passed: config.shouldDebugBreak for: true
|
CmdLine.tests.cpp:<line number>: passed: config.shouldDebugBreak for: true
|
||||||
CmdLine.tests.cpp:<line number>: passed: config.noThrow == true for: true == true
|
CmdLine.tests.cpp:<line number>: passed: config.noThrow == true for: true == true
|
||||||
CmdLine.tests.cpp:<line number>: passed: cli.parse({"test"}) for: {?}
|
CmdLine.tests.cpp:<line number>: passed: cli.parse({"test"}) for: {?}
|
||||||
CmdLine.tests.cpp:<line number>: passed: config.colourMode == ColourMode::PlatformDefault for: 0 == 0
|
CmdLine.tests.cpp:<line number>: passed: config.defaultColourMode == ColourMode::PlatformDefault for: 0 == 0
|
||||||
CmdLine.tests.cpp:<line number>: passed: cli.parse( { "test", "--colour-mode", "default" } ) for: {?}
|
CmdLine.tests.cpp:<line number>: passed: cli.parse( { "test", "--colour-mode", "default" } ) for: {?}
|
||||||
CmdLine.tests.cpp:<line number>: passed: config.colourMode == ColourMode::PlatformDefault for: 0 == 0
|
CmdLine.tests.cpp:<line number>: passed: config.defaultColourMode == ColourMode::PlatformDefault for: 0 == 0
|
||||||
CmdLine.tests.cpp:<line number>: passed: cli.parse({"test", "--colour-mode", "ansi"}) for: {?}
|
CmdLine.tests.cpp:<line number>: passed: cli.parse({"test", "--colour-mode", "ansi"}) for: {?}
|
||||||
CmdLine.tests.cpp:<line number>: passed: config.colourMode == ColourMode::ANSI for: 1 == 1
|
CmdLine.tests.cpp:<line number>: passed: config.defaultColourMode == ColourMode::ANSI for: 1 == 1
|
||||||
CmdLine.tests.cpp:<line number>: passed: cli.parse({"test", "--colour-mode", "none"}) for: {?}
|
CmdLine.tests.cpp:<line number>: passed: cli.parse({"test", "--colour-mode", "none"}) for: {?}
|
||||||
CmdLine.tests.cpp:<line number>: passed: config.colourMode == ColourMode::None for: 3 == 3
|
CmdLine.tests.cpp:<line number>: passed: config.defaultColourMode == ColourMode::None for: 3 == 3
|
||||||
CmdLine.tests.cpp:<line number>: passed: !result for: true
|
CmdLine.tests.cpp:<line number>: passed: !result for: true
|
||||||
CmdLine.tests.cpp:<line number>: passed: result.errorMessage(), ContainsSubstring( "colour mode must be one of" ) for: "colour mode must be one of: default, ansi, win32, or none. 'wrong' is not recognised" contains: "colour mode must be one of"
|
CmdLine.tests.cpp:<line number>: passed: result.errorMessage(), ContainsSubstring( "colour mode must be one of" ) for: "colour mode must be one of: default, ansi, win32, or none. 'wrong' is not recognised" contains: "colour mode must be one of"
|
||||||
CmdLine.tests.cpp:<line number>: passed: cli.parse({ "test", "--benchmark-samples=200" }) for: {?}
|
CmdLine.tests.cpp:<line number>: passed: cli.parse({ "test", "--benchmark-samples=200" }) for: {?}
|
||||||
|
@ -10014,7 +10014,7 @@ with expansion:
|
|||||||
{?}
|
{?}
|
||||||
|
|
||||||
CmdLine.tests.cpp:<line number>: PASSED:
|
CmdLine.tests.cpp:<line number>: PASSED:
|
||||||
REQUIRE( config.colourMode == ColourMode::PlatformDefault )
|
REQUIRE( config.defaultColourMode == ColourMode::PlatformDefault )
|
||||||
with expansion:
|
with expansion:
|
||||||
0 == 0
|
0 == 0
|
||||||
|
|
||||||
@ -10032,7 +10032,7 @@ with expansion:
|
|||||||
{?}
|
{?}
|
||||||
|
|
||||||
CmdLine.tests.cpp:<line number>: PASSED:
|
CmdLine.tests.cpp:<line number>: PASSED:
|
||||||
REQUIRE( config.colourMode == ColourMode::PlatformDefault )
|
REQUIRE( config.defaultColourMode == ColourMode::PlatformDefault )
|
||||||
with expansion:
|
with expansion:
|
||||||
0 == 0
|
0 == 0
|
||||||
|
|
||||||
@ -10050,7 +10050,7 @@ with expansion:
|
|||||||
{?}
|
{?}
|
||||||
|
|
||||||
CmdLine.tests.cpp:<line number>: PASSED:
|
CmdLine.tests.cpp:<line number>: PASSED:
|
||||||
REQUIRE( config.colourMode == ColourMode::ANSI )
|
REQUIRE( config.defaultColourMode == ColourMode::ANSI )
|
||||||
with expansion:
|
with expansion:
|
||||||
1 == 1
|
1 == 1
|
||||||
|
|
||||||
@ -10068,7 +10068,7 @@ with expansion:
|
|||||||
{?}
|
{?}
|
||||||
|
|
||||||
CmdLine.tests.cpp:<line number>: PASSED:
|
CmdLine.tests.cpp:<line number>: PASSED:
|
||||||
REQUIRE( config.colourMode == ColourMode::None )
|
REQUIRE( config.defaultColourMode == ColourMode::None )
|
||||||
with expansion:
|
with expansion:
|
||||||
3 == 3
|
3 == 3
|
||||||
|
|
||||||
|
@ -10012,7 +10012,7 @@ with expansion:
|
|||||||
{?}
|
{?}
|
||||||
|
|
||||||
CmdLine.tests.cpp:<line number>: PASSED:
|
CmdLine.tests.cpp:<line number>: PASSED:
|
||||||
REQUIRE( config.colourMode == ColourMode::PlatformDefault )
|
REQUIRE( config.defaultColourMode == ColourMode::PlatformDefault )
|
||||||
with expansion:
|
with expansion:
|
||||||
0 == 0
|
0 == 0
|
||||||
|
|
||||||
@ -10030,7 +10030,7 @@ with expansion:
|
|||||||
{?}
|
{?}
|
||||||
|
|
||||||
CmdLine.tests.cpp:<line number>: PASSED:
|
CmdLine.tests.cpp:<line number>: PASSED:
|
||||||
REQUIRE( config.colourMode == ColourMode::PlatformDefault )
|
REQUIRE( config.defaultColourMode == ColourMode::PlatformDefault )
|
||||||
with expansion:
|
with expansion:
|
||||||
0 == 0
|
0 == 0
|
||||||
|
|
||||||
@ -10048,7 +10048,7 @@ with expansion:
|
|||||||
{?}
|
{?}
|
||||||
|
|
||||||
CmdLine.tests.cpp:<line number>: PASSED:
|
CmdLine.tests.cpp:<line number>: PASSED:
|
||||||
REQUIRE( config.colourMode == ColourMode::ANSI )
|
REQUIRE( config.defaultColourMode == ColourMode::ANSI )
|
||||||
with expansion:
|
with expansion:
|
||||||
1 == 1
|
1 == 1
|
||||||
|
|
||||||
@ -10066,7 +10066,7 @@ with expansion:
|
|||||||
{?}
|
{?}
|
||||||
|
|
||||||
CmdLine.tests.cpp:<line number>: PASSED:
|
CmdLine.tests.cpp:<line number>: PASSED:
|
||||||
REQUIRE( config.colourMode == ColourMode::None )
|
REQUIRE( config.defaultColourMode == ColourMode::None )
|
||||||
with expansion:
|
with expansion:
|
||||||
3 == 3
|
3 == 3
|
||||||
|
|
||||||
|
@ -2609,19 +2609,19 @@ ok {test-number} - config.noThrow == true for: true == true
|
|||||||
# Process can be configured on command line
|
# Process can be configured on command line
|
||||||
ok {test-number} - cli.parse({"test"}) for: {?}
|
ok {test-number} - cli.parse({"test"}) for: {?}
|
||||||
# Process can be configured on command line
|
# Process can be configured on command line
|
||||||
ok {test-number} - config.colourMode == ColourMode::PlatformDefault for: 0 == 0
|
ok {test-number} - config.defaultColourMode == ColourMode::PlatformDefault for: 0 == 0
|
||||||
# Process can be configured on command line
|
# Process can be configured on command line
|
||||||
ok {test-number} - cli.parse( { "test", "--colour-mode", "default" } ) for: {?}
|
ok {test-number} - cli.parse( { "test", "--colour-mode", "default" } ) for: {?}
|
||||||
# Process can be configured on command line
|
# Process can be configured on command line
|
||||||
ok {test-number} - config.colourMode == ColourMode::PlatformDefault for: 0 == 0
|
ok {test-number} - config.defaultColourMode == ColourMode::PlatformDefault for: 0 == 0
|
||||||
# Process can be configured on command line
|
# Process can be configured on command line
|
||||||
ok {test-number} - cli.parse({"test", "--colour-mode", "ansi"}) for: {?}
|
ok {test-number} - cli.parse({"test", "--colour-mode", "ansi"}) for: {?}
|
||||||
# Process can be configured on command line
|
# Process can be configured on command line
|
||||||
ok {test-number} - config.colourMode == ColourMode::ANSI for: 1 == 1
|
ok {test-number} - config.defaultColourMode == ColourMode::ANSI for: 1 == 1
|
||||||
# Process can be configured on command line
|
# Process can be configured on command line
|
||||||
ok {test-number} - cli.parse({"test", "--colour-mode", "none"}) for: {?}
|
ok {test-number} - cli.parse({"test", "--colour-mode", "none"}) for: {?}
|
||||||
# Process can be configured on command line
|
# Process can be configured on command line
|
||||||
ok {test-number} - config.colourMode == ColourMode::None for: 3 == 3
|
ok {test-number} - config.defaultColourMode == ColourMode::None for: 3 == 3
|
||||||
# Process can be configured on command line
|
# Process can be configured on command line
|
||||||
ok {test-number} - !result for: true
|
ok {test-number} - !result for: true
|
||||||
# Process can be configured on command line
|
# Process can be configured on command line
|
||||||
|
@ -2607,19 +2607,19 @@ ok {test-number} - config.noThrow == true for: true == true
|
|||||||
# Process can be configured on command line
|
# Process can be configured on command line
|
||||||
ok {test-number} - cli.parse({"test"}) for: {?}
|
ok {test-number} - cli.parse({"test"}) for: {?}
|
||||||
# Process can be configured on command line
|
# Process can be configured on command line
|
||||||
ok {test-number} - config.colourMode == ColourMode::PlatformDefault for: 0 == 0
|
ok {test-number} - config.defaultColourMode == ColourMode::PlatformDefault for: 0 == 0
|
||||||
# Process can be configured on command line
|
# Process can be configured on command line
|
||||||
ok {test-number} - cli.parse( { "test", "--colour-mode", "default" } ) for: {?}
|
ok {test-number} - cli.parse( { "test", "--colour-mode", "default" } ) for: {?}
|
||||||
# Process can be configured on command line
|
# Process can be configured on command line
|
||||||
ok {test-number} - config.colourMode == ColourMode::PlatformDefault for: 0 == 0
|
ok {test-number} - config.defaultColourMode == ColourMode::PlatformDefault for: 0 == 0
|
||||||
# Process can be configured on command line
|
# Process can be configured on command line
|
||||||
ok {test-number} - cli.parse({"test", "--colour-mode", "ansi"}) for: {?}
|
ok {test-number} - cli.parse({"test", "--colour-mode", "ansi"}) for: {?}
|
||||||
# Process can be configured on command line
|
# Process can be configured on command line
|
||||||
ok {test-number} - config.colourMode == ColourMode::ANSI for: 1 == 1
|
ok {test-number} - config.defaultColourMode == ColourMode::ANSI for: 1 == 1
|
||||||
# Process can be configured on command line
|
# Process can be configured on command line
|
||||||
ok {test-number} - cli.parse({"test", "--colour-mode", "none"}) for: {?}
|
ok {test-number} - cli.parse({"test", "--colour-mode", "none"}) for: {?}
|
||||||
# Process can be configured on command line
|
# Process can be configured on command line
|
||||||
ok {test-number} - config.colourMode == ColourMode::None for: 3 == 3
|
ok {test-number} - config.defaultColourMode == ColourMode::None for: 3 == 3
|
||||||
# Process can be configured on command line
|
# Process can be configured on command line
|
||||||
ok {test-number} - !result for: true
|
ok {test-number} - !result for: true
|
||||||
# Process can be configured on command line
|
# Process can be configured on command line
|
||||||
|
@ -12208,7 +12208,7 @@ C
|
|||||||
</Expression>
|
</Expression>
|
||||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||||
<Original>
|
<Original>
|
||||||
config.colourMode == ColourMode::PlatformDefault
|
config.defaultColourMode == ColourMode::PlatformDefault
|
||||||
</Original>
|
</Original>
|
||||||
<Expanded>
|
<Expanded>
|
||||||
0 == 0
|
0 == 0
|
||||||
@ -12230,7 +12230,7 @@ C
|
|||||||
</Expression>
|
</Expression>
|
||||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||||
<Original>
|
<Original>
|
||||||
config.colourMode == ColourMode::PlatformDefault
|
config.defaultColourMode == ColourMode::PlatformDefault
|
||||||
</Original>
|
</Original>
|
||||||
<Expanded>
|
<Expanded>
|
||||||
0 == 0
|
0 == 0
|
||||||
@ -12252,7 +12252,7 @@ C
|
|||||||
</Expression>
|
</Expression>
|
||||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||||
<Original>
|
<Original>
|
||||||
config.colourMode == ColourMode::ANSI
|
config.defaultColourMode == ColourMode::ANSI
|
||||||
</Original>
|
</Original>
|
||||||
<Expanded>
|
<Expanded>
|
||||||
1 == 1
|
1 == 1
|
||||||
@ -12274,7 +12274,7 @@ C
|
|||||||
</Expression>
|
</Expression>
|
||||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||||
<Original>
|
<Original>
|
||||||
config.colourMode == ColourMode::None
|
config.defaultColourMode == ColourMode::None
|
||||||
</Original>
|
</Original>
|
||||||
<Expanded>
|
<Expanded>
|
||||||
3 == 3
|
3 == 3
|
||||||
|
@ -12208,7 +12208,7 @@ C
|
|||||||
</Expression>
|
</Expression>
|
||||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||||
<Original>
|
<Original>
|
||||||
config.colourMode == ColourMode::PlatformDefault
|
config.defaultColourMode == ColourMode::PlatformDefault
|
||||||
</Original>
|
</Original>
|
||||||
<Expanded>
|
<Expanded>
|
||||||
0 == 0
|
0 == 0
|
||||||
@ -12230,7 +12230,7 @@ C
|
|||||||
</Expression>
|
</Expression>
|
||||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||||
<Original>
|
<Original>
|
||||||
config.colourMode == ColourMode::PlatformDefault
|
config.defaultColourMode == ColourMode::PlatformDefault
|
||||||
</Original>
|
</Original>
|
||||||
<Expanded>
|
<Expanded>
|
||||||
0 == 0
|
0 == 0
|
||||||
@ -12252,7 +12252,7 @@ C
|
|||||||
</Expression>
|
</Expression>
|
||||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||||
<Original>
|
<Original>
|
||||||
config.colourMode == ColourMode::ANSI
|
config.defaultColourMode == ColourMode::ANSI
|
||||||
</Original>
|
</Original>
|
||||||
<Expanded>
|
<Expanded>
|
||||||
1 == 1
|
1 == 1
|
||||||
@ -12274,7 +12274,7 @@ C
|
|||||||
</Expression>
|
</Expression>
|
||||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||||
<Original>
|
<Original>
|
||||||
config.colourMode == ColourMode::None
|
config.defaultColourMode == ColourMode::None
|
||||||
</Original>
|
</Original>
|
||||||
<Expanded>
|
<Expanded>
|
||||||
3 == 3
|
3 == 3
|
||||||
|
@ -566,25 +566,25 @@ TEST_CASE( "Process can be configured on command line", "[config][command-line]"
|
|||||||
SECTION( "without option" ) {
|
SECTION( "without option" ) {
|
||||||
CHECK(cli.parse({"test"}));
|
CHECK(cli.parse({"test"}));
|
||||||
|
|
||||||
REQUIRE( config.colourMode == ColourMode::PlatformDefault );
|
REQUIRE( config.defaultColourMode == ColourMode::PlatformDefault );
|
||||||
}
|
}
|
||||||
|
|
||||||
SECTION( "auto" ) {
|
SECTION( "auto" ) {
|
||||||
CHECK( cli.parse( { "test", "--colour-mode", "default" } ) );
|
CHECK( cli.parse( { "test", "--colour-mode", "default" } ) );
|
||||||
|
|
||||||
REQUIRE( config.colourMode == ColourMode::PlatformDefault );
|
REQUIRE( config.defaultColourMode == ColourMode::PlatformDefault );
|
||||||
}
|
}
|
||||||
|
|
||||||
SECTION( "yes" ) {
|
SECTION( "yes" ) {
|
||||||
CHECK(cli.parse({"test", "--colour-mode", "ansi"}));
|
CHECK(cli.parse({"test", "--colour-mode", "ansi"}));
|
||||||
|
|
||||||
REQUIRE( config.colourMode == ColourMode::ANSI );
|
REQUIRE( config.defaultColourMode == ColourMode::ANSI );
|
||||||
}
|
}
|
||||||
|
|
||||||
SECTION( "no" ) {
|
SECTION( "no" ) {
|
||||||
CHECK(cli.parse({"test", "--colour-mode", "none"}));
|
CHECK(cli.parse({"test", "--colour-mode", "none"}));
|
||||||
|
|
||||||
REQUIRE( config.colourMode == ColourMode::None );
|
REQUIRE( config.defaultColourMode == ColourMode::None );
|
||||||
}
|
}
|
||||||
|
|
||||||
SECTION( "error" ) {
|
SECTION( "error" ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user