Support filtering on both sections and generators (#3069)
Not being able to filter generators to specific element has been regularly causing problems. It was possible to use a dynamic section to run tests for specific element in a generator, at least if the element had a nice string representation, but the test case would still run once per element in the generator. With this change, it is possible to have the generator return only one specific element, and do so based on the index, rather than the string representation of the element. This enables simple debugging of tests that fail for specific generator element.
This commit is contained in:
1 parent
b6c7b217d4
commit
3a0cf7e75f
42 files changed
+1716
-159
No files matched your search
@@ -215,6 +215,7 @@ Nor would this
|
||||
:test-result: PASS Overloaded comma or address-of operators are not used
|
||||
:test-result: PASS Parse uints
|
||||
:test-result: PASS Parsed tags are matched case insensitive
|
||||
:test-result: PASS Parsing path filter specs
|
||||
:test-result: PASS Parsing sharding-related cli flags
|
||||
:test-result: PASS Parsing tags with non-alphabetical characters is pass-through
|
||||
:test-result: PASS Parsing warnings
|
||||
|
||||
@@ -213,6 +213,7 @@
|
||||
:test-result: PASS Overloaded comma or address-of operators are not used
|
||||
:test-result: PASS Parse uints
|
||||
:test-result: PASS Parsed tags are matched case insensitive
|
||||
:test-result: PASS Parsing path filter specs
|
||||
:test-result: PASS Parsing sharding-related cli flags
|
||||
:test-result: PASS Parsing tags with non-alphabetical characters is pass-through
|
||||
:test-result: PASS Parsing warnings
|
||||
|
||||
@@ -1425,6 +1425,29 @@ Parse.tests.cpp:<line number>: passed: !(parseUInt( "0x<hex digits>", 10 )) for:
|
||||
TestSpecParser.tests.cpp:<line number>: passed: spec.hasFilters() for: true
|
||||
TestSpecParser.tests.cpp:<line number>: passed: spec.getInvalidSpecs().empty() for: true
|
||||
TestSpecParser.tests.cpp:<line number>: passed: spec.matches( testCase ) for: true
|
||||
CmdLine.tests.cpp:<line number>: passed: result for: {?}
|
||||
CmdLine.tests.cpp:<line number>: passed: !(config.useNewPathFilteringBehaviour) for: !false
|
||||
CmdLine.tests.cpp:<line number>: passed: result for: {?}
|
||||
CmdLine.tests.cpp:<line number>: passed: config.useNewPathFilteringBehaviour for: true
|
||||
CmdLine.tests.cpp:<line number>: passed: !(result) for: !{?}
|
||||
CmdLine.tests.cpp:<line number>: passed: result for: {?}
|
||||
CmdLine.tests.cpp:<line number>: passed: config.pathFilters[0] == PathFilter( PathFilter::For::Generator, "*" ) for: {?} == {?}
|
||||
CmdLine.tests.cpp:<line number>: passed: !(result) for: !{?}
|
||||
CmdLine.tests.cpp:<line number>: passed: result for: {?}
|
||||
CmdLine.tests.cpp:<line number>: passed: config.useNewPathFilteringBehaviour for: true
|
||||
CmdLine.tests.cpp:<line number>: passed: config.pathFilters[0] == PathFilter( PathFilter::For::Generator, "1" ) for: {?} == {?}
|
||||
CmdLine.tests.cpp:<line number>: passed: config.pathFilters[1] == PathFilter( PathFilter::For::Section, "foobar" ) for: {?} == {?}
|
||||
CmdLine.tests.cpp:<line number>: passed: !(result) for: !{?}
|
||||
CmdLine.tests.cpp:<line number>: passed: !(result1) for: !{?}
|
||||
CmdLine.tests.cpp:<line number>: passed: !(result2) for: !{?}
|
||||
CmdLine.tests.cpp:<line number>: passed: result for: {?}
|
||||
CmdLine.tests.cpp:<line number>: passed: config.pathFilters[0] == PathFilter( PathFilter::For::Section, "foo-bar" ) for: {?} == {?}
|
||||
CmdLine.tests.cpp:<line number>: passed: config.pathFilters[1] == PathFilter( PathFilter::For::Generator, "3" ) for: {?} == {?}
|
||||
CmdLine.tests.cpp:<line number>: passed: config.pathFilters[2] == PathFilter( PathFilter::For::Generator, "123" ) for: {?} == {?}
|
||||
CmdLine.tests.cpp:<line number>: passed: config.pathFilters[3] == PathFilter( PathFilter::For::Section, "baz" ) for: {?} == {?}
|
||||
CmdLine.tests.cpp:<line number>: passed: result for: {?}
|
||||
CmdLine.tests.cpp:<line number>: passed: config.pathFilters[0] == PathFilter(PathFilter::For::Section, "untrimmed" ) for: {?} == {?}
|
||||
CmdLine.tests.cpp:<line number>: passed: config.pathFilters[1] == PathFilter(PathFilter::For::Generator, "42" ) for: {?} == {?}
|
||||
CmdLine.tests.cpp:<line number>: passed: cli.parse({ "test", "--shard-count=8" }) for: {?}
|
||||
CmdLine.tests.cpp:<line number>: passed: config.shardCount == 8 for: 8 == 8
|
||||
CmdLine.tests.cpp:<line number>: passed: !(result) for: !{?}
|
||||
@@ -2960,7 +2983,7 @@ InternalBenchmark.tests.cpp:<line number>: passed: med == 18. for: 18.0 == 18.0
|
||||
InternalBenchmark.tests.cpp:<line number>: passed: q3 == 23. for: 23.0 == 23.0
|
||||
Misc.tests.cpp:<line number>: passed:
|
||||
Misc.tests.cpp:<line number>: passed:
|
||||
test cases: 448 | 328 passed | 96 failed | 6 skipped | 18 failed as expected
|
||||
assertions: 2376 | 2175 passed | 158 failed | 43 failed as expected
|
||||
test cases: 449 | 329 passed | 96 failed | 6 skipped | 18 failed as expected
|
||||
assertions: 2399 | 2198 passed | 158 failed | 43 failed as expected
|
||||
|
||||
|
||||
@@ -1423,6 +1423,29 @@ Parse.tests.cpp:<line number>: passed: !(parseUInt( "0x<hex digits>", 10 )) for:
|
||||
TestSpecParser.tests.cpp:<line number>: passed: spec.hasFilters() for: true
|
||||
TestSpecParser.tests.cpp:<line number>: passed: spec.getInvalidSpecs().empty() for: true
|
||||
TestSpecParser.tests.cpp:<line number>: passed: spec.matches( testCase ) for: true
|
||||
CmdLine.tests.cpp:<line number>: passed: result for: {?}
|
||||
CmdLine.tests.cpp:<line number>: passed: !(config.useNewPathFilteringBehaviour) for: !false
|
||||
CmdLine.tests.cpp:<line number>: passed: result for: {?}
|
||||
CmdLine.tests.cpp:<line number>: passed: config.useNewPathFilteringBehaviour for: true
|
||||
CmdLine.tests.cpp:<line number>: passed: !(result) for: !{?}
|
||||
CmdLine.tests.cpp:<line number>: passed: result for: {?}
|
||||
CmdLine.tests.cpp:<line number>: passed: config.pathFilters[0] == PathFilter( PathFilter::For::Generator, "*" ) for: {?} == {?}
|
||||
CmdLine.tests.cpp:<line number>: passed: !(result) for: !{?}
|
||||
CmdLine.tests.cpp:<line number>: passed: result for: {?}
|
||||
CmdLine.tests.cpp:<line number>: passed: config.useNewPathFilteringBehaviour for: true
|
||||
CmdLine.tests.cpp:<line number>: passed: config.pathFilters[0] == PathFilter( PathFilter::For::Generator, "1" ) for: {?} == {?}
|
||||
CmdLine.tests.cpp:<line number>: passed: config.pathFilters[1] == PathFilter( PathFilter::For::Section, "foobar" ) for: {?} == {?}
|
||||
CmdLine.tests.cpp:<line number>: passed: !(result) for: !{?}
|
||||
CmdLine.tests.cpp:<line number>: passed: !(result1) for: !{?}
|
||||
CmdLine.tests.cpp:<line number>: passed: !(result2) for: !{?}
|
||||
CmdLine.tests.cpp:<line number>: passed: result for: {?}
|
||||
CmdLine.tests.cpp:<line number>: passed: config.pathFilters[0] == PathFilter( PathFilter::For::Section, "foo-bar" ) for: {?} == {?}
|
||||
CmdLine.tests.cpp:<line number>: passed: config.pathFilters[1] == PathFilter( PathFilter::For::Generator, "3" ) for: {?} == {?}
|
||||
CmdLine.tests.cpp:<line number>: passed: config.pathFilters[2] == PathFilter( PathFilter::For::Generator, "123" ) for: {?} == {?}
|
||||
CmdLine.tests.cpp:<line number>: passed: config.pathFilters[3] == PathFilter( PathFilter::For::Section, "baz" ) for: {?} == {?}
|
||||
CmdLine.tests.cpp:<line number>: passed: result for: {?}
|
||||
CmdLine.tests.cpp:<line number>: passed: config.pathFilters[0] == PathFilter(PathFilter::For::Section, "untrimmed" ) for: {?} == {?}
|
||||
CmdLine.tests.cpp:<line number>: passed: config.pathFilters[1] == PathFilter(PathFilter::For::Generator, "42" ) for: {?} == {?}
|
||||
CmdLine.tests.cpp:<line number>: passed: cli.parse({ "test", "--shard-count=8" }) for: {?}
|
||||
CmdLine.tests.cpp:<line number>: passed: config.shardCount == 8 for: 8 == 8
|
||||
CmdLine.tests.cpp:<line number>: passed: !(result) for: !{?}
|
||||
@@ -2949,7 +2972,7 @@ InternalBenchmark.tests.cpp:<line number>: passed: med == 18. for: 18.0 == 18.0
|
||||
InternalBenchmark.tests.cpp:<line number>: passed: q3 == 23. for: 23.0 == 23.0
|
||||
Misc.tests.cpp:<line number>: passed:
|
||||
Misc.tests.cpp:<line number>: passed:
|
||||
test cases: 448 | 328 passed | 96 failed | 6 skipped | 18 failed as expected
|
||||
assertions: 2376 | 2175 passed | 158 failed | 43 failed as expected
|
||||
test cases: 449 | 329 passed | 96 failed | 6 skipped | 18 failed as expected
|
||||
assertions: 2399 | 2198 passed | 158 failed | 43 failed as expected
|
||||
|
||||
|
||||
@@ -1743,6 +1743,6 @@ due to unexpected exception with message:
|
||||
Why would you throw a std::string?
|
||||
|
||||
===============================================================================
|
||||
test cases: 448 | 346 passed | 76 failed | 7 skipped | 19 failed as expected
|
||||
assertions: 2354 | 2175 passed | 136 failed | 43 failed as expected
|
||||
test cases: 449 | 347 passed | 76 failed | 7 skipped | 19 failed as expected
|
||||
assertions: 2377 | 2198 passed | 136 failed | 43 failed as expected
|
||||
|
||||
@@ -9230,6 +9230,191 @@ TestSpecParser.tests.cpp:<line number>: PASSED:
|
||||
with expansion:
|
||||
true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Parsing path filter specs
|
||||
Only section specs leads to old filter behaviour
|
||||
-------------------------------------------------------------------------------
|
||||
CmdLine.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( result )
|
||||
with expansion:
|
||||
{?}
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( config.useNewPathFilteringBehaviour )
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Parsing path filter specs
|
||||
Generator specs enable new filter behaviour
|
||||
-------------------------------------------------------------------------------
|
||||
CmdLine.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( result )
|
||||
with expansion:
|
||||
{?}
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( config.useNewPathFilteringBehaviour )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Parsing path filter specs
|
||||
Generator specs do not accept stringish arguments
|
||||
-------------------------------------------------------------------------------
|
||||
CmdLine.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( result )
|
||||
with expansion:
|
||||
!{?}
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Parsing path filter specs
|
||||
Generator specs accept star as argument
|
||||
-------------------------------------------------------------------------------
|
||||
CmdLine.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( result )
|
||||
with expansion:
|
||||
{?}
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( config.pathFilters[0] == PathFilter( PathFilter::For::Generator, "*" ) )
|
||||
with expansion:
|
||||
{?} == {?}
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Parsing path filter specs
|
||||
Generator specs do not accept negative numbers
|
||||
-------------------------------------------------------------------------------
|
||||
CmdLine.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( result )
|
||||
with expansion:
|
||||
!{?}
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Parsing path filter specs
|
||||
Generic path spec enables new filter behaviour
|
||||
-------------------------------------------------------------------------------
|
||||
CmdLine.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( result )
|
||||
with expansion:
|
||||
{?}
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( config.useNewPathFilteringBehaviour )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( config.pathFilters[0] == PathFilter( PathFilter::For::Generator, "1" ) )
|
||||
with expansion:
|
||||
{?} == {?}
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( config.pathFilters[1] == PathFilter( PathFilter::For::Section, "foobar" ) )
|
||||
with expansion:
|
||||
{?} == {?}
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Parsing path filter specs
|
||||
Generic path spec for generator is validated
|
||||
-------------------------------------------------------------------------------
|
||||
CmdLine.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( result )
|
||||
with expansion:
|
||||
!{?}
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Parsing path filter specs
|
||||
Generic path spec without colon is rejected
|
||||
-------------------------------------------------------------------------------
|
||||
CmdLine.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( result1 )
|
||||
with expansion:
|
||||
!{?}
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( result2 )
|
||||
with expansion:
|
||||
!{?}
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Parsing path filter specs
|
||||
Using both section and generator filters creates filter stack
|
||||
-------------------------------------------------------------------------------
|
||||
CmdLine.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( result )
|
||||
with expansion:
|
||||
{?}
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( config.pathFilters[0] == PathFilter( PathFilter::For::Section, "foo-bar" ) )
|
||||
with expansion:
|
||||
{?} == {?}
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( config.pathFilters[1] == PathFilter( PathFilter::For::Generator, "3" ) )
|
||||
with expansion:
|
||||
{?} == {?}
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( config.pathFilters[2] == PathFilter( PathFilter::For::Generator, "123" ) )
|
||||
with expansion:
|
||||
{?} == {?}
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( config.pathFilters[3] == PathFilter( PathFilter::For::Section, "baz" ) )
|
||||
with expansion:
|
||||
{?} == {?}
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Parsing path filter specs
|
||||
Section/generator filters are whitespace trimmed
|
||||
-------------------------------------------------------------------------------
|
||||
CmdLine.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( result )
|
||||
with expansion:
|
||||
{?}
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( config.pathFilters[0] == PathFilter(PathFilter::For::Section, "untrimmed" ) )
|
||||
with expansion:
|
||||
{?} == {?}
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( config.pathFilters[1] == PathFilter(PathFilter::For::Generator, "42" ) )
|
||||
with expansion:
|
||||
{?} == {?}
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Parsing sharding-related cli flags
|
||||
shard-count
|
||||
@@ -19844,6 +20029,6 @@ Misc.tests.cpp:<line number>
|
||||
Misc.tests.cpp:<line number>: PASSED:
|
||||
|
||||
===============================================================================
|
||||
test cases: 448 | 328 passed | 96 failed | 6 skipped | 18 failed as expected
|
||||
assertions: 2376 | 2175 passed | 158 failed | 43 failed as expected
|
||||
test cases: 449 | 329 passed | 96 failed | 6 skipped | 18 failed as expected
|
||||
assertions: 2399 | 2198 passed | 158 failed | 43 failed as expected
|
||||
|
||||
@@ -9228,6 +9228,191 @@ TestSpecParser.tests.cpp:<line number>: PASSED:
|
||||
with expansion:
|
||||
true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Parsing path filter specs
|
||||
Only section specs leads to old filter behaviour
|
||||
-------------------------------------------------------------------------------
|
||||
CmdLine.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( result )
|
||||
with expansion:
|
||||
{?}
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( config.useNewPathFilteringBehaviour )
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Parsing path filter specs
|
||||
Generator specs enable new filter behaviour
|
||||
-------------------------------------------------------------------------------
|
||||
CmdLine.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( result )
|
||||
with expansion:
|
||||
{?}
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( config.useNewPathFilteringBehaviour )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Parsing path filter specs
|
||||
Generator specs do not accept stringish arguments
|
||||
-------------------------------------------------------------------------------
|
||||
CmdLine.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( result )
|
||||
with expansion:
|
||||
!{?}
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Parsing path filter specs
|
||||
Generator specs accept star as argument
|
||||
-------------------------------------------------------------------------------
|
||||
CmdLine.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( result )
|
||||
with expansion:
|
||||
{?}
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( config.pathFilters[0] == PathFilter( PathFilter::For::Generator, "*" ) )
|
||||
with expansion:
|
||||
{?} == {?}
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Parsing path filter specs
|
||||
Generator specs do not accept negative numbers
|
||||
-------------------------------------------------------------------------------
|
||||
CmdLine.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( result )
|
||||
with expansion:
|
||||
!{?}
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Parsing path filter specs
|
||||
Generic path spec enables new filter behaviour
|
||||
-------------------------------------------------------------------------------
|
||||
CmdLine.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( result )
|
||||
with expansion:
|
||||
{?}
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( config.useNewPathFilteringBehaviour )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( config.pathFilters[0] == PathFilter( PathFilter::For::Generator, "1" ) )
|
||||
with expansion:
|
||||
{?} == {?}
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( config.pathFilters[1] == PathFilter( PathFilter::For::Section, "foobar" ) )
|
||||
with expansion:
|
||||
{?} == {?}
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Parsing path filter specs
|
||||
Generic path spec for generator is validated
|
||||
-------------------------------------------------------------------------------
|
||||
CmdLine.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( result )
|
||||
with expansion:
|
||||
!{?}
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Parsing path filter specs
|
||||
Generic path spec without colon is rejected
|
||||
-------------------------------------------------------------------------------
|
||||
CmdLine.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( result1 )
|
||||
with expansion:
|
||||
!{?}
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( result2 )
|
||||
with expansion:
|
||||
!{?}
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Parsing path filter specs
|
||||
Using both section and generator filters creates filter stack
|
||||
-------------------------------------------------------------------------------
|
||||
CmdLine.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( result )
|
||||
with expansion:
|
||||
{?}
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( config.pathFilters[0] == PathFilter( PathFilter::For::Section, "foo-bar" ) )
|
||||
with expansion:
|
||||
{?} == {?}
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( config.pathFilters[1] == PathFilter( PathFilter::For::Generator, "3" ) )
|
||||
with expansion:
|
||||
{?} == {?}
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( config.pathFilters[2] == PathFilter( PathFilter::For::Generator, "123" ) )
|
||||
with expansion:
|
||||
{?} == {?}
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( config.pathFilters[3] == PathFilter( PathFilter::For::Section, "baz" ) )
|
||||
with expansion:
|
||||
{?} == {?}
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Parsing path filter specs
|
||||
Section/generator filters are whitespace trimmed
|
||||
-------------------------------------------------------------------------------
|
||||
CmdLine.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( result )
|
||||
with expansion:
|
||||
{?}
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( config.pathFilters[0] == PathFilter(PathFilter::For::Section, "untrimmed" ) )
|
||||
with expansion:
|
||||
{?} == {?}
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( config.pathFilters[1] == PathFilter(PathFilter::For::Generator, "42" ) )
|
||||
with expansion:
|
||||
{?} == {?}
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Parsing sharding-related cli flags
|
||||
shard-count
|
||||
@@ -19833,6 +20018,6 @@ Misc.tests.cpp:<line number>
|
||||
Misc.tests.cpp:<line number>: PASSED:
|
||||
|
||||
===============================================================================
|
||||
test cases: 448 | 328 passed | 96 failed | 6 skipped | 18 failed as expected
|
||||
assertions: 2376 | 2175 passed | 158 failed | 43 failed as expected
|
||||
test cases: 449 | 329 passed | 96 failed | 6 skipped | 18 failed as expected
|
||||
assertions: 2399 | 2198 passed | 158 failed | 43 failed as expected
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testsuitesloose text artifact
|
||||
>
|
||||
<testsuite name="<exe-name>" errors="17" failures="141" skipped="12" tests="2388" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
|
||||
<testsuite name="<exe-name>" errors="17" failures="141" skipped="12" tests="2411" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
|
||||
<properties>
|
||||
<property name="random-seed" value="1"/>
|
||||
<property name="filters" value=""*" ~[!nonportable] ~[!benchmark] ~[approvals]"/>
|
||||
@@ -1276,6 +1276,17 @@ at Message.tests.cpp:<line number>
|
||||
<testcase classname="<exe-name>.global" name="Parse uints/proper inputs" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Parse uints/Bad inputs" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Parsed tags are matched case insensitive" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Parsing path filter specs" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Parsing path filter specs/Only section specs leads to old filter behaviour" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Parsing path filter specs/Generator specs enable new filter behaviour" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Parsing path filter specs/Generator specs do not accept stringish arguments" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Parsing path filter specs/Generator specs accept star as argument" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Parsing path filter specs/Generator specs do not accept negative numbers" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Parsing path filter specs/Generic path spec enables new filter behaviour" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Parsing path filter specs/Generic path spec for generator is validated" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Parsing path filter specs/Generic path spec without colon is rejected" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Parsing path filter specs/Using both section and generator filters creates filter stack" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Parsing path filter specs/Section/generator filters are whitespace trimmed" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Parsing sharding-related cli flags" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Parsing sharding-related cli flags/shard-count" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Parsing sharding-related cli flags/Negative shard count reports error" time="{duration}" status="run"/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testsuites>
|
||||
<testsuite name="<exe-name>" errors="17" failures="141" skipped="12" tests="2388" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
|
||||
<testsuite name="<exe-name>" errors="17" failures="141" skipped="12" tests="2411" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
|
||||
<properties>
|
||||
<property name="random-seed" value="1"/>
|
||||
<property name="filters" value=""*" ~[!nonportable] ~[!benchmark] ~[approvals]"/>
|
||||
@@ -1275,6 +1275,17 @@ at Message.tests.cpp:<line number>
|
||||
<testcase classname="<exe-name>.global" name="Parse uints/proper inputs" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Parse uints/Bad inputs" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Parsed tags are matched case insensitive" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Parsing path filter specs" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Parsing path filter specs/Only section specs leads to old filter behaviour" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Parsing path filter specs/Generator specs enable new filter behaviour" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Parsing path filter specs/Generator specs do not accept stringish arguments" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Parsing path filter specs/Generator specs accept star as argument" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Parsing path filter specs/Generator specs do not accept negative numbers" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Parsing path filter specs/Generic path spec enables new filter behaviour" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Parsing path filter specs/Generic path spec for generator is validated" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Parsing path filter specs/Generic path spec without colon is rejected" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Parsing path filter specs/Using both section and generator filters creates filter stack" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Parsing path filter specs/Section/generator filters are whitespace trimmed" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Parsing sharding-related cli flags" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Parsing sharding-related cli flags/shard-count" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Parsing sharding-related cli flags/Negative shard count reports error" time="{duration}" status="run"/>
|
||||
|
||||
@@ -64,6 +64,17 @@ at AssertionHandler.tests.cpp:<line number>
|
||||
<testCase name="is_unary_function" duration="{duration}"/>
|
||||
</file>
|
||||
<file path="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp">
|
||||
<testCase name="Parsing path filter specs" duration="{duration}"/>
|
||||
<testCase name="Parsing path filter specs/Only section specs leads to old filter behaviour" duration="{duration}"/>
|
||||
<testCase name="Parsing path filter specs/Generator specs enable new filter behaviour" duration="{duration}"/>
|
||||
<testCase name="Parsing path filter specs/Generator specs do not accept stringish arguments" duration="{duration}"/>
|
||||
<testCase name="Parsing path filter specs/Generator specs accept star as argument" duration="{duration}"/>
|
||||
<testCase name="Parsing path filter specs/Generator specs do not accept negative numbers" duration="{duration}"/>
|
||||
<testCase name="Parsing path filter specs/Generic path spec enables new filter behaviour" duration="{duration}"/>
|
||||
<testCase name="Parsing path filter specs/Generic path spec for generator is validated" duration="{duration}"/>
|
||||
<testCase name="Parsing path filter specs/Generic path spec without colon is rejected" duration="{duration}"/>
|
||||
<testCase name="Parsing path filter specs/Using both section and generator filters creates filter stack" duration="{duration}"/>
|
||||
<testCase name="Parsing path filter specs/Section/generator filters are whitespace trimmed" duration="{duration}"/>
|
||||
<testCase name="Parsing sharding-related cli flags" duration="{duration}"/>
|
||||
<testCase name="Parsing sharding-related cli flags/shard-count" duration="{duration}"/>
|
||||
<testCase name="Parsing sharding-related cli flags/Negative shard count reports error" duration="{duration}"/>
|
||||
|
||||
@@ -63,6 +63,17 @@ at AssertionHandler.tests.cpp:<line number>
|
||||
<testCase name="is_unary_function" duration="{duration}"/>
|
||||
</file>
|
||||
<file path="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp">
|
||||
<testCase name="Parsing path filter specs" duration="{duration}"/>
|
||||
<testCase name="Parsing path filter specs/Only section specs leads to old filter behaviour" duration="{duration}"/>
|
||||
<testCase name="Parsing path filter specs/Generator specs enable new filter behaviour" duration="{duration}"/>
|
||||
<testCase name="Parsing path filter specs/Generator specs do not accept stringish arguments" duration="{duration}"/>
|
||||
<testCase name="Parsing path filter specs/Generator specs accept star as argument" duration="{duration}"/>
|
||||
<testCase name="Parsing path filter specs/Generator specs do not accept negative numbers" duration="{duration}"/>
|
||||
<testCase name="Parsing path filter specs/Generic path spec enables new filter behaviour" duration="{duration}"/>
|
||||
<testCase name="Parsing path filter specs/Generic path spec for generator is validated" duration="{duration}"/>
|
||||
<testCase name="Parsing path filter specs/Generic path spec without colon is rejected" duration="{duration}"/>
|
||||
<testCase name="Parsing path filter specs/Using both section and generator filters creates filter stack" duration="{duration}"/>
|
||||
<testCase name="Parsing path filter specs/Section/generator filters are whitespace trimmed" duration="{duration}"/>
|
||||
<testCase name="Parsing sharding-related cli flags" duration="{duration}"/>
|
||||
<testCase name="Parsing sharding-related cli flags/shard-count" duration="{duration}"/>
|
||||
<testCase name="Parsing sharding-related cli flags/Negative shard count reports error" duration="{duration}"/>
|
||||
|
||||
@@ -2328,6 +2328,52 @@ ok {test-number} - spec.hasFilters() for: true
|
||||
ok {test-number} - spec.getInvalidSpecs().empty() for: true
|
||||
# Parsed tags are matched case insensitive
|
||||
ok {test-number} - spec.matches( testCase ) for: true
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - result for: {?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - !(config.useNewPathFilteringBehaviour) for: !false
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - result for: {?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - config.useNewPathFilteringBehaviour for: true
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - !(result) for: !{?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - result for: {?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - config.pathFilters[0] == PathFilter( PathFilter::For::Generator, "*" ) for: {?} == {?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - !(result) for: !{?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - result for: {?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - config.useNewPathFilteringBehaviour for: true
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - config.pathFilters[0] == PathFilter( PathFilter::For::Generator, "1" ) for: {?} == {?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - config.pathFilters[1] == PathFilter( PathFilter::For::Section, "foobar" ) for: {?} == {?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - !(result) for: !{?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - !(result1) for: !{?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - !(result2) for: !{?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - result for: {?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - config.pathFilters[0] == PathFilter( PathFilter::For::Section, "foo-bar" ) for: {?} == {?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - config.pathFilters[1] == PathFilter( PathFilter::For::Generator, "3" ) for: {?} == {?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - config.pathFilters[2] == PathFilter( PathFilter::For::Generator, "123" ) for: {?} == {?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - config.pathFilters[3] == PathFilter( PathFilter::For::Section, "baz" ) for: {?} == {?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - result for: {?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - config.pathFilters[0] == PathFilter(PathFilter::For::Section, "untrimmed" ) for: {?} == {?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - config.pathFilters[1] == PathFilter(PathFilter::For::Generator, "42" ) for: {?} == {?}
|
||||
# Parsing sharding-related cli flags
|
||||
ok {test-number} - cli.parse({ "test", "--shard-count=8" }) for: {?}
|
||||
# Parsing sharding-related cli flags
|
||||
@@ -4771,5 +4817,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0
|
||||
ok {test-number} -
|
||||
# xmlentitycheck
|
||||
ok {test-number} -
|
||||
1..2388
|
||||
1..2411
|
||||
|
||||
@@ -2326,6 +2326,52 @@ ok {test-number} - spec.hasFilters() for: true
|
||||
ok {test-number} - spec.getInvalidSpecs().empty() for: true
|
||||
# Parsed tags are matched case insensitive
|
||||
ok {test-number} - spec.matches( testCase ) for: true
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - result for: {?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - !(config.useNewPathFilteringBehaviour) for: !false
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - result for: {?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - config.useNewPathFilteringBehaviour for: true
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - !(result) for: !{?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - result for: {?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - config.pathFilters[0] == PathFilter( PathFilter::For::Generator, "*" ) for: {?} == {?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - !(result) for: !{?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - result for: {?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - config.useNewPathFilteringBehaviour for: true
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - config.pathFilters[0] == PathFilter( PathFilter::For::Generator, "1" ) for: {?} == {?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - config.pathFilters[1] == PathFilter( PathFilter::For::Section, "foobar" ) for: {?} == {?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - !(result) for: !{?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - !(result1) for: !{?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - !(result2) for: !{?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - result for: {?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - config.pathFilters[0] == PathFilter( PathFilter::For::Section, "foo-bar" ) for: {?} == {?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - config.pathFilters[1] == PathFilter( PathFilter::For::Generator, "3" ) for: {?} == {?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - config.pathFilters[2] == PathFilter( PathFilter::For::Generator, "123" ) for: {?} == {?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - config.pathFilters[3] == PathFilter( PathFilter::For::Section, "baz" ) for: {?} == {?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - result for: {?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - config.pathFilters[0] == PathFilter(PathFilter::For::Section, "untrimmed" ) for: {?} == {?}
|
||||
# Parsing path filter specs
|
||||
ok {test-number} - config.pathFilters[1] == PathFilter(PathFilter::For::Generator, "42" ) for: {?} == {?}
|
||||
# Parsing sharding-related cli flags
|
||||
ok {test-number} - cli.parse({ "test", "--shard-count=8" }) for: {?}
|
||||
# Parsing sharding-related cli flags
|
||||
@@ -4760,5 +4806,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0
|
||||
ok {test-number} -
|
||||
# xmlentitycheck
|
||||
ok {test-number} -
|
||||
1..2388
|
||||
1..2411
|
||||
|
||||
@@ -549,6 +549,8 @@
|
||||
##teamcity[testFinished name='Parse uints' duration="{duration}"]
|
||||
##teamcity[testStarted name='Parsed tags are matched case insensitive']
|
||||
##teamcity[testFinished name='Parsed tags are matched case insensitive' duration="{duration}"]
|
||||
##teamcity[testStarted name='Parsing path filter specs']
|
||||
##teamcity[testFinished name='Parsing path filter specs' duration="{duration}"]
|
||||
##teamcity[testStarted name='Parsing sharding-related cli flags']
|
||||
##teamcity[testFinished name='Parsing sharding-related cli flags' duration="{duration}"]
|
||||
##teamcity[testStarted name='Parsing tags with non-alphabetical characters is pass-through']
|
||||
|
||||
@@ -549,6 +549,8 @@
|
||||
##teamcity[testFinished name='Parse uints' duration="{duration}"]
|
||||
##teamcity[testStarted name='Parsed tags are matched case insensitive']
|
||||
##teamcity[testFinished name='Parsed tags are matched case insensitive' duration="{duration}"]
|
||||
##teamcity[testStarted name='Parsing path filter specs']
|
||||
##teamcity[testFinished name='Parsing path filter specs' duration="{duration}"]
|
||||
##teamcity[testStarted name='Parsing sharding-related cli flags']
|
||||
##teamcity[testFinished name='Parsing sharding-related cli flags' duration="{duration}"]
|
||||
##teamcity[testStarted name='Parsing tags with non-alphabetical characters is pass-through']
|
||||
|
||||
@@ -11071,6 +11071,223 @@ Approx( 1.21999999999999997 )
|
||||
</Expression>
|
||||
<OverallResult success="true" skips="0"/>
|
||||
</TestCase>
|
||||
<TestCase name="Parsing path filter specs" tags="[cli][section-spec]" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Section name="Only section specs leads to old filter behaviour" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
result
|
||||
</Original>
|
||||
<Expanded>
|
||||
{?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
!(config.useNewPathFilteringBehaviour)
|
||||
</Original>
|
||||
<Expanded>
|
||||
!false
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
|
||||
</Section>
|
||||
<Section name="Generator specs enable new filter behaviour" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
result
|
||||
</Original>
|
||||
<Expanded>
|
||||
{?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
config.useNewPathFilteringBehaviour
|
||||
</Original>
|
||||
<Expanded>
|
||||
true
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
|
||||
</Section>
|
||||
<Section name="Generator specs do not accept stringish arguments" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
!(result)
|
||||
</Original>
|
||||
<Expanded>
|
||||
!{?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
|
||||
</Section>
|
||||
<Section name="Generator specs accept star as argument" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
result
|
||||
</Original>
|
||||
<Expanded>
|
||||
{?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
config.pathFilters[0] == PathFilter( PathFilter::For::Generator, "*" )
|
||||
</Original>
|
||||
<Expanded>
|
||||
{?} == {?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
|
||||
</Section>
|
||||
<Section name="Generator specs do not accept negative numbers" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
!(result)
|
||||
</Original>
|
||||
<Expanded>
|
||||
!{?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
|
||||
</Section>
|
||||
<Section name="Generic path spec enables new filter behaviour" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
result
|
||||
</Original>
|
||||
<Expanded>
|
||||
{?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
config.useNewPathFilteringBehaviour
|
||||
</Original>
|
||||
<Expanded>
|
||||
true
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
config.pathFilters[0] == PathFilter( PathFilter::For::Generator, "1" )
|
||||
</Original>
|
||||
<Expanded>
|
||||
{?} == {?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
config.pathFilters[1] == PathFilter( PathFilter::For::Section, "foobar" )
|
||||
</Original>
|
||||
<Expanded>
|
||||
{?} == {?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/>
|
||||
</Section>
|
||||
<Section name="Generic path spec for generator is validated" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
!(result)
|
||||
</Original>
|
||||
<Expanded>
|
||||
!{?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
|
||||
</Section>
|
||||
<Section name="Generic path spec without colon is rejected" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
!(result1)
|
||||
</Original>
|
||||
<Expanded>
|
||||
!{?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
!(result2)
|
||||
</Original>
|
||||
<Expanded>
|
||||
!{?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
|
||||
</Section>
|
||||
<Section name="Using both section and generator filters creates filter stack" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
result
|
||||
</Original>
|
||||
<Expanded>
|
||||
{?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
config.pathFilters[0] == PathFilter( PathFilter::For::Section, "foo-bar" )
|
||||
</Original>
|
||||
<Expanded>
|
||||
{?} == {?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
config.pathFilters[1] == PathFilter( PathFilter::For::Generator, "3" )
|
||||
</Original>
|
||||
<Expanded>
|
||||
{?} == {?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
config.pathFilters[2] == PathFilter( PathFilter::For::Generator, "123" )
|
||||
</Original>
|
||||
<Expanded>
|
||||
{?} == {?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
config.pathFilters[3] == PathFilter( PathFilter::For::Section, "baz" )
|
||||
</Original>
|
||||
<Expanded>
|
||||
{?} == {?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/>
|
||||
</Section>
|
||||
<Section name="Section/generator filters are whitespace trimmed" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
result
|
||||
</Original>
|
||||
<Expanded>
|
||||
{?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
config.pathFilters[0] == PathFilter(PathFilter::For::Section, "untrimmed" )
|
||||
</Original>
|
||||
<Expanded>
|
||||
{?} == {?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
config.pathFilters[1] == PathFilter(PathFilter::For::Generator, "42" )
|
||||
</Original>
|
||||
<Expanded>
|
||||
{?} == {?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/>
|
||||
</Section>
|
||||
<OverallResult success="true" skips="0"/>
|
||||
</TestCase>
|
||||
<TestCase name="Parsing sharding-related cli flags" tags="[sharding]" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Section name="shard-count" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
@@ -23020,6 +23237,6 @@ Approx( -1.95996398454005449 )
|
||||
</Section>
|
||||
<OverallResult success="true" skips="0"/>
|
||||
</TestCase>
|
||||
<OverallResults successes="2175" failures="158" expectedFailures="43" skips="12"/>
|
||||
<OverallResultsCases successes="328" failures="96" expectedFailures="18" skips="6"/>
|
||||
<OverallResults successes="2198" failures="158" expectedFailures="43" skips="12"/>
|
||||
<OverallResultsCases successes="329" failures="96" expectedFailures="18" skips="6"/>
|
||||
</Catch2TestRun>
|
||||
@@ -11071,6 +11071,223 @@ Approx( 1.21999999999999997 )
|
||||
</Expression>
|
||||
<OverallResult success="true" skips="0"/>
|
||||
</TestCase>
|
||||
<TestCase name="Parsing path filter specs" tags="[cli][section-spec]" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Section name="Only section specs leads to old filter behaviour" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
result
|
||||
</Original>
|
||||
<Expanded>
|
||||
{?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
!(config.useNewPathFilteringBehaviour)
|
||||
</Original>
|
||||
<Expanded>
|
||||
!false
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
|
||||
</Section>
|
||||
<Section name="Generator specs enable new filter behaviour" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
result
|
||||
</Original>
|
||||
<Expanded>
|
||||
{?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
config.useNewPathFilteringBehaviour
|
||||
</Original>
|
||||
<Expanded>
|
||||
true
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
|
||||
</Section>
|
||||
<Section name="Generator specs do not accept stringish arguments" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
!(result)
|
||||
</Original>
|
||||
<Expanded>
|
||||
!{?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
|
||||
</Section>
|
||||
<Section name="Generator specs accept star as argument" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
result
|
||||
</Original>
|
||||
<Expanded>
|
||||
{?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
config.pathFilters[0] == PathFilter( PathFilter::For::Generator, "*" )
|
||||
</Original>
|
||||
<Expanded>
|
||||
{?} == {?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
|
||||
</Section>
|
||||
<Section name="Generator specs do not accept negative numbers" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
!(result)
|
||||
</Original>
|
||||
<Expanded>
|
||||
!{?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
|
||||
</Section>
|
||||
<Section name="Generic path spec enables new filter behaviour" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
result
|
||||
</Original>
|
||||
<Expanded>
|
||||
{?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
config.useNewPathFilteringBehaviour
|
||||
</Original>
|
||||
<Expanded>
|
||||
true
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
config.pathFilters[0] == PathFilter( PathFilter::For::Generator, "1" )
|
||||
</Original>
|
||||
<Expanded>
|
||||
{?} == {?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
config.pathFilters[1] == PathFilter( PathFilter::For::Section, "foobar" )
|
||||
</Original>
|
||||
<Expanded>
|
||||
{?} == {?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/>
|
||||
</Section>
|
||||
<Section name="Generic path spec for generator is validated" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
!(result)
|
||||
</Original>
|
||||
<Expanded>
|
||||
!{?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
|
||||
</Section>
|
||||
<Section name="Generic path spec without colon is rejected" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
!(result1)
|
||||
</Original>
|
||||
<Expanded>
|
||||
!{?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
!(result2)
|
||||
</Original>
|
||||
<Expanded>
|
||||
!{?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
|
||||
</Section>
|
||||
<Section name="Using both section and generator filters creates filter stack" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
result
|
||||
</Original>
|
||||
<Expanded>
|
||||
{?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
config.pathFilters[0] == PathFilter( PathFilter::For::Section, "foo-bar" )
|
||||
</Original>
|
||||
<Expanded>
|
||||
{?} == {?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
config.pathFilters[1] == PathFilter( PathFilter::For::Generator, "3" )
|
||||
</Original>
|
||||
<Expanded>
|
||||
{?} == {?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
config.pathFilters[2] == PathFilter( PathFilter::For::Generator, "123" )
|
||||
</Original>
|
||||
<Expanded>
|
||||
{?} == {?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
config.pathFilters[3] == PathFilter( PathFilter::For::Section, "baz" )
|
||||
</Original>
|
||||
<Expanded>
|
||||
{?} == {?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/>
|
||||
</Section>
|
||||
<Section name="Section/generator filters are whitespace trimmed" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
result
|
||||
</Original>
|
||||
<Expanded>
|
||||
{?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
config.pathFilters[0] == PathFilter(PathFilter::For::Section, "untrimmed" )
|
||||
</Original>
|
||||
<Expanded>
|
||||
{?} == {?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Original>
|
||||
config.pathFilters[1] == PathFilter(PathFilter::For::Generator, "42" )
|
||||
</Original>
|
||||
<Expanded>
|
||||
{?} == {?}
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/>
|
||||
</Section>
|
||||
<OverallResult success="true" skips="0"/>
|
||||
</TestCase>
|
||||
<TestCase name="Parsing sharding-related cli flags" tags="[sharding]" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Section name="shard-count" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
<Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
|
||||
@@ -23019,6 +23236,6 @@ Approx( -1.95996398454005449 )
|
||||
</Section>
|
||||
<OverallResult success="true" skips="0"/>
|
||||
</TestCase>
|
||||
<OverallResults successes="2175" failures="158" expectedFailures="43" skips="12"/>
|
||||
<OverallResultsCases successes="328" failures="96" expectedFailures="18" skips="6"/>
|
||||
<OverallResults successes="2198" failures="158" expectedFailures="43" skips="12"/>
|
||||
<OverallResultsCases successes="329" failures="96" expectedFailures="18" skips="6"/>
|
||||
</Catch2TestRun>
|
||||
@@ -483,3 +483,80 @@ TEST_CASE( "Parse rng seed in different formats", "[approvals][cli][rng-seed]" )
|
||||
REQUIRE_FALSE( cli.parse( { "tests", "--rng-seed", seed_string } ) );
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE( "Parsing path filter specs",
|
||||
"[cli][section-spec]" ) {
|
||||
using Catch::PathFilter;
|
||||
|
||||
Catch::ConfigData config;
|
||||
auto cli = Catch::makeCommandLineParser( config );
|
||||
SECTION( "Only section specs leads to old filter behaviour" ) {
|
||||
auto result = cli.parse( { "tests", "-c", "1", "--section", "a section" } );
|
||||
REQUIRE( result );
|
||||
REQUIRE_FALSE( config.useNewPathFilteringBehaviour );
|
||||
}
|
||||
SECTION( "Generator specs enable new filter behaviour" ) {
|
||||
auto result =
|
||||
cli.parse( { "tests", "-g", "1", "--generator-index", "2" } );
|
||||
REQUIRE( result );
|
||||
REQUIRE( config.useNewPathFilteringBehaviour );
|
||||
}
|
||||
SECTION("Generator specs do not accept stringish arguments") {
|
||||
auto result = cli.parse( { "tests", "--generator-index", "foo-baz" } );
|
||||
REQUIRE_FALSE( result );
|
||||
}
|
||||
SECTION( "Generator specs accept star as argument" ) {
|
||||
auto result = cli.parse( { "tests", "--generator-index", "*" } );
|
||||
REQUIRE( result );
|
||||
|
||||
REQUIRE( config.pathFilters[0] ==
|
||||
PathFilter( PathFilter::For::Generator, "*" ) );
|
||||
}
|
||||
SECTION( "Generator specs do not accept negative numbers" ) {
|
||||
auto result = cli.parse( { "tests", "--generator-index", "-2" } );
|
||||
REQUIRE_FALSE( result );
|
||||
}
|
||||
SECTION( "Generic path spec enables new filter behaviour" ) {
|
||||
auto result =
|
||||
cli.parse( { "tests", "-p", "g:1", "--path-filter", "c:foobar" } );
|
||||
REQUIRE( result );
|
||||
REQUIRE( config.useNewPathFilteringBehaviour );
|
||||
|
||||
REQUIRE( config.pathFilters[0] ==
|
||||
PathFilter( PathFilter::For::Generator, "1" ) );
|
||||
REQUIRE( config.pathFilters[1] ==
|
||||
PathFilter( PathFilter::For::Section, "foobar" ) );
|
||||
}
|
||||
SECTION( "Generic path spec for generator is validated" ) {
|
||||
auto result = cli.parse( { "tests", "-p", "g:foo-bar" } );
|
||||
REQUIRE_FALSE( result );
|
||||
}
|
||||
SECTION( "Generic path spec without colon is rejected" ) {
|
||||
auto result1 = cli.parse( { "tests", "-p", "g123" } );
|
||||
REQUIRE_FALSE( result1 );
|
||||
auto result2 = cli.parse( { "tests", "-p", "carp" } );
|
||||
REQUIRE_FALSE( result2 );
|
||||
}
|
||||
SECTION( "Using both section and generator filters creates filter stack" ) {
|
||||
auto result = cli.parse( { "tests",
|
||||
"--section", "foo-bar",
|
||||
"--generator-index", "3",
|
||||
"-g", "123",
|
||||
"-c", "baz"
|
||||
});
|
||||
REQUIRE( result );
|
||||
REQUIRE( config.pathFilters[0] == PathFilter( PathFilter::For::Section, "foo-bar" ) );
|
||||
REQUIRE( config.pathFilters[1] == PathFilter( PathFilter::For::Generator, "3" ) );
|
||||
REQUIRE( config.pathFilters[2] == PathFilter( PathFilter::For::Generator, "123" ) );
|
||||
REQUIRE( config.pathFilters[3] == PathFilter( PathFilter::For::Section, "baz" ) );
|
||||
}
|
||||
SECTION( "Section/generator filters are whitespace trimmed" ) {
|
||||
auto result = cli.parse( { "tests",
|
||||
"--section", " untrimmed ",
|
||||
"--generator-index", " 42 "
|
||||
});
|
||||
REQUIRE( result );
|
||||
REQUIRE( config.pathFilters[0] == PathFilter(PathFilter::For::Section, "untrimmed" ) );
|
||||
REQUIRE( config.pathFilters[1] == PathFilter(PathFilter::For::Generator, "42" ) );
|
||||
}
|
||||
}
|
||||
@@ -173,7 +173,7 @@ TEST_CASE( "Decomposer checks that the argument is 0 when handling "
|
||||
}
|
||||
|
||||
|
||||
TEST_CASE( "foo", "[approvals]" ) {
|
||||
TEST_CASE( "foo", "[approvals][path-filters]" ) {
|
||||
SECTION( "A" ) {
|
||||
SECTION( "B1" ) { REQUIRE( true ); }
|
||||
SECTION( "B2" ) { REQUIRE( true ); }
|
||||
@@ -181,7 +181,7 @@ TEST_CASE( "foo", "[approvals]" ) {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE( "bar", "[approvals]" ) {
|
||||
TEST_CASE( "bar", "[approvals][path-filters]" ) {
|
||||
REQUIRE( true );
|
||||
SECTION( "A" ) {
|
||||
SECTION( "B1" ) { REQUIRE( true ); }
|
||||
@@ -191,14 +191,14 @@ TEST_CASE( "bar", "[approvals]" ) {
|
||||
REQUIRE( true );
|
||||
}
|
||||
|
||||
TEST_CASE( "baz", "[approvals]" ) {
|
||||
TEST_CASE( "baz", "[approvals][path-filters]" ) {
|
||||
SECTION( "A" ) { REQUIRE( true ); }
|
||||
auto _ = GENERATE( 1, 2, 3 );
|
||||
(void)_;
|
||||
SECTION( "B" ) { REQUIRE( true ); }
|
||||
}
|
||||
|
||||
TEST_CASE( "qux", "[approvals]" ) {
|
||||
TEST_CASE( "qux", "[approvals][path-filters]" ) {
|
||||
REQUIRE( true );
|
||||
SECTION( "A" ) { REQUIRE( true ); }
|
||||
auto _ = GENERATE( 1, 2, 3 );
|
||||
@@ -207,7 +207,7 @@ TEST_CASE( "qux", "[approvals]" ) {
|
||||
REQUIRE( true );
|
||||
}
|
||||
|
||||
TEST_CASE( "corge", "[approvals]" ) {
|
||||
TEST_CASE( "corge", "[approvals][path-filters]" ) {
|
||||
REQUIRE( true );
|
||||
SECTION( "A" ) {
|
||||
REQUIRE( true );
|
||||
@@ -219,7 +219,7 @@ TEST_CASE( "corge", "[approvals]" ) {
|
||||
REQUIRE( true );
|
||||
}
|
||||
|
||||
TEST_CASE("grault", "[approvals]") {
|
||||
TEST_CASE( "grault", "[approvals][path-filters]" ) {
|
||||
REQUIRE( true );
|
||||
SECTION( "A" ) {
|
||||
REQUIRE( true );
|
||||
@@ -232,3 +232,33 @@ TEST_CASE("grault", "[approvals]") {
|
||||
}
|
||||
REQUIRE( true );
|
||||
}
|
||||
|
||||
TEST_CASE( "garply", "[approvals][path-filters]" ) {
|
||||
auto i = GENERATE( 1, 10, 100 );
|
||||
CAPTURE( i );
|
||||
REQUIRE( true );
|
||||
}
|
||||
|
||||
TEST_CASE( "waldo", "[approvals][path-filters]" ) {
|
||||
auto i = GENERATE( 1, 10, 100 );
|
||||
auto j = GENERATE( 2, 20, 200 );
|
||||
CAPTURE( i, j );
|
||||
REQUIRE( true );
|
||||
}
|
||||
|
||||
TEST_CASE( "fred", "[approvals][path-filters]" ) {
|
||||
REQUIRE( true );
|
||||
SECTION( "A" ) {
|
||||
auto _ = GENERATE( 0, 1, 2 );
|
||||
(void)_;
|
||||
SECTION( "A1" ) { REQUIRE( true ); }
|
||||
SECTION( "A2" ) { REQUIRE( true ); }
|
||||
}
|
||||
SECTION( "B" ) {
|
||||
auto _ = GENERATE( 0, 1, 2 );
|
||||
(void)_;
|
||||
SECTION( "B1" ) { REQUIRE( true ); }
|
||||
SECTION( "B2" ) { REQUIRE( true ); }
|
||||
}
|
||||
}
|
||||
// More metasyntactic names if needed: plugh, xyzzy, thud
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <catch2/generators/catch_generators.hpp>
|
||||
#include <catch2/internal/catch_test_case_tracker.hpp>
|
||||
#include <catch2/internal/catch_path_filter.hpp>
|
||||
|
||||
|
||||
using namespace Catch;
|
||||
@@ -22,7 +23,9 @@ Catch::TestCaseTracking::NameAndLocationRef makeNAL( StringRef name ) {
|
||||
TEST_CASE( "Tracker" ) {
|
||||
|
||||
TrackerContext ctx;
|
||||
ctx.startRun();
|
||||
ITracker& root = ctx.startRun();
|
||||
std::vector<PathFilter> dummyFilters;
|
||||
root.setFilters( &dummyFilters, false );
|
||||
ctx.startCycle();
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user