mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-02 13:25:41 +02:00
Refactor parsing of shard index/count in cmdline handling
This worsens the message for negative numbers a bit, but simplifies the code enough that this is still a win.
This commit is contained in:
@@ -2418,11 +2418,11 @@ ok {test-number} - config.shardCount == 8 for: 8 == 8
|
||||
# Parsing sharding-related cli flags
|
||||
ok {test-number} - !(result) for: !{?}
|
||||
# Parsing sharding-related cli flags
|
||||
ok {test-number} - result.errorMessage(), ContainsSubstring("Shard count must be a positive number") for: "Shard count must be a positive number" contains: "Shard count must be a positive number"
|
||||
ok {test-number} - result.errorMessage(), ContainsSubstring( "Could not parse '-1' as shard count" ) for: "Could not parse '-1' as shard count" contains: "Could not parse '-1' as shard count"
|
||||
# Parsing sharding-related cli flags
|
||||
ok {test-number} - !(result) for: !{?}
|
||||
# Parsing sharding-related cli flags
|
||||
ok {test-number} - result.errorMessage(), ContainsSubstring("Shard count must be a positive number") for: "Shard count must be a positive number" contains: "Shard count must be a positive number"
|
||||
ok {test-number} - result.errorMessage(), ContainsSubstring( "Shard count must be positive" ) for: "Shard count must be positive" contains: "Shard count must be positive"
|
||||
# Parsing sharding-related cli flags
|
||||
ok {test-number} - cli.parse({ "test", "--shard-index=2" }) for: {?}
|
||||
# Parsing sharding-related cli flags
|
||||
@@ -2430,7 +2430,7 @@ ok {test-number} - config.shardIndex == 2 for: 2 == 2
|
||||
# Parsing sharding-related cli flags
|
||||
ok {test-number} - !(result) for: !{?}
|
||||
# Parsing sharding-related cli flags
|
||||
ok {test-number} - result.errorMessage(), ContainsSubstring("Shard index must be a non-negative number") for: "Shard index must be a non-negative number" contains: "Shard index must be a non-negative number"
|
||||
ok {test-number} - result.errorMessage(), ContainsSubstring( "Could not parse '-12' as shard index" ) for: "Could not parse '-12' as shard index" contains: "Could not parse '-12' as shard index"
|
||||
# Parsing sharding-related cli flags
|
||||
ok {test-number} - cli.parse({ "test", "--shard-index=0" }) for: {?}
|
||||
# Parsing sharding-related cli flags
|
||||
|
Reference in New Issue
Block a user