Allow generators to declare themselves (infinite)
This will be useful later to implement warning on infinitely running `GENERATE` expressions.
This commit is contained in:
31 files changed
+869
-18
No files matched your search
@@ -169,6 +169,7 @@ Nor would this
|
||||
:test-result: PASS Floating point matchers: double
|
||||
:test-result: PASS Floating point matchers: float
|
||||
:test-result: PASS GENERATE can combine literals and generators
|
||||
:test-result: PASS Generator adapters properly handle isFinite
|
||||
:test-result: PASS Generators -- adapters
|
||||
:test-result: PASS Generators -- simple
|
||||
:test-result: PASS Generators can be skipped forward
|
||||
@@ -226,11 +227,15 @@ Nor would this
|
||||
:test-result: PASS Product with differing arities - std::tuple<int>
|
||||
:test-result: PASS Random seed generation accepts known methods
|
||||
:test-result: PASS Random seed generation reports unknown methods
|
||||
:test-result: PASS RandomGenerator reports itself as infinite - float
|
||||
:test-result: PASS RandomGenerator reports itself as infinite - int
|
||||
:test-result: PASS RandomGenerator reports itself as infinite - long double
|
||||
:test-result: PASS Range type with sentinel
|
||||
:test-result: FAIL Reconstruction should be based on stringification: #914
|
||||
:test-result: FAIL Regex string matcher
|
||||
:test-result: PASS Registering reporter with '::' in name fails
|
||||
:test-result: PASS Regression test #1
|
||||
:test-result: PASS RepeatGenerator refuses infinite generators
|
||||
:test-result: PASS Reporter's write listings to provided stream
|
||||
:test-result: PASS Reproducer for #2309 - a very long description past 80 chars (default console width) with a late colon : blablabla
|
||||
:test-result: PASS SUCCEED counts as a test pass
|
||||
|
||||
@@ -167,6 +167,7 @@
|
||||
:test-result: PASS Floating point matchers: double
|
||||
:test-result: PASS Floating point matchers: float
|
||||
:test-result: PASS GENERATE can combine literals and generators
|
||||
:test-result: PASS Generator adapters properly handle isFinite
|
||||
:test-result: PASS Generators -- adapters
|
||||
:test-result: PASS Generators -- simple
|
||||
:test-result: PASS Generators can be skipped forward
|
||||
@@ -224,11 +225,15 @@
|
||||
:test-result: PASS Product with differing arities - std::tuple<int>
|
||||
:test-result: PASS Random seed generation accepts known methods
|
||||
:test-result: PASS Random seed generation reports unknown methods
|
||||
:test-result: PASS RandomGenerator reports itself as infinite - float
|
||||
:test-result: PASS RandomGenerator reports itself as infinite - int
|
||||
:test-result: PASS RandomGenerator reports itself as infinite - long double
|
||||
:test-result: PASS Range type with sentinel
|
||||
:test-result: FAIL Reconstruction should be based on stringification: #914
|
||||
:test-result: FAIL Regex string matcher
|
||||
:test-result: PASS Registering reporter with '::' in name fails
|
||||
:test-result: PASS Regression test #1
|
||||
:test-result: PASS RepeatGenerator refuses infinite generators
|
||||
:test-result: PASS Reporter's write listings to provided stream
|
||||
:test-result: PASS Reproducer for #2309 - a very long description past 80 chars (default console width) with a late colon : blablabla
|
||||
:test-result: PASS SUCCEED counts as a test pass
|
||||
|
||||
@@ -751,6 +751,16 @@ Generators.tests.cpp:<line number>: passed: i % 2 == 0 for: 0 == 0
|
||||
Generators.tests.cpp:<line number>: passed: i % 2 == 0 for: 0 == 0
|
||||
Generators.tests.cpp:<line number>: passed: i % 2 == 0 for: 0 == 0
|
||||
Generators.tests.cpp:<line number>: passed: i % 2 == 0 for: 0 == 0
|
||||
GeneratorsImpl.tests.cpp:<line number>: passed: finite_cat.isFinite() for: true
|
||||
GeneratorsImpl.tests.cpp:<line number>: passed: !(infinite_cat.isFinite()) for: !false
|
||||
GeneratorsImpl.tests.cpp:<line number>: passed: take_1.isFinite() for: true
|
||||
GeneratorsImpl.tests.cpp:<line number>: passed: take_2.isFinite() for: true
|
||||
GeneratorsImpl.tests.cpp:<line number>: passed: finite_chunk.isFinite() for: true
|
||||
GeneratorsImpl.tests.cpp:<line number>: passed: !(infinite_chunk.isFinite()) for: !false
|
||||
GeneratorsImpl.tests.cpp:<line number>: passed: finite_map.isFinite() for: true
|
||||
GeneratorsImpl.tests.cpp:<line number>: passed: !(infinite_map.isFinite()) for: !false
|
||||
GeneratorsImpl.tests.cpp:<line number>: passed: finite_filter.isFinite() for: true
|
||||
GeneratorsImpl.tests.cpp:<line number>: passed: !(infinite_filter.isFinite()) for: !false
|
||||
Generators.tests.cpp:<line number>: passed: i % 2 == 0 for: 0 == 0
|
||||
Generators.tests.cpp:<line number>: passed: i % 2 == 0 for: 0 == 0
|
||||
Generators.tests.cpp:<line number>: passed: i % 2 == 0 for: 0 == 0
|
||||
@@ -1559,6 +1569,9 @@ RandomNumberGeneration.tests.cpp:<line number>: passed: Catch::generateRandomSee
|
||||
RandomNumberGeneration.tests.cpp:<line number>: passed: Catch::generateRandomSeed(method)
|
||||
RandomNumberGeneration.tests.cpp:<line number>: passed: Catch::generateRandomSeed(method)
|
||||
RandomNumberGeneration.tests.cpp:<line number>: passed: Catch::generateRandomSeed(static_cast<Catch::GenerateFrom>(77))
|
||||
GeneratorsImpl.tests.cpp:<line number>: passed: !(Catch::Generators::random( TestType{ 0 }, TestType{ 100 } ).isFinite()) for: !false
|
||||
GeneratorsImpl.tests.cpp:<line number>: passed: !(Catch::Generators::random( TestType{ 0 }, TestType{ 100 } ).isFinite()) for: !false
|
||||
GeneratorsImpl.tests.cpp:<line number>: passed: !(Catch::Generators::random( TestType{ 0 }, TestType{ 100 } ).isFinite()) for: !false
|
||||
ToString.tests.cpp:<line number>: passed: Catch::Detail::stringify(UsesSentinel{}) == "{ }" for: "{ }" == "{ }"
|
||||
Decomposition.tests.cpp:<line number>: failed: truthy(false) for: Hey, its truthy!
|
||||
Matchers.tests.cpp:<line number>: failed: testStringForMatching(), Matches( "this STRING contains 'abc' as a substring" ) for: "this string contains 'abc' as a substring" matches "this STRING contains 'abc' as a substring" case sensitively
|
||||
@@ -1566,6 +1579,7 @@ Matchers.tests.cpp:<line number>: failed: testStringForMatching(), Matches( "con
|
||||
Matchers.tests.cpp:<line number>: failed: testStringForMatching(), Matches( "this string contains 'abc' as a" ) for: "this string contains 'abc' as a substring" matches "this string contains 'abc' as a" case sensitively
|
||||
Reporters.tests.cpp:<line number>: passed: registry.registerReporter( "with::doublecolons", Catch::Detail::make_unique<TestReporterFactory>() ), "'::' is not allowed in reporter name: 'with::doublecolons'" for: "'::' is not allowed in reporter name: 'with::doublecolons'" equals: "'::' is not allowed in reporter name: 'with::doublecolons'"
|
||||
Matchers.tests.cpp:<line number>: passed: actual, !UnorderedEquals( expected ) for: { 'a', 'b' } not UnorderedEquals: { 'c', 'b' }
|
||||
GeneratorsImpl.tests.cpp:<line number>: passed: RepeatGenerator<int>( 2, random( 1, 100 ) )
|
||||
Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false
|
||||
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fakeTag"s) for: "All available tags:
|
||||
1 [fakeTag]
|
||||
@@ -2946,7 +2960,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: 443 | 323 passed | 96 failed | 6 skipped | 18 failed as expected
|
||||
assertions: 2362 | 2161 passed | 158 failed | 43 failed as expected
|
||||
test cases: 448 | 328 passed | 96 failed | 6 skipped | 18 failed as expected
|
||||
assertions: 2376 | 2175 passed | 158 failed | 43 failed as expected
|
||||
|
||||
|
||||
@@ -749,6 +749,16 @@ Generators.tests.cpp:<line number>: passed: i % 2 == 0 for: 0 == 0
|
||||
Generators.tests.cpp:<line number>: passed: i % 2 == 0 for: 0 == 0
|
||||
Generators.tests.cpp:<line number>: passed: i % 2 == 0 for: 0 == 0
|
||||
Generators.tests.cpp:<line number>: passed: i % 2 == 0 for: 0 == 0
|
||||
GeneratorsImpl.tests.cpp:<line number>: passed: finite_cat.isFinite() for: true
|
||||
GeneratorsImpl.tests.cpp:<line number>: passed: !(infinite_cat.isFinite()) for: !false
|
||||
GeneratorsImpl.tests.cpp:<line number>: passed: take_1.isFinite() for: true
|
||||
GeneratorsImpl.tests.cpp:<line number>: passed: take_2.isFinite() for: true
|
||||
GeneratorsImpl.tests.cpp:<line number>: passed: finite_chunk.isFinite() for: true
|
||||
GeneratorsImpl.tests.cpp:<line number>: passed: !(infinite_chunk.isFinite()) for: !false
|
||||
GeneratorsImpl.tests.cpp:<line number>: passed: finite_map.isFinite() for: true
|
||||
GeneratorsImpl.tests.cpp:<line number>: passed: !(infinite_map.isFinite()) for: !false
|
||||
GeneratorsImpl.tests.cpp:<line number>: passed: finite_filter.isFinite() for: true
|
||||
GeneratorsImpl.tests.cpp:<line number>: passed: !(infinite_filter.isFinite()) for: !false
|
||||
Generators.tests.cpp:<line number>: passed: i % 2 == 0 for: 0 == 0
|
||||
Generators.tests.cpp:<line number>: passed: i % 2 == 0 for: 0 == 0
|
||||
Generators.tests.cpp:<line number>: passed: i % 2 == 0 for: 0 == 0
|
||||
@@ -1557,6 +1567,9 @@ RandomNumberGeneration.tests.cpp:<line number>: passed: Catch::generateRandomSee
|
||||
RandomNumberGeneration.tests.cpp:<line number>: passed: Catch::generateRandomSeed(method)
|
||||
RandomNumberGeneration.tests.cpp:<line number>: passed: Catch::generateRandomSeed(method)
|
||||
RandomNumberGeneration.tests.cpp:<line number>: passed: Catch::generateRandomSeed(static_cast<Catch::GenerateFrom>(77))
|
||||
GeneratorsImpl.tests.cpp:<line number>: passed: !(Catch::Generators::random( TestType{ 0 }, TestType{ 100 } ).isFinite()) for: !false
|
||||
GeneratorsImpl.tests.cpp:<line number>: passed: !(Catch::Generators::random( TestType{ 0 }, TestType{ 100 } ).isFinite()) for: !false
|
||||
GeneratorsImpl.tests.cpp:<line number>: passed: !(Catch::Generators::random( TestType{ 0 }, TestType{ 100 } ).isFinite()) for: !false
|
||||
ToString.tests.cpp:<line number>: passed: Catch::Detail::stringify(UsesSentinel{}) == "{ }" for: "{ }" == "{ }"
|
||||
Decomposition.tests.cpp:<line number>: failed: truthy(false) for: Hey, its truthy!
|
||||
Matchers.tests.cpp:<line number>: failed: testStringForMatching(), Matches( "this STRING contains 'abc' as a substring" ) for: "this string contains 'abc' as a substring" matches "this STRING contains 'abc' as a substring" case sensitively
|
||||
@@ -1564,6 +1577,7 @@ Matchers.tests.cpp:<line number>: failed: testStringForMatching(), Matches( "con
|
||||
Matchers.tests.cpp:<line number>: failed: testStringForMatching(), Matches( "this string contains 'abc' as a" ) for: "this string contains 'abc' as a substring" matches "this string contains 'abc' as a" case sensitively
|
||||
Reporters.tests.cpp:<line number>: passed: registry.registerReporter( "with::doublecolons", Catch::Detail::make_unique<TestReporterFactory>() ), "'::' is not allowed in reporter name: 'with::doublecolons'" for: "'::' is not allowed in reporter name: 'with::doublecolons'" equals: "'::' is not allowed in reporter name: 'with::doublecolons'"
|
||||
Matchers.tests.cpp:<line number>: passed: actual, !UnorderedEquals( expected ) for: { 'a', 'b' } not UnorderedEquals: { 'c', 'b' }
|
||||
GeneratorsImpl.tests.cpp:<line number>: passed: RepeatGenerator<int>( 2, random( 1, 100 ) )
|
||||
Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false
|
||||
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fakeTag"s) for: "All available tags:
|
||||
1 [fakeTag]
|
||||
@@ -2935,7 +2949,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: 443 | 323 passed | 96 failed | 6 skipped | 18 failed as expected
|
||||
assertions: 2362 | 2161 passed | 158 failed | 43 failed as expected
|
||||
test cases: 448 | 328 passed | 96 failed | 6 skipped | 18 failed as expected
|
||||
assertions: 2376 | 2175 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: 443 | 341 passed | 76 failed | 7 skipped | 19 failed as expected
|
||||
assertions: 2340 | 2161 passed | 136 failed | 43 failed as expected
|
||||
test cases: 448 | 346 passed | 76 failed | 7 skipped | 19 failed as expected
|
||||
assertions: 2354 | 2175 passed | 136 failed | 43 failed as expected
|
||||
|
||||
@@ -5314,6 +5314,91 @@ Generators.tests.cpp:<line number>: PASSED:
|
||||
with expansion:
|
||||
0 == 0
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Generator adapters properly handle isFinite
|
||||
concat generator
|
||||
-------------------------------------------------------------------------------
|
||||
GeneratorsImpl.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
GeneratorsImpl.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( finite_cat.isFinite() )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
GeneratorsImpl.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( infinite_cat.isFinite() )
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Generator adapters properly handle isFinite
|
||||
take generator
|
||||
-------------------------------------------------------------------------------
|
||||
GeneratorsImpl.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
GeneratorsImpl.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( take_1.isFinite() )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
GeneratorsImpl.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( take_2.isFinite() )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Generator adapters properly handle isFinite
|
||||
chunk generator
|
||||
-------------------------------------------------------------------------------
|
||||
GeneratorsImpl.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
GeneratorsImpl.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( finite_chunk.isFinite() )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
GeneratorsImpl.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( infinite_chunk.isFinite() )
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Generator adapters properly handle isFinite
|
||||
map
|
||||
-------------------------------------------------------------------------------
|
||||
GeneratorsImpl.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
GeneratorsImpl.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( finite_map.isFinite() )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
GeneratorsImpl.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( infinite_map.isFinite() )
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Generator adapters properly handle isFinite
|
||||
filter
|
||||
-------------------------------------------------------------------------------
|
||||
GeneratorsImpl.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
GeneratorsImpl.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( finite_filter.isFinite() )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
GeneratorsImpl.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( infinite_filter.isFinite() )
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Generators -- adapters
|
||||
Filtering by predicate
|
||||
@@ -10367,6 +10452,39 @@ RandomNumberGeneration.tests.cpp:<line number>
|
||||
RandomNumberGeneration.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THROWS( Catch::generateRandomSeed(static_cast<Catch::GenerateFrom>(77)) )
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
RandomGenerator reports itself as infinite - float
|
||||
-------------------------------------------------------------------------------
|
||||
GeneratorsImpl.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
GeneratorsImpl.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( Catch::Generators::random( TestType{ 0 }, TestType{ 100 } ).isFinite() )
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
RandomGenerator reports itself as infinite - int
|
||||
-------------------------------------------------------------------------------
|
||||
GeneratorsImpl.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
GeneratorsImpl.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( Catch::Generators::random( TestType{ 0 }, TestType{ 100 } ).isFinite() )
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
RandomGenerator reports itself as infinite - long double
|
||||
-------------------------------------------------------------------------------
|
||||
GeneratorsImpl.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
GeneratorsImpl.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( Catch::Generators::random( TestType{ 0 }, TestType{ 100 } ).isFinite() )
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Range type with sentinel
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -10436,6 +10554,15 @@ Matchers.tests.cpp:<line number>: PASSED:
|
||||
with expansion:
|
||||
{ 'a', 'b' } not UnorderedEquals: { 'c', 'b' }
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
RepeatGenerator refuses infinite generators
|
||||
-------------------------------------------------------------------------------
|
||||
GeneratorsImpl.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
GeneratorsImpl.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THROWS( RepeatGenerator<int>( 2, random( 1, 100 ) ) )
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Reporter's write listings to provided stream
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -19717,6 +19844,6 @@ Misc.tests.cpp:<line number>
|
||||
Misc.tests.cpp:<line number>: PASSED:
|
||||
|
||||
===============================================================================
|
||||
test cases: 443 | 323 passed | 96 failed | 6 skipped | 18 failed as expected
|
||||
assertions: 2362 | 2161 passed | 158 failed | 43 failed as expected
|
||||
test cases: 448 | 328 passed | 96 failed | 6 skipped | 18 failed as expected
|
||||
assertions: 2376 | 2175 passed | 158 failed | 43 failed as expected
|
||||
|
||||
@@ -5312,6 +5312,91 @@ Generators.tests.cpp:<line number>: PASSED:
|
||||
with expansion:
|
||||
0 == 0
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Generator adapters properly handle isFinite
|
||||
concat generator
|
||||
-------------------------------------------------------------------------------
|
||||
GeneratorsImpl.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
GeneratorsImpl.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( finite_cat.isFinite() )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
GeneratorsImpl.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( infinite_cat.isFinite() )
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Generator adapters properly handle isFinite
|
||||
take generator
|
||||
-------------------------------------------------------------------------------
|
||||
GeneratorsImpl.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
GeneratorsImpl.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( take_1.isFinite() )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
GeneratorsImpl.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( take_2.isFinite() )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Generator adapters properly handle isFinite
|
||||
chunk generator
|
||||
-------------------------------------------------------------------------------
|
||||
GeneratorsImpl.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
GeneratorsImpl.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( finite_chunk.isFinite() )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
GeneratorsImpl.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( infinite_chunk.isFinite() )
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Generator adapters properly handle isFinite
|
||||
map
|
||||
-------------------------------------------------------------------------------
|
||||
GeneratorsImpl.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
GeneratorsImpl.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( finite_map.isFinite() )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
GeneratorsImpl.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( infinite_map.isFinite() )
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Generator adapters properly handle isFinite
|
||||
filter
|
||||
-------------------------------------------------------------------------------
|
||||
GeneratorsImpl.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
GeneratorsImpl.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( finite_filter.isFinite() )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
GeneratorsImpl.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( infinite_filter.isFinite() )
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Generators -- adapters
|
||||
Filtering by predicate
|
||||
@@ -10365,6 +10450,39 @@ RandomNumberGeneration.tests.cpp:<line number>
|
||||
RandomNumberGeneration.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THROWS( Catch::generateRandomSeed(static_cast<Catch::GenerateFrom>(77)) )
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
RandomGenerator reports itself as infinite - float
|
||||
-------------------------------------------------------------------------------
|
||||
GeneratorsImpl.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
GeneratorsImpl.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( Catch::Generators::random( TestType{ 0 }, TestType{ 100 } ).isFinite() )
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
RandomGenerator reports itself as infinite - int
|
||||
-------------------------------------------------------------------------------
|
||||
GeneratorsImpl.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
GeneratorsImpl.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( Catch::Generators::random( TestType{ 0 }, TestType{ 100 } ).isFinite() )
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
RandomGenerator reports itself as infinite - long double
|
||||
-------------------------------------------------------------------------------
|
||||
GeneratorsImpl.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
GeneratorsImpl.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( Catch::Generators::random( TestType{ 0 }, TestType{ 100 } ).isFinite() )
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Range type with sentinel
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -10434,6 +10552,15 @@ Matchers.tests.cpp:<line number>: PASSED:
|
||||
with expansion:
|
||||
{ 'a', 'b' } not UnorderedEquals: { 'c', 'b' }
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
RepeatGenerator refuses infinite generators
|
||||
-------------------------------------------------------------------------------
|
||||
GeneratorsImpl.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
GeneratorsImpl.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THROWS( RepeatGenerator<int>( 2, random( 1, 100 ) ) )
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Reporter's write listings to provided stream
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -19706,6 +19833,6 @@ Misc.tests.cpp:<line number>
|
||||
Misc.tests.cpp:<line number>: PASSED:
|
||||
|
||||
===============================================================================
|
||||
test cases: 443 | 323 passed | 96 failed | 6 skipped | 18 failed as expected
|
||||
assertions: 2362 | 2161 passed | 158 failed | 43 failed as expected
|
||||
test cases: 448 | 328 passed | 96 failed | 6 skipped | 18 failed as expected
|
||||
assertions: 2376 | 2175 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="2374" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
|
||||
<testsuite name="<exe-name>" errors="17" failures="141" skipped="12" tests="2388" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
|
||||
<properties>
|
||||
<property name="random-seed" value="1"/>
|
||||
<property name="filters" value=""*" ~[!nonportable] ~[!benchmark] ~[approvals]"/>
|
||||
@@ -832,6 +832,12 @@ at Message.tests.cpp:<line number>
|
||||
<testcase classname="<exe-name>.global" name="Floating point matchers: float/Constructor validation" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Floating point matchers: float/IsNaN" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="GENERATE can combine literals and generators" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Generator adapters properly handle isFinite" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Generator adapters properly handle isFinite/concat generator" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Generator adapters properly handle isFinite/take generator" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Generator adapters properly handle isFinite/chunk generator" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Generator adapters properly handle isFinite/map" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Generator adapters properly handle isFinite/filter" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Generators -- adapters" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Generators -- adapters/Filtering by predicate" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Generators -- adapters/Filtering by predicate/Basic usage" time="{duration}" status="run"/>
|
||||
@@ -1342,6 +1348,9 @@ at Message.tests.cpp:<line number>
|
||||
<testcase classname="<exe-name>.global" name="Product with differing arities - std::tuple<int>" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Random seed generation accepts known methods" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Random seed generation reports unknown methods" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="RandomGenerator reports itself as infinite - float" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="RandomGenerator reports itself as infinite - int" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="RandomGenerator reports itself as infinite - long double" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Range type with sentinel" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Reconstruction should be based on stringification: #914" time="{duration}" status="run">
|
||||
<failure message="truthy(false)" type="CHECK">
|
||||
@@ -1380,6 +1389,7 @@ at Matchers.tests.cpp:<line number>
|
||||
</testcase>
|
||||
<testcase classname="<exe-name>.global" name="Registering reporter with '::' in name fails" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Regression test #1" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="RepeatGenerator refuses infinite generators" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Reporter's write listings to provided stream" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Reporter's write listings to provided stream/Automake reporter lists tags" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Reporter's write listings to provided stream/Automake reporter lists reporters" 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="2374" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
|
||||
<testsuite name="<exe-name>" errors="17" failures="141" skipped="12" tests="2388" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
|
||||
<properties>
|
||||
<property name="random-seed" value="1"/>
|
||||
<property name="filters" value=""*" ~[!nonportable] ~[!benchmark] ~[approvals]"/>
|
||||
@@ -831,6 +831,12 @@ at Message.tests.cpp:<line number>
|
||||
<testcase classname="<exe-name>.global" name="Floating point matchers: float/Constructor validation" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Floating point matchers: float/IsNaN" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="GENERATE can combine literals and generators" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Generator adapters properly handle isFinite" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Generator adapters properly handle isFinite/concat generator" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Generator adapters properly handle isFinite/take generator" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Generator adapters properly handle isFinite/chunk generator" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Generator adapters properly handle isFinite/map" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Generator adapters properly handle isFinite/filter" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Generators -- adapters" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Generators -- adapters/Filtering by predicate" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Generators -- adapters/Filtering by predicate/Basic usage" time="{duration}" status="run"/>
|
||||
@@ -1341,6 +1347,9 @@ at Message.tests.cpp:<line number>
|
||||
<testcase classname="<exe-name>.global" name="Product with differing arities - std::tuple<int>" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Random seed generation accepts known methods" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Random seed generation reports unknown methods" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="RandomGenerator reports itself as infinite - float" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="RandomGenerator reports itself as infinite - int" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="RandomGenerator reports itself as infinite - long double" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Range type with sentinel" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Reconstruction should be based on stringification: #914" time="{duration}" status="run">
|
||||
<failure message="truthy(false)" type="CHECK">
|
||||
@@ -1379,6 +1388,7 @@ at Matchers.tests.cpp:<line number>
|
||||
</testcase>
|
||||
<testcase classname="<exe-name>.global" name="Registering reporter with '::' in name fails" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Regression test #1" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="RepeatGenerator refuses infinite generators" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Reporter's write listings to provided stream" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Reporter's write listings to provided stream/Automake reporter lists tags" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Reporter's write listings to provided stream/Automake reporter lists reporters" time="{duration}" status="run"/>
|
||||
|
||||
@@ -150,6 +150,12 @@ at AssertionHandler.tests.cpp:<line number>
|
||||
<testCase name="ConcatGenerator/Iterating over multiple generators" duration="{duration}"/>
|
||||
<testCase name="Filter generator throws exception for empty generator" duration="{duration}"/>
|
||||
<testCase name="FixedValuesGenerator can be skipped forward" duration="{duration}"/>
|
||||
<testCase name="Generator adapters properly handle isFinite" duration="{duration}"/>
|
||||
<testCase name="Generator adapters properly handle isFinite/concat generator" duration="{duration}"/>
|
||||
<testCase name="Generator adapters properly handle isFinite/take generator" duration="{duration}"/>
|
||||
<testCase name="Generator adapters properly handle isFinite/chunk generator" duration="{duration}"/>
|
||||
<testCase name="Generator adapters properly handle isFinite/map" duration="{duration}"/>
|
||||
<testCase name="Generator adapters properly handle isFinite/filter" duration="{duration}"/>
|
||||
<testCase name="Generators can be skipped forward" duration="{duration}"/>
|
||||
<testCase name="Generators internals" duration="{duration}"/>
|
||||
<testCase name="Generators internals/Single value" duration="{duration}"/>
|
||||
@@ -189,6 +195,10 @@ at AssertionHandler.tests.cpp:<line number>
|
||||
<testCase name="Generators internals/Range/Negative manual step/Integer/Slightly over end" duration="{duration}"/>
|
||||
<testCase name="Generators internals/Range/Negative manual step/Integer/Slightly under end" duration="{duration}"/>
|
||||
<testCase name="MapGenerator can be skipped forward efficiently" duration="{duration}"/>
|
||||
<testCase name="RandomGenerator reports itself as infinite - float" duration="{duration}"/>
|
||||
<testCase name="RandomGenerator reports itself as infinite - int" duration="{duration}"/>
|
||||
<testCase name="RandomGenerator reports itself as infinite - long double" duration="{duration}"/>
|
||||
<testCase name="RepeatGenerator refuses infinite generators" duration="{duration}"/>
|
||||
<testCase name="TakeGenerator can be skipped forward" duration="{duration}"/>
|
||||
<testCase name="TakeGenerator can be skipped forward/take is shorter than underlying" duration="{duration}"/>
|
||||
<testCase name="TakeGenerator can be skipped forward/take is longer than underlying" duration="{duration}"/>
|
||||
|
||||
@@ -149,6 +149,12 @@ at AssertionHandler.tests.cpp:<line number>
|
||||
<testCase name="ConcatGenerator/Iterating over multiple generators" duration="{duration}"/>
|
||||
<testCase name="Filter generator throws exception for empty generator" duration="{duration}"/>
|
||||
<testCase name="FixedValuesGenerator can be skipped forward" duration="{duration}"/>
|
||||
<testCase name="Generator adapters properly handle isFinite" duration="{duration}"/>
|
||||
<testCase name="Generator adapters properly handle isFinite/concat generator" duration="{duration}"/>
|
||||
<testCase name="Generator adapters properly handle isFinite/take generator" duration="{duration}"/>
|
||||
<testCase name="Generator adapters properly handle isFinite/chunk generator" duration="{duration}"/>
|
||||
<testCase name="Generator adapters properly handle isFinite/map" duration="{duration}"/>
|
||||
<testCase name="Generator adapters properly handle isFinite/filter" duration="{duration}"/>
|
||||
<testCase name="Generators can be skipped forward" duration="{duration}"/>
|
||||
<testCase name="Generators internals" duration="{duration}"/>
|
||||
<testCase name="Generators internals/Single value" duration="{duration}"/>
|
||||
@@ -188,6 +194,10 @@ at AssertionHandler.tests.cpp:<line number>
|
||||
<testCase name="Generators internals/Range/Negative manual step/Integer/Slightly over end" duration="{duration}"/>
|
||||
<testCase name="Generators internals/Range/Negative manual step/Integer/Slightly under end" duration="{duration}"/>
|
||||
<testCase name="MapGenerator can be skipped forward efficiently" duration="{duration}"/>
|
||||
<testCase name="RandomGenerator reports itself as infinite - float" duration="{duration}"/>
|
||||
<testCase name="RandomGenerator reports itself as infinite - int" duration="{duration}"/>
|
||||
<testCase name="RandomGenerator reports itself as infinite - long double" duration="{duration}"/>
|
||||
<testCase name="RepeatGenerator refuses infinite generators" duration="{duration}"/>
|
||||
<testCase name="TakeGenerator can be skipped forward" duration="{duration}"/>
|
||||
<testCase name="TakeGenerator can be skipped forward/take is shorter than underlying" duration="{duration}"/>
|
||||
<testCase name="TakeGenerator can be skipped forward/take is longer than underlying" duration="{duration}"/>
|
||||
|
||||
@@ -1358,6 +1358,26 @@ ok {test-number} - i % 2 == 0 for: 0 == 0
|
||||
ok {test-number} - i % 2 == 0 for: 0 == 0
|
||||
# GENERATE can combine literals and generators
|
||||
ok {test-number} - i % 2 == 0 for: 0 == 0
|
||||
# Generator adapters properly handle isFinite
|
||||
ok {test-number} - finite_cat.isFinite() for: true
|
||||
# Generator adapters properly handle isFinite
|
||||
ok {test-number} - !(infinite_cat.isFinite()) for: !false
|
||||
# Generator adapters properly handle isFinite
|
||||
ok {test-number} - take_1.isFinite() for: true
|
||||
# Generator adapters properly handle isFinite
|
||||
ok {test-number} - take_2.isFinite() for: true
|
||||
# Generator adapters properly handle isFinite
|
||||
ok {test-number} - finite_chunk.isFinite() for: true
|
||||
# Generator adapters properly handle isFinite
|
||||
ok {test-number} - !(infinite_chunk.isFinite()) for: !false
|
||||
# Generator adapters properly handle isFinite
|
||||
ok {test-number} - finite_map.isFinite() for: true
|
||||
# Generator adapters properly handle isFinite
|
||||
ok {test-number} - !(infinite_map.isFinite()) for: !false
|
||||
# Generator adapters properly handle isFinite
|
||||
ok {test-number} - finite_filter.isFinite() for: true
|
||||
# Generator adapters properly handle isFinite
|
||||
ok {test-number} - !(infinite_filter.isFinite()) for: !false
|
||||
# Generators -- adapters
|
||||
ok {test-number} - i % 2 == 0 for: 0 == 0
|
||||
# Generators -- adapters
|
||||
@@ -2592,6 +2612,12 @@ ok {test-number} - Catch::generateRandomSeed(method)
|
||||
ok {test-number} - Catch::generateRandomSeed(method)
|
||||
# Random seed generation reports unknown methods
|
||||
ok {test-number} - Catch::generateRandomSeed(static_cast<Catch::GenerateFrom>(77))
|
||||
# RandomGenerator reports itself as infinite - float
|
||||
ok {test-number} - !(Catch::Generators::random( TestType{ 0 }, TestType{ 100 } ).isFinite()) for: !false
|
||||
# RandomGenerator reports itself as infinite - int
|
||||
ok {test-number} - !(Catch::Generators::random( TestType{ 0 }, TestType{ 100 } ).isFinite()) for: !false
|
||||
# RandomGenerator reports itself as infinite - long double
|
||||
ok {test-number} - !(Catch::Generators::random( TestType{ 0 }, TestType{ 100 } ).isFinite()) for: !false
|
||||
# Range type with sentinel
|
||||
ok {test-number} - Catch::Detail::stringify(UsesSentinel{}) == "{ }" for: "{ }" == "{ }"
|
||||
# Reconstruction should be based on stringification: #914
|
||||
@@ -2606,6 +2632,8 @@ not ok {test-number} - testStringForMatching(), Matches( "this string contains '
|
||||
ok {test-number} - registry.registerReporter( "with::doublecolons", Catch::Detail::make_unique<TestReporterFactory>() ), "'::' is not allowed in reporter name: 'with::doublecolons'" for: "'::' is not allowed in reporter name: 'with::doublecolons'" equals: "'::' is not allowed in reporter name: 'with::doublecolons'"
|
||||
# Regression test #1
|
||||
ok {test-number} - actual, !UnorderedEquals( expected ) for: { 'a', 'b' } not UnorderedEquals: { 'c', 'b' }
|
||||
# RepeatGenerator refuses infinite generators
|
||||
ok {test-number} - RepeatGenerator<int>( 2, random( 1, 100 ) )
|
||||
# Reporter's write listings to provided stream
|
||||
ok {test-number} - !(factories.empty()) for: !false
|
||||
# Reporter's write listings to provided stream
|
||||
@@ -4743,5 +4771,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0
|
||||
ok {test-number} -
|
||||
# xmlentitycheck
|
||||
ok {test-number} -
|
||||
1..2374
|
||||
1..2388
|
||||
|
||||
@@ -1356,6 +1356,26 @@ ok {test-number} - i % 2 == 0 for: 0 == 0
|
||||
ok {test-number} - i % 2 == 0 for: 0 == 0
|
||||
# GENERATE can combine literals and generators
|
||||
ok {test-number} - i % 2 == 0 for: 0 == 0
|
||||
# Generator adapters properly handle isFinite
|
||||
ok {test-number} - finite_cat.isFinite() for: true
|
||||
# Generator adapters properly handle isFinite
|
||||
ok {test-number} - !(infinite_cat.isFinite()) for: !false
|
||||
# Generator adapters properly handle isFinite
|
||||
ok {test-number} - take_1.isFinite() for: true
|
||||
# Generator adapters properly handle isFinite
|
||||
ok {test-number} - take_2.isFinite() for: true
|
||||
# Generator adapters properly handle isFinite
|
||||
ok {test-number} - finite_chunk.isFinite() for: true
|
||||
# Generator adapters properly handle isFinite
|
||||
ok {test-number} - !(infinite_chunk.isFinite()) for: !false
|
||||
# Generator adapters properly handle isFinite
|
||||
ok {test-number} - finite_map.isFinite() for: true
|
||||
# Generator adapters properly handle isFinite
|
||||
ok {test-number} - !(infinite_map.isFinite()) for: !false
|
||||
# Generator adapters properly handle isFinite
|
||||
ok {test-number} - finite_filter.isFinite() for: true
|
||||
# Generator adapters properly handle isFinite
|
||||
ok {test-number} - !(infinite_filter.isFinite()) for: !false
|
||||
# Generators -- adapters
|
||||
ok {test-number} - i % 2 == 0 for: 0 == 0
|
||||
# Generators -- adapters
|
||||
@@ -2590,6 +2610,12 @@ ok {test-number} - Catch::generateRandomSeed(method)
|
||||
ok {test-number} - Catch::generateRandomSeed(method)
|
||||
# Random seed generation reports unknown methods
|
||||
ok {test-number} - Catch::generateRandomSeed(static_cast<Catch::GenerateFrom>(77))
|
||||
# RandomGenerator reports itself as infinite - float
|
||||
ok {test-number} - !(Catch::Generators::random( TestType{ 0 }, TestType{ 100 } ).isFinite()) for: !false
|
||||
# RandomGenerator reports itself as infinite - int
|
||||
ok {test-number} - !(Catch::Generators::random( TestType{ 0 }, TestType{ 100 } ).isFinite()) for: !false
|
||||
# RandomGenerator reports itself as infinite - long double
|
||||
ok {test-number} - !(Catch::Generators::random( TestType{ 0 }, TestType{ 100 } ).isFinite()) for: !false
|
||||
# Range type with sentinel
|
||||
ok {test-number} - Catch::Detail::stringify(UsesSentinel{}) == "{ }" for: "{ }" == "{ }"
|
||||
# Reconstruction should be based on stringification: #914
|
||||
@@ -2604,6 +2630,8 @@ not ok {test-number} - testStringForMatching(), Matches( "this string contains '
|
||||
ok {test-number} - registry.registerReporter( "with::doublecolons", Catch::Detail::make_unique<TestReporterFactory>() ), "'::' is not allowed in reporter name: 'with::doublecolons'" for: "'::' is not allowed in reporter name: 'with::doublecolons'" equals: "'::' is not allowed in reporter name: 'with::doublecolons'"
|
||||
# Regression test #1
|
||||
ok {test-number} - actual, !UnorderedEquals( expected ) for: { 'a', 'b' } not UnorderedEquals: { 'c', 'b' }
|
||||
# RepeatGenerator refuses infinite generators
|
||||
ok {test-number} - RepeatGenerator<int>( 2, random( 1, 100 ) )
|
||||
# Reporter's write listings to provided stream
|
||||
ok {test-number} - !(factories.empty()) for: !false
|
||||
# Reporter's write listings to provided stream
|
||||
@@ -4732,5 +4760,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0
|
||||
ok {test-number} -
|
||||
# xmlentitycheck
|
||||
ok {test-number} -
|
||||
1..2374
|
||||
1..2388
|
||||
|
||||
@@ -417,6 +417,8 @@
|
||||
##teamcity[testFinished name='Floating point matchers: float' duration="{duration}"]
|
||||
##teamcity[testStarted name='GENERATE can combine literals and generators']
|
||||
##teamcity[testFinished name='GENERATE can combine literals and generators' duration="{duration}"]
|
||||
##teamcity[testStarted name='Generator adapters properly handle isFinite']
|
||||
##teamcity[testFinished name='Generator adapters properly handle isFinite' duration="{duration}"]
|
||||
##teamcity[testStarted name='Generators -- adapters']
|
||||
##teamcity[testFinished name='Generators -- adapters' duration="{duration}"]
|
||||
##teamcity[testStarted name='Generators -- simple']
|
||||
@@ -571,6 +573,12 @@
|
||||
##teamcity[testFinished name='Random seed generation accepts known methods' duration="{duration}"]
|
||||
##teamcity[testStarted name='Random seed generation reports unknown methods']
|
||||
##teamcity[testFinished name='Random seed generation reports unknown methods' duration="{duration}"]
|
||||
##teamcity[testStarted name='RandomGenerator reports itself as infinite - float']
|
||||
##teamcity[testFinished name='RandomGenerator reports itself as infinite - float' duration="{duration}"]
|
||||
##teamcity[testStarted name='RandomGenerator reports itself as infinite - int']
|
||||
##teamcity[testFinished name='RandomGenerator reports itself as infinite - int' duration="{duration}"]
|
||||
##teamcity[testStarted name='RandomGenerator reports itself as infinite - long double']
|
||||
##teamcity[testFinished name='RandomGenerator reports itself as infinite - long double' duration="{duration}"]
|
||||
##teamcity[testStarted name='Range type with sentinel']
|
||||
##teamcity[testFinished name='Range type with sentinel' duration="{duration}"]
|
||||
##teamcity[testStarted name='Reconstruction should be based on stringification: #914']
|
||||
@@ -585,6 +593,8 @@
|
||||
##teamcity[testFinished name='Registering reporter with |'::|' in name fails' duration="{duration}"]
|
||||
##teamcity[testStarted name='Regression test #1']
|
||||
##teamcity[testFinished name='Regression test #1' duration="{duration}"]
|
||||
##teamcity[testStarted name='RepeatGenerator refuses infinite generators']
|
||||
##teamcity[testFinished name='RepeatGenerator refuses infinite generators' duration="{duration}"]
|
||||
##teamcity[testStarted name='Reporter|'s write listings to provided stream']
|
||||
##teamcity[testFinished name='Reporter|'s write listings to provided stream' duration="{duration}"]
|
||||
##teamcity[testStarted name='Reproducer for #2309 - a very long description past 80 chars (default console width) with a late colon : blablabla']
|
||||
|
||||
@@ -417,6 +417,8 @@
|
||||
##teamcity[testFinished name='Floating point matchers: float' duration="{duration}"]
|
||||
##teamcity[testStarted name='GENERATE can combine literals and generators']
|
||||
##teamcity[testFinished name='GENERATE can combine literals and generators' duration="{duration}"]
|
||||
##teamcity[testStarted name='Generator adapters properly handle isFinite']
|
||||
##teamcity[testFinished name='Generator adapters properly handle isFinite' duration="{duration}"]
|
||||
##teamcity[testStarted name='Generators -- adapters']
|
||||
##teamcity[testFinished name='Generators -- adapters' duration="{duration}"]
|
||||
##teamcity[testStarted name='Generators -- simple']
|
||||
@@ -571,6 +573,12 @@
|
||||
##teamcity[testFinished name='Random seed generation accepts known methods' duration="{duration}"]
|
||||
##teamcity[testStarted name='Random seed generation reports unknown methods']
|
||||
##teamcity[testFinished name='Random seed generation reports unknown methods' duration="{duration}"]
|
||||
##teamcity[testStarted name='RandomGenerator reports itself as infinite - float']
|
||||
##teamcity[testFinished name='RandomGenerator reports itself as infinite - float' duration="{duration}"]
|
||||
##teamcity[testStarted name='RandomGenerator reports itself as infinite - int']
|
||||
##teamcity[testFinished name='RandomGenerator reports itself as infinite - int' duration="{duration}"]
|
||||
##teamcity[testStarted name='RandomGenerator reports itself as infinite - long double']
|
||||
##teamcity[testFinished name='RandomGenerator reports itself as infinite - long double' duration="{duration}"]
|
||||
##teamcity[testStarted name='Range type with sentinel']
|
||||
##teamcity[testFinished name='Range type with sentinel' duration="{duration}"]
|
||||
##teamcity[testStarted name='Reconstruction should be based on stringification: #914']
|
||||
@@ -585,6 +593,8 @@
|
||||
##teamcity[testFinished name='Registering reporter with |'::|' in name fails' duration="{duration}"]
|
||||
##teamcity[testStarted name='Regression test #1']
|
||||
##teamcity[testFinished name='Regression test #1' duration="{duration}"]
|
||||
##teamcity[testStarted name='RepeatGenerator refuses infinite generators']
|
||||
##teamcity[testFinished name='RepeatGenerator refuses infinite generators' duration="{duration}"]
|
||||
##teamcity[testStarted name='Reporter|'s write listings to provided stream']
|
||||
##teamcity[testFinished name='Reporter|'s write listings to provided stream' duration="{duration}"]
|
||||
##teamcity[testStarted name='Reproducer for #2309 - a very long description past 80 chars (default console width) with a late colon : blablabla']
|
||||
|
||||
@@ -6119,6 +6119,104 @@ Approx( 1.30000000000000004 )
|
||||
</Expression>
|
||||
<OverallResult success="true" skips="0"/>
|
||||
</TestCase>
|
||||
<TestCase name="Generator adapters properly handle isFinite" tags="[chunk][concat][filter][generators][map][take]" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Section name="concat generator" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Original>
|
||||
finite_cat.isFinite()
|
||||
</Original>
|
||||
<Expanded>
|
||||
true
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Original>
|
||||
!(infinite_cat.isFinite())
|
||||
</Original>
|
||||
<Expanded>
|
||||
!false
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
|
||||
</Section>
|
||||
<Section name="take generator" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Original>
|
||||
take_1.isFinite()
|
||||
</Original>
|
||||
<Expanded>
|
||||
true
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Original>
|
||||
take_2.isFinite()
|
||||
</Original>
|
||||
<Expanded>
|
||||
true
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
|
||||
</Section>
|
||||
<Section name="chunk generator" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Original>
|
||||
finite_chunk.isFinite()
|
||||
</Original>
|
||||
<Expanded>
|
||||
true
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Original>
|
||||
!(infinite_chunk.isFinite())
|
||||
</Original>
|
||||
<Expanded>
|
||||
!false
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
|
||||
</Section>
|
||||
<Section name="map" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Original>
|
||||
finite_map.isFinite()
|
||||
</Original>
|
||||
<Expanded>
|
||||
true
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Original>
|
||||
!(infinite_map.isFinite())
|
||||
</Original>
|
||||
<Expanded>
|
||||
!false
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
|
||||
</Section>
|
||||
<Section name="filter" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Original>
|
||||
finite_filter.isFinite()
|
||||
</Original>
|
||||
<Expanded>
|
||||
true
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Original>
|
||||
!(infinite_filter.isFinite())
|
||||
</Original>
|
||||
<Expanded>
|
||||
!false
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
|
||||
</Section>
|
||||
<OverallResult success="true" skips="0"/>
|
||||
</TestCase>
|
||||
<TestCase name="Generators -- adapters" tags="[generators][generic]" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" >
|
||||
<Section name="Filtering by predicate" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" >
|
||||
<Section name="Basic usage" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" >
|
||||
@@ -12492,6 +12590,39 @@ Approx( 0.98999999999999999 )
|
||||
</Expression>
|
||||
<OverallResult success="true" skips="0"/>
|
||||
</TestCase>
|
||||
<TestCase name="RandomGenerator reports itself as infinite - float" tags="[generators][random]" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Original>
|
||||
!(Catch::Generators::random( TestType{ 0 }, TestType{ 100 } ).isFinite())
|
||||
</Original>
|
||||
<Expanded>
|
||||
!false
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true" skips="0"/>
|
||||
</TestCase>
|
||||
<TestCase name="RandomGenerator reports itself as infinite - int" tags="[generators][random]" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Original>
|
||||
!(Catch::Generators::random( TestType{ 0 }, TestType{ 100 } ).isFinite())
|
||||
</Original>
|
||||
<Expanded>
|
||||
!false
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true" skips="0"/>
|
||||
</TestCase>
|
||||
<TestCase name="RandomGenerator reports itself as infinite - long double" tags="[generators][random]" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Original>
|
||||
!(Catch::Generators::random( TestType{ 0 }, TestType{ 100 } ).isFinite())
|
||||
</Original>
|
||||
<Expanded>
|
||||
!false
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true" skips="0"/>
|
||||
</TestCase>
|
||||
<TestCase name="Range type with sentinel" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
|
||||
<Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
|
||||
<Original>
|
||||
@@ -12563,6 +12694,17 @@ Approx( 0.98999999999999999 )
|
||||
</Expression>
|
||||
<OverallResult success="true" skips="0"/>
|
||||
</TestCase>
|
||||
<TestCase name="RepeatGenerator refuses infinite generators" tags="[generators][repeat]" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE_THROWS" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Original>
|
||||
RepeatGenerator<int>( 2, random( 1, 100 ) )
|
||||
</Original>
|
||||
<Expanded>
|
||||
RepeatGenerator<int>( 2, random( 1, 100 ) )
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true" skips="0"/>
|
||||
</TestCase>
|
||||
<TestCase name="Reporter's write listings to provided stream" tags="[reporters]" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
|
||||
<Original>
|
||||
@@ -22878,6 +23020,6 @@ Approx( -1.95996398454005449 )
|
||||
</Section>
|
||||
<OverallResult success="true" skips="0"/>
|
||||
</TestCase>
|
||||
<OverallResults successes="2161" failures="158" expectedFailures="43" skips="12"/>
|
||||
<OverallResultsCases successes="323" failures="96" expectedFailures="18" skips="6"/>
|
||||
<OverallResults successes="2175" failures="158" expectedFailures="43" skips="12"/>
|
||||
<OverallResultsCases successes="328" failures="96" expectedFailures="18" skips="6"/>
|
||||
</Catch2TestRun>
|
||||
@@ -6119,6 +6119,104 @@ Approx( 1.30000000000000004 )
|
||||
</Expression>
|
||||
<OverallResult success="true" skips="0"/>
|
||||
</TestCase>
|
||||
<TestCase name="Generator adapters properly handle isFinite" tags="[chunk][concat][filter][generators][map][take]" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Section name="concat generator" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Original>
|
||||
finite_cat.isFinite()
|
||||
</Original>
|
||||
<Expanded>
|
||||
true
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Original>
|
||||
!(infinite_cat.isFinite())
|
||||
</Original>
|
||||
<Expanded>
|
||||
!false
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
|
||||
</Section>
|
||||
<Section name="take generator" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Original>
|
||||
take_1.isFinite()
|
||||
</Original>
|
||||
<Expanded>
|
||||
true
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Original>
|
||||
take_2.isFinite()
|
||||
</Original>
|
||||
<Expanded>
|
||||
true
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
|
||||
</Section>
|
||||
<Section name="chunk generator" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Original>
|
||||
finite_chunk.isFinite()
|
||||
</Original>
|
||||
<Expanded>
|
||||
true
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Original>
|
||||
!(infinite_chunk.isFinite())
|
||||
</Original>
|
||||
<Expanded>
|
||||
!false
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
|
||||
</Section>
|
||||
<Section name="map" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Original>
|
||||
finite_map.isFinite()
|
||||
</Original>
|
||||
<Expanded>
|
||||
true
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Original>
|
||||
!(infinite_map.isFinite())
|
||||
</Original>
|
||||
<Expanded>
|
||||
!false
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
|
||||
</Section>
|
||||
<Section name="filter" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Original>
|
||||
finite_filter.isFinite()
|
||||
</Original>
|
||||
<Expanded>
|
||||
true
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Original>
|
||||
!(infinite_filter.isFinite())
|
||||
</Original>
|
||||
<Expanded>
|
||||
!false
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
|
||||
</Section>
|
||||
<OverallResult success="true" skips="0"/>
|
||||
</TestCase>
|
||||
<TestCase name="Generators -- adapters" tags="[generators][generic]" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" >
|
||||
<Section name="Filtering by predicate" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" >
|
||||
<Section name="Basic usage" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" >
|
||||
@@ -12492,6 +12590,39 @@ Approx( 0.98999999999999999 )
|
||||
</Expression>
|
||||
<OverallResult success="true" skips="0"/>
|
||||
</TestCase>
|
||||
<TestCase name="RandomGenerator reports itself as infinite - float" tags="[generators][random]" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Original>
|
||||
!(Catch::Generators::random( TestType{ 0 }, TestType{ 100 } ).isFinite())
|
||||
</Original>
|
||||
<Expanded>
|
||||
!false
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true" skips="0"/>
|
||||
</TestCase>
|
||||
<TestCase name="RandomGenerator reports itself as infinite - int" tags="[generators][random]" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Original>
|
||||
!(Catch::Generators::random( TestType{ 0 }, TestType{ 100 } ).isFinite())
|
||||
</Original>
|
||||
<Expanded>
|
||||
!false
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true" skips="0"/>
|
||||
</TestCase>
|
||||
<TestCase name="RandomGenerator reports itself as infinite - long double" tags="[generators][random]" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Original>
|
||||
!(Catch::Generators::random( TestType{ 0 }, TestType{ 100 } ).isFinite())
|
||||
</Original>
|
||||
<Expanded>
|
||||
!false
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true" skips="0"/>
|
||||
</TestCase>
|
||||
<TestCase name="Range type with sentinel" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
|
||||
<Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
|
||||
<Original>
|
||||
@@ -12563,6 +12694,17 @@ Approx( 0.98999999999999999 )
|
||||
</Expression>
|
||||
<OverallResult success="true" skips="0"/>
|
||||
</TestCase>
|
||||
<TestCase name="RepeatGenerator refuses infinite generators" tags="[generators][repeat]" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE_THROWS" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" >
|
||||
<Original>
|
||||
RepeatGenerator<int>( 2, random( 1, 100 ) )
|
||||
</Original>
|
||||
<Expanded>
|
||||
RepeatGenerator<int>( 2, random( 1, 100 ) )
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true" skips="0"/>
|
||||
</TestCase>
|
||||
<TestCase name="Reporter's write listings to provided stream" tags="[reporters]" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
|
||||
<Original>
|
||||
@@ -22877,6 +23019,6 @@ Approx( -1.95996398454005449 )
|
||||
</Section>
|
||||
<OverallResult success="true" skips="0"/>
|
||||
</TestCase>
|
||||
<OverallResults successes="2161" failures="158" expectedFailures="43" skips="12"/>
|
||||
<OverallResultsCases successes="323" failures="96" expectedFailures="18" skips="6"/>
|
||||
<OverallResults successes="2175" failures="158" expectedFailures="43" skips="12"/>
|
||||
<OverallResultsCases successes="328" failures="96" expectedFailures="18" skips="6"/>
|
||||
</Catch2TestRun>
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <helpers/range_test_helpers.hpp>
|
||||
|
||||
#include <catch2/catch_approx.hpp>
|
||||
#include <catch2/catch_template_test_macros.hpp>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <catch2/generators/catch_generator_exception.hpp>
|
||||
#include <catch2/generators/catch_generators_adapters.hpp>
|
||||
@@ -339,6 +340,7 @@ public:
|
||||
bool next() override {
|
||||
return false;
|
||||
}
|
||||
bool isFinite() const override { return true; }
|
||||
};
|
||||
|
||||
// Avoids -Wweak-vtables
|
||||
@@ -472,6 +474,7 @@ namespace {
|
||||
|
||||
public:
|
||||
bool const& get() const override;
|
||||
bool isFinite() const override { return true; }
|
||||
};
|
||||
|
||||
// Avoids -Wweak-vtables
|
||||
@@ -509,6 +512,7 @@ namespace {
|
||||
|
||||
bool const& get() const override;
|
||||
size_t stringificationCalls() const { return m_stringificationCalls; }
|
||||
bool isFinite() const override { return true; }
|
||||
};
|
||||
|
||||
// Avoids -Wweak-vtables
|
||||
@@ -618,6 +622,8 @@ namespace {
|
||||
++m_idx;
|
||||
return m_idx < m_elements.size();
|
||||
}
|
||||
|
||||
bool isFinite() const override { return true; }
|
||||
};
|
||||
}
|
||||
|
||||
@@ -721,3 +727,66 @@ TEST_CASE("MapGenerator can be skipped forward efficiently",
|
||||
REQUIRE_THROWS( map_generator.skipToNthElement( 7 ) );
|
||||
REQUIRE( map_calls == map_calls_2 + 1 );
|
||||
}
|
||||
|
||||
TEST_CASE( "Generator adapters properly handle isFinite",
|
||||
"[generators][map][take][chunk][filter][concat]" ) {
|
||||
using namespace Catch::Generators;
|
||||
SECTION( "concat generator" ) {
|
||||
ConcatGenerator<int> finite_cat(
|
||||
value( 1 ), values( { 2, 3, 4 } ), value( 5 ) );
|
||||
REQUIRE( finite_cat.isFinite() );
|
||||
|
||||
ConcatGenerator<int> infinite_cat(
|
||||
value( 1 ), random( 1, 10 ), value( 3 ) );
|
||||
REQUIRE_FALSE( infinite_cat.isFinite() );
|
||||
}
|
||||
SECTION( "take generator" ) {
|
||||
TakeGenerator<int> take_1( 2, values( { 1, 2, 3, 4, 5 } ) );
|
||||
REQUIRE( take_1.isFinite() );
|
||||
TakeGenerator<int> take_2( 3, random( 1, 100 ) );
|
||||
REQUIRE( take_2.isFinite() );
|
||||
}
|
||||
SECTION( "chunk generator" ) {
|
||||
ChunkGenerator<int> finite_chunk( 2, values( { 1, 2, 3, 4, 5 } ) );
|
||||
REQUIRE( finite_chunk.isFinite() );
|
||||
ChunkGenerator<int> infinite_chunk( 2, random( 1, 100 ) );
|
||||
REQUIRE_FALSE( infinite_chunk.isFinite() );
|
||||
}
|
||||
SECTION( "map" ) {
|
||||
auto identity = []( int i ) {
|
||||
return i;
|
||||
};
|
||||
|
||||
MapGenerator<int, int, decltype( identity )> finite_map(
|
||||
identity, values( { 1, 2, 3 } ) );
|
||||
REQUIRE( finite_map.isFinite() );
|
||||
MapGenerator<int, int, decltype( identity )> infinite_map(
|
||||
identity, random( 1, 100 ) );
|
||||
REQUIRE_FALSE( infinite_map.isFinite() );
|
||||
}
|
||||
SECTION( "filter" ) {
|
||||
auto always_true = []( int ) {
|
||||
return true;
|
||||
};
|
||||
FilterGenerator<int, decltype( always_true )> finite_filter(
|
||||
always_true, values( { 1, 2, 3, 4, 5 } ) );
|
||||
REQUIRE( finite_filter.isFinite() );
|
||||
FilterGenerator<int, decltype( always_true )> infinite_filter(
|
||||
always_true, random( 1, 100 ) );
|
||||
REQUIRE_FALSE( infinite_filter.isFinite() );
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE( "RepeatGenerator refuses infinite generators",
|
||||
"[generators][repeat]" ) {
|
||||
using namespace Catch::Generators;
|
||||
REQUIRE_THROWS( RepeatGenerator<int>( 2, random( 1, 100 ) ) );
|
||||
}
|
||||
|
||||
TEMPLATE_TEST_CASE( "RandomGenerator reports itself as infinite",
|
||||
"[generators][random]",
|
||||
int,
|
||||
float,
|
||||
long double) {
|
||||
REQUIRE_FALSE( Catch::Generators::random( TestType{ 0 }, TestType{ 100 } ).isFinite() );
|
||||
}
|
||||
@@ -296,6 +296,7 @@ namespace {
|
||||
}
|
||||
|
||||
auto next() -> bool override { return false; }
|
||||
auto isFinite() const -> bool override { return true; }
|
||||
};
|
||||
|
||||
static auto make_test_generator()
|
||||
|
||||
@@ -83,6 +83,8 @@ namespace {
|
||||
}
|
||||
|
||||
auto next() -> bool override { return false; }
|
||||
|
||||
auto isFinite() const -> bool override { return true; }
|
||||
};
|
||||
|
||||
static auto make_test_skip_generator()
|
||||
|
||||
Reference in new issue
Block a user