mirror of
https://github.com/catchorg/Catch2.git
synced 2026-07-21 13:53:35 +00:00
Allow generators to declare themselves (infinite)
This will be useful later to implement warning on infinitely running `GENERATE` expressions.
This commit is contained in:
@@ -48,6 +48,21 @@ If you are mutating the fixture instance from within the test case, and
|
|||||||
want to keep doing so in the future, mark the mutated members as `mutable`.
|
want to keep doing so in the future, mark the mutated members as `mutable`.
|
||||||
|
|
||||||
|
|
||||||
|
### Generator interfaces
|
||||||
|
|
||||||
|
#### Defaulted `UntypedGeneratorBase::isFinite()`
|
||||||
|
|
||||||
|
> Deprecated in Catch2 vX.Y.Z
|
||||||
|
|
||||||
|
The `UntypedGeneratorBase` currently provides a default implementation
|
||||||
|
for `isFinite` that always returns `true`. This was done to keep backwards
|
||||||
|
compatibility with pre-existing generators, as infinite generators can
|
||||||
|
be diagnosed as errors in some cases.
|
||||||
|
|
||||||
|
In the future, all generators will be expected to override `isFinite`.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
[Home](Readme.md#top)
|
[Home](Readme.md#top)
|
||||||
|
|||||||
@@ -276,11 +276,22 @@ struct IGenerator : GeneratorUntypedBase {
|
|||||||
* Going backwards is not supported.
|
* Going backwards is not supported.
|
||||||
*/
|
*/
|
||||||
virtual void skipToNthElementImpl( std::size_t n );
|
virtual void skipToNthElementImpl( std::size_t n );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if calls to `next` will eventually return false
|
||||||
|
*
|
||||||
|
* Note that for backwards compatibility this is currently defaulted
|
||||||
|
* to return `true`, but in the future all generators will have to
|
||||||
|
* provide their own implementation.
|
||||||
|
*/
|
||||||
|
virtual bool isFinite() const = 0;
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
> `skipToNthElementImpl` was added in Catch2 vX.Y.Z
|
> `skipToNthElementImpl` was added in Catch2 vX.Y.Z
|
||||||
|
|
||||||
|
> `isFinite` was added in Catch2 vX.Y.Z
|
||||||
|
|
||||||
However, to be able to use your custom generator inside `GENERATE`, it
|
However, to be able to use your custom generator inside `GENERATE`, it
|
||||||
will need to be wrapped inside a `GeneratorWrapper<T>`.
|
will need to be wrapped inside a `GeneratorWrapper<T>`.
|
||||||
`GeneratorWrapper<T>` is a value wrapper around a
|
`GeneratorWrapper<T>` is a value wrapper around a
|
||||||
|
|||||||
@@ -40,6 +40,8 @@ public:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isFinite() const override { return false; }
|
||||||
|
|
||||||
// Note: this improves the performance only a bit, but it is here
|
// Note: this improves the performance only a bit, but it is here
|
||||||
// to show how you can override the skip functionality.
|
// to show how you can override the skip functionality.
|
||||||
void skipToNthElementImpl( std::size_t n ) override {
|
void skipToNthElementImpl( std::size_t n ) override {
|
||||||
|
|||||||
@@ -40,6 +40,8 @@ public:
|
|||||||
bool next() override {
|
bool next() override {
|
||||||
return !!std::getline(m_stream, m_line);
|
return !!std::getline(m_stream, m_line);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isFinite() const override { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
std::string const& LineGenerator::get() const {
|
std::string const& LineGenerator::get() const {
|
||||||
|
|||||||
@@ -64,6 +64,8 @@ namespace Detail {
|
|||||||
bool next() {
|
bool next() {
|
||||||
return m_generator->countedNext();
|
return m_generator->countedNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isFinite() const { return m_generator->isFinite(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -84,6 +86,8 @@ namespace Detail {
|
|||||||
bool next() override {
|
bool next() override {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isFinite() const override { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
@@ -112,6 +116,8 @@ namespace Detail {
|
|||||||
++m_idx;
|
++m_idx;
|
||||||
return m_idx < m_values.size();
|
return m_idx < m_values.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isFinite() const override { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T, typename DecayedT = std::decay_t<T>>
|
template <typename T, typename DecayedT = std::decay_t<T>>
|
||||||
@@ -176,6 +182,14 @@ namespace Detail {
|
|||||||
}
|
}
|
||||||
return m_current < m_generators.size();
|
return m_current < m_generators.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isFinite() const override {
|
||||||
|
for (auto const& gen : m_generators) {
|
||||||
|
if (!gen.isFinite()) { return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -62,6 +62,8 @@ namespace Generators {
|
|||||||
}
|
}
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isFinite() const override { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
@@ -103,6 +105,8 @@ namespace Generators {
|
|||||||
while (!m_predicate(m_generator.get()) && (success = m_generator.next()) == true);
|
while (!m_predicate(m_generator.get()) && (success = m_generator.next()) == true);
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isFinite() const override { return m_generator.isFinite(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -127,6 +131,9 @@ namespace Generators {
|
|||||||
m_target_repeats(repeats)
|
m_target_repeats(repeats)
|
||||||
{
|
{
|
||||||
assert(m_target_repeats > 0 && "Repeat generator must repeat at least once");
|
assert(m_target_repeats > 0 && "Repeat generator must repeat at least once");
|
||||||
|
if (!m_generator.isFinite()) {
|
||||||
|
Detail::throw_generator_exception( "Cannot repeat infinite generator" );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
T const& get() const override {
|
T const& get() const override {
|
||||||
@@ -160,6 +167,8 @@ namespace Generators {
|
|||||||
}
|
}
|
||||||
return m_current_repeat < m_target_repeats;
|
return m_current_repeat < m_target_repeats;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isFinite() const override { return m_generator.isFinite(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
@@ -207,6 +216,8 @@ namespace Generators {
|
|||||||
}
|
}
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isFinite() const override { return m_generator.isFinite(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename Func, typename U, typename T = FunctionReturnType<Func, U>>
|
template <typename Func, typename U, typename T = FunctionReturnType<Func, U>>
|
||||||
@@ -256,6 +267,8 @@ namespace Generators {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isFinite() const override { return m_generator.isFinite(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
@@ -297,6 +310,13 @@ namespace Generators {
|
|||||||
++m_current_generator;
|
++m_current_generator;
|
||||||
return m_current_generator < m_generators.size();
|
return m_current_generator < m_generators.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isFinite() const override {
|
||||||
|
for ( auto const& gen : m_generators ) {
|
||||||
|
if ( !gen.isFinite() ) { return false; }
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T, typename... Generators>
|
template <typename T, typename... Generators>
|
||||||
|
|||||||
@@ -37,5 +37,10 @@ namespace Catch {
|
|||||||
m_current_number = m_pimpl->dist( m_pimpl->rng );
|
m_current_number = m_pimpl->dist( m_pimpl->rng );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool RandomFloatingGenerator<long double>::isFinite() const {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Generators
|
} // namespace Generators
|
||||||
} // namespace Catch
|
} // namespace Catch
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ public:
|
|||||||
m_current_number = m_dist(m_rng);
|
m_current_number = m_dist(m_rng);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
bool isFinite() const override { return false; }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
@@ -59,6 +60,7 @@ public:
|
|||||||
bool next() override;
|
bool next() override;
|
||||||
|
|
||||||
~RandomFloatingGenerator() override; // = default
|
~RandomFloatingGenerator() override; // = default
|
||||||
|
bool isFinite() const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename Integer>
|
template <typename Integer>
|
||||||
@@ -80,6 +82,7 @@ public:
|
|||||||
m_current_number = m_dist(m_rng);
|
m_current_number = m_dist(m_rng);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
bool isFinite() const override { return false; }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
|||||||
@@ -48,6 +48,8 @@ public:
|
|||||||
m_current += m_step;
|
m_current += m_step;
|
||||||
return (m_positive) ? (m_current < m_end) : (m_current > m_end);
|
return (m_positive) ? (m_current < m_end) : (m_current > m_end);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isFinite() const override { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
@@ -87,6 +89,8 @@ public:
|
|||||||
++m_current;
|
++m_current;
|
||||||
return m_current != m_elems.size();
|
return m_current != m_elems.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isFinite() const override { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename InputIterator,
|
template <typename InputIterator,
|
||||||
|
|||||||
@@ -55,5 +55,7 @@ namespace Catch {
|
|||||||
return m_stringReprCache;
|
return m_stringReprCache;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool GeneratorUntypedBase::isFinite() const { return true; }
|
||||||
|
|
||||||
} // namespace Generators
|
} // namespace Generators
|
||||||
} // namespace Catch
|
} // namespace Catch
|
||||||
|
|||||||
@@ -88,6 +88,15 @@ namespace Catch {
|
|||||||
* comes first.
|
* comes first.
|
||||||
*/
|
*/
|
||||||
StringRef currentElementAsString() const;
|
StringRef currentElementAsString() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if calls to `next` will eventually return false
|
||||||
|
*
|
||||||
|
* Note that for backwards compatibility this is currently defaulted
|
||||||
|
* to return `true`, but in the future all generators will have to
|
||||||
|
* provide their own implementation.
|
||||||
|
*/
|
||||||
|
virtual bool isFinite() const;
|
||||||
};
|
};
|
||||||
using GeneratorBasePtr = Catch::Detail::unique_ptr<GeneratorUntypedBase>;
|
using GeneratorBasePtr = Catch::Detail::unique_ptr<GeneratorUntypedBase>;
|
||||||
|
|
||||||
|
|||||||
@@ -169,6 +169,7 @@ Nor would this
|
|||||||
:test-result: PASS Floating point matchers: double
|
:test-result: PASS Floating point matchers: double
|
||||||
:test-result: PASS Floating point matchers: float
|
:test-result: PASS Floating point matchers: float
|
||||||
:test-result: PASS GENERATE can combine literals and generators
|
: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 -- adapters
|
||||||
:test-result: PASS Generators -- simple
|
:test-result: PASS Generators -- simple
|
||||||
:test-result: PASS Generators can be skipped forward
|
: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 Product with differing arities - std::tuple<int>
|
||||||
:test-result: PASS Random seed generation accepts known methods
|
:test-result: PASS Random seed generation accepts known methods
|
||||||
:test-result: PASS Random seed generation reports unknown 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: PASS Range type with sentinel
|
||||||
:test-result: FAIL Reconstruction should be based on stringification: #914
|
:test-result: FAIL Reconstruction should be based on stringification: #914
|
||||||
:test-result: FAIL Regex string matcher
|
:test-result: FAIL Regex string matcher
|
||||||
:test-result: PASS Registering reporter with '::' in name fails
|
:test-result: PASS Registering reporter with '::' in name fails
|
||||||
:test-result: PASS Regression test #1
|
: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 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 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
|
: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: double
|
||||||
:test-result: PASS Floating point matchers: float
|
:test-result: PASS Floating point matchers: float
|
||||||
:test-result: PASS GENERATE can combine literals and generators
|
: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 -- adapters
|
||||||
:test-result: PASS Generators -- simple
|
:test-result: PASS Generators -- simple
|
||||||
:test-result: PASS Generators can be skipped forward
|
: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 Product with differing arities - std::tuple<int>
|
||||||
:test-result: PASS Random seed generation accepts known methods
|
:test-result: PASS Random seed generation accepts known methods
|
||||||
:test-result: PASS Random seed generation reports unknown 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: PASS Range type with sentinel
|
||||||
:test-result: FAIL Reconstruction should be based on stringification: #914
|
:test-result: FAIL Reconstruction should be based on stringification: #914
|
||||||
:test-result: FAIL Regex string matcher
|
:test-result: FAIL Regex string matcher
|
||||||
:test-result: PASS Registering reporter with '::' in name fails
|
:test-result: PASS Registering reporter with '::' in name fails
|
||||||
:test-result: PASS Regression test #1
|
: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 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 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
|
: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
|
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
|
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(method)
|
RandomNumberGeneration.tests.cpp:<line number>: passed: Catch::generateRandomSeed(method)
|
||||||
RandomNumberGeneration.tests.cpp:<line number>: passed: Catch::generateRandomSeed(static_cast<Catch::GenerateFrom>(77))
|
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: "{ }" == "{ }"
|
ToString.tests.cpp:<line number>: passed: Catch::Detail::stringify(UsesSentinel{}) == "{ }" for: "{ }" == "{ }"
|
||||||
Decomposition.tests.cpp:<line number>: failed: truthy(false) for: Hey, its truthy!
|
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
|
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
|
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'"
|
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' }
|
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: !(factories.empty()) for: !false
|
||||||
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fakeTag"s) for: "All available tags:
|
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fakeTag"s) for: "All available tags:
|
||||||
1 [fakeTag]
|
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
|
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:
|
||||||
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
|
test cases: 448 | 328 passed | 96 failed | 6 skipped | 18 failed as expected
|
||||||
assertions: 2362 | 2161 passed | 158 failed | 43 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
|
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
|
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(method)
|
RandomNumberGeneration.tests.cpp:<line number>: passed: Catch::generateRandomSeed(method)
|
||||||
RandomNumberGeneration.tests.cpp:<line number>: passed: Catch::generateRandomSeed(static_cast<Catch::GenerateFrom>(77))
|
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: "{ }" == "{ }"
|
ToString.tests.cpp:<line number>: passed: Catch::Detail::stringify(UsesSentinel{}) == "{ }" for: "{ }" == "{ }"
|
||||||
Decomposition.tests.cpp:<line number>: failed: truthy(false) for: Hey, its truthy!
|
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
|
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
|
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'"
|
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' }
|
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: !(factories.empty()) for: !false
|
||||||
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fakeTag"s) for: "All available tags:
|
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fakeTag"s) for: "All available tags:
|
||||||
1 [fakeTag]
|
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
|
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:
|
||||||
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
|
test cases: 448 | 328 passed | 96 failed | 6 skipped | 18 failed as expected
|
||||||
assertions: 2362 | 2161 passed | 158 failed | 43 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?
|
Why would you throw a std::string?
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
test cases: 443 | 341 passed | 76 failed | 7 skipped | 19 failed as expected
|
test cases: 448 | 346 passed | 76 failed | 7 skipped | 19 failed as expected
|
||||||
assertions: 2340 | 2161 passed | 136 failed | 43 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:
|
with expansion:
|
||||||
0 == 0
|
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
|
Generators -- adapters
|
||||||
Filtering by predicate
|
Filtering by predicate
|
||||||
@@ -10367,6 +10452,39 @@ RandomNumberGeneration.tests.cpp:<line number>
|
|||||||
RandomNumberGeneration.tests.cpp:<line number>: PASSED:
|
RandomNumberGeneration.tests.cpp:<line number>: PASSED:
|
||||||
REQUIRE_THROWS( Catch::generateRandomSeed(static_cast<Catch::GenerateFrom>(77)) )
|
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
|
Range type with sentinel
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
@@ -10436,6 +10554,15 @@ Matchers.tests.cpp:<line number>: PASSED:
|
|||||||
with expansion:
|
with expansion:
|
||||||
{ 'a', 'b' } not UnorderedEquals: { 'c', 'b' }
|
{ '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
|
Reporter's write listings to provided stream
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
@@ -19717,6 +19844,6 @@ Misc.tests.cpp:<line number>
|
|||||||
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
|
test cases: 448 | 328 passed | 96 failed | 6 skipped | 18 failed as expected
|
||||||
assertions: 2362 | 2161 passed | 158 failed | 43 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:
|
with expansion:
|
||||||
0 == 0
|
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
|
Generators -- adapters
|
||||||
Filtering by predicate
|
Filtering by predicate
|
||||||
@@ -10365,6 +10450,39 @@ RandomNumberGeneration.tests.cpp:<line number>
|
|||||||
RandomNumberGeneration.tests.cpp:<line number>: PASSED:
|
RandomNumberGeneration.tests.cpp:<line number>: PASSED:
|
||||||
REQUIRE_THROWS( Catch::generateRandomSeed(static_cast<Catch::GenerateFrom>(77)) )
|
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
|
Range type with sentinel
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
@@ -10434,6 +10552,15 @@ Matchers.tests.cpp:<line number>: PASSED:
|
|||||||
with expansion:
|
with expansion:
|
||||||
{ 'a', 'b' } not UnorderedEquals: { 'c', 'b' }
|
{ '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
|
Reporter's write listings to provided stream
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
@@ -19706,6 +19833,6 @@ Misc.tests.cpp:<line number>
|
|||||||
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
|
test cases: 448 | 328 passed | 96 failed | 6 skipped | 18 failed as expected
|
||||||
assertions: 2362 | 2161 passed | 158 failed | 43 failed as expected
|
assertions: 2376 | 2175 passed | 158 failed | 43 failed as expected
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<testsuitesloose text artifact
|
<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>
|
<properties>
|
||||||
<property name="random-seed" value="1"/>
|
<property name="random-seed" value="1"/>
|
||||||
<property name="filters" value=""*" ~[!nonportable] ~[!benchmark] ~[approvals]"/>
|
<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/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="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="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" 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" time="{duration}" status="run"/>
|
||||||
<testcase classname="<exe-name>.global" name="Generators -- adapters/Filtering by predicate/Basic usage" 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="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 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="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="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">
|
<testcase classname="<exe-name>.global" name="Reconstruction should be based on stringification: #914" time="{duration}" status="run">
|
||||||
<failure message="truthy(false)" type="CHECK">
|
<failure message="truthy(false)" type="CHECK">
|
||||||
@@ -1380,6 +1389,7 @@ at Matchers.tests.cpp:<line number>
|
|||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="<exe-name>.global" name="Registering reporter with '::' in name fails" time="{duration}" status="run"/>
|
<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="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" 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 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"/>
|
<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"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<testsuites>
|
<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>
|
<properties>
|
||||||
<property name="random-seed" value="1"/>
|
<property name="random-seed" value="1"/>
|
||||||
<property name="filters" value=""*" ~[!nonportable] ~[!benchmark] ~[approvals]"/>
|
<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/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="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="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" 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" time="{duration}" status="run"/>
|
||||||
<testcase classname="<exe-name>.global" name="Generators -- adapters/Filtering by predicate/Basic usage" 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="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 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="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="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">
|
<testcase classname="<exe-name>.global" name="Reconstruction should be based on stringification: #914" time="{duration}" status="run">
|
||||||
<failure message="truthy(false)" type="CHECK">
|
<failure message="truthy(false)" type="CHECK">
|
||||||
@@ -1379,6 +1388,7 @@ at Matchers.tests.cpp:<line number>
|
|||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="<exe-name>.global" name="Registering reporter with '::' in name fails" time="{duration}" status="run"/>
|
<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="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" 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 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"/>
|
<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="ConcatGenerator/Iterating over multiple generators" duration="{duration}"/>
|
||||||
<testCase name="Filter generator throws exception for empty generator" duration="{duration}"/>
|
<testCase name="Filter generator throws exception for empty generator" duration="{duration}"/>
|
||||||
<testCase name="FixedValuesGenerator can be skipped forward" 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 can be skipped forward" duration="{duration}"/>
|
||||||
<testCase name="Generators internals" duration="{duration}"/>
|
<testCase name="Generators internals" duration="{duration}"/>
|
||||||
<testCase name="Generators internals/Single value" 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 over end" duration="{duration}"/>
|
||||||
<testCase name="Generators internals/Range/Negative manual step/Integer/Slightly under 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="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" 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 shorter than underlying" duration="{duration}"/>
|
||||||
<testCase name="TakeGenerator can be skipped forward/take is longer 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="ConcatGenerator/Iterating over multiple generators" duration="{duration}"/>
|
||||||
<testCase name="Filter generator throws exception for empty generator" duration="{duration}"/>
|
<testCase name="Filter generator throws exception for empty generator" duration="{duration}"/>
|
||||||
<testCase name="FixedValuesGenerator can be skipped forward" 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 can be skipped forward" duration="{duration}"/>
|
||||||
<testCase name="Generators internals" duration="{duration}"/>
|
<testCase name="Generators internals" duration="{duration}"/>
|
||||||
<testCase name="Generators internals/Single value" 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 over end" duration="{duration}"/>
|
||||||
<testCase name="Generators internals/Range/Negative manual step/Integer/Slightly under 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="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" 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 shorter than underlying" duration="{duration}"/>
|
||||||
<testCase name="TakeGenerator can be skipped forward/take is longer 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
|
ok {test-number} - i % 2 == 0 for: 0 == 0
|
||||||
# GENERATE can combine literals and generators
|
# GENERATE can combine literals and generators
|
||||||
ok {test-number} - i % 2 == 0 for: 0 == 0
|
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
|
# Generators -- adapters
|
||||||
ok {test-number} - i % 2 == 0 for: 0 == 0
|
ok {test-number} - i % 2 == 0 for: 0 == 0
|
||||||
# Generators -- adapters
|
# Generators -- adapters
|
||||||
@@ -2592,6 +2612,12 @@ ok {test-number} - Catch::generateRandomSeed(method)
|
|||||||
ok {test-number} - Catch::generateRandomSeed(method)
|
ok {test-number} - Catch::generateRandomSeed(method)
|
||||||
# Random seed generation reports unknown methods
|
# Random seed generation reports unknown methods
|
||||||
ok {test-number} - Catch::generateRandomSeed(static_cast<Catch::GenerateFrom>(77))
|
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
|
# Range type with sentinel
|
||||||
ok {test-number} - Catch::Detail::stringify(UsesSentinel{}) == "{ }" for: "{ }" == "{ }"
|
ok {test-number} - Catch::Detail::stringify(UsesSentinel{}) == "{ }" for: "{ }" == "{ }"
|
||||||
# Reconstruction should be based on stringification: #914
|
# 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'"
|
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
|
# Regression test #1
|
||||||
ok {test-number} - actual, !UnorderedEquals( expected ) for: { 'a', 'b' } not UnorderedEquals: { 'c', 'b' }
|
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
|
# Reporter's write listings to provided stream
|
||||||
ok {test-number} - !(factories.empty()) for: !false
|
ok {test-number} - !(factories.empty()) for: !false
|
||||||
# Reporter's write listings to provided stream
|
# Reporter's write listings to provided stream
|
||||||
@@ -4743,5 +4771,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0
|
|||||||
ok {test-number} -
|
ok {test-number} -
|
||||||
# xmlentitycheck
|
# xmlentitycheck
|
||||||
ok {test-number} -
|
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
|
ok {test-number} - i % 2 == 0 for: 0 == 0
|
||||||
# GENERATE can combine literals and generators
|
# GENERATE can combine literals and generators
|
||||||
ok {test-number} - i % 2 == 0 for: 0 == 0
|
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
|
# Generators -- adapters
|
||||||
ok {test-number} - i % 2 == 0 for: 0 == 0
|
ok {test-number} - i % 2 == 0 for: 0 == 0
|
||||||
# Generators -- adapters
|
# Generators -- adapters
|
||||||
@@ -2590,6 +2610,12 @@ ok {test-number} - Catch::generateRandomSeed(method)
|
|||||||
ok {test-number} - Catch::generateRandomSeed(method)
|
ok {test-number} - Catch::generateRandomSeed(method)
|
||||||
# Random seed generation reports unknown methods
|
# Random seed generation reports unknown methods
|
||||||
ok {test-number} - Catch::generateRandomSeed(static_cast<Catch::GenerateFrom>(77))
|
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
|
# Range type with sentinel
|
||||||
ok {test-number} - Catch::Detail::stringify(UsesSentinel{}) == "{ }" for: "{ }" == "{ }"
|
ok {test-number} - Catch::Detail::stringify(UsesSentinel{}) == "{ }" for: "{ }" == "{ }"
|
||||||
# Reconstruction should be based on stringification: #914
|
# 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'"
|
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
|
# Regression test #1
|
||||||
ok {test-number} - actual, !UnorderedEquals( expected ) for: { 'a', 'b' } not UnorderedEquals: { 'c', 'b' }
|
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
|
# Reporter's write listings to provided stream
|
||||||
ok {test-number} - !(factories.empty()) for: !false
|
ok {test-number} - !(factories.empty()) for: !false
|
||||||
# Reporter's write listings to provided stream
|
# Reporter's write listings to provided stream
|
||||||
@@ -4732,5 +4760,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0
|
|||||||
ok {test-number} -
|
ok {test-number} -
|
||||||
# xmlentitycheck
|
# xmlentitycheck
|
||||||
ok {test-number} -
|
ok {test-number} -
|
||||||
1..2374
|
1..2388
|
||||||
|
|
||||||
|
|||||||
@@ -417,6 +417,8 @@
|
|||||||
##teamcity[testFinished name='Floating point matchers: float' duration="{duration}"]
|
##teamcity[testFinished name='Floating point matchers: float' duration="{duration}"]
|
||||||
##teamcity[testStarted name='GENERATE can combine literals and generators']
|
##teamcity[testStarted name='GENERATE can combine literals and generators']
|
||||||
##teamcity[testFinished name='GENERATE can combine literals and generators' duration="{duration}"]
|
##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[testStarted name='Generators -- adapters']
|
||||||
##teamcity[testFinished name='Generators -- adapters' duration="{duration}"]
|
##teamcity[testFinished name='Generators -- adapters' duration="{duration}"]
|
||||||
##teamcity[testStarted name='Generators -- simple']
|
##teamcity[testStarted name='Generators -- simple']
|
||||||
@@ -571,6 +573,12 @@
|
|||||||
##teamcity[testFinished name='Random seed generation accepts known methods' duration="{duration}"]
|
##teamcity[testFinished name='Random seed generation accepts known methods' duration="{duration}"]
|
||||||
##teamcity[testStarted name='Random seed generation reports unknown methods']
|
##teamcity[testStarted name='Random seed generation reports unknown methods']
|
||||||
##teamcity[testFinished name='Random seed generation reports unknown methods' duration="{duration}"]
|
##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[testStarted name='Range type with sentinel']
|
||||||
##teamcity[testFinished name='Range type with sentinel' duration="{duration}"]
|
##teamcity[testFinished name='Range type with sentinel' duration="{duration}"]
|
||||||
##teamcity[testStarted name='Reconstruction should be based on stringification: #914']
|
##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[testFinished name='Registering reporter with |'::|' in name fails' duration="{duration}"]
|
||||||
##teamcity[testStarted name='Regression test #1']
|
##teamcity[testStarted name='Regression test #1']
|
||||||
##teamcity[testFinished name='Regression test #1' duration="{duration}"]
|
##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[testStarted name='Reporter|'s write listings to provided stream']
|
||||||
##teamcity[testFinished name='Reporter|'s write listings to provided stream' duration="{duration}"]
|
##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']
|
##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[testFinished name='Floating point matchers: float' duration="{duration}"]
|
||||||
##teamcity[testStarted name='GENERATE can combine literals and generators']
|
##teamcity[testStarted name='GENERATE can combine literals and generators']
|
||||||
##teamcity[testFinished name='GENERATE can combine literals and generators' duration="{duration}"]
|
##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[testStarted name='Generators -- adapters']
|
||||||
##teamcity[testFinished name='Generators -- adapters' duration="{duration}"]
|
##teamcity[testFinished name='Generators -- adapters' duration="{duration}"]
|
||||||
##teamcity[testStarted name='Generators -- simple']
|
##teamcity[testStarted name='Generators -- simple']
|
||||||
@@ -571,6 +573,12 @@
|
|||||||
##teamcity[testFinished name='Random seed generation accepts known methods' duration="{duration}"]
|
##teamcity[testFinished name='Random seed generation accepts known methods' duration="{duration}"]
|
||||||
##teamcity[testStarted name='Random seed generation reports unknown methods']
|
##teamcity[testStarted name='Random seed generation reports unknown methods']
|
||||||
##teamcity[testFinished name='Random seed generation reports unknown methods' duration="{duration}"]
|
##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[testStarted name='Range type with sentinel']
|
||||||
##teamcity[testFinished name='Range type with sentinel' duration="{duration}"]
|
##teamcity[testFinished name='Range type with sentinel' duration="{duration}"]
|
||||||
##teamcity[testStarted name='Reconstruction should be based on stringification: #914']
|
##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[testFinished name='Registering reporter with |'::|' in name fails' duration="{duration}"]
|
||||||
##teamcity[testStarted name='Regression test #1']
|
##teamcity[testStarted name='Regression test #1']
|
||||||
##teamcity[testFinished name='Regression test #1' duration="{duration}"]
|
##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[testStarted name='Reporter|'s write listings to provided stream']
|
||||||
##teamcity[testFinished name='Reporter|'s write listings to provided stream' duration="{duration}"]
|
##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']
|
##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>
|
</Expression>
|
||||||
<OverallResult success="true" skips="0"/>
|
<OverallResult success="true" skips="0"/>
|
||||||
</TestCase>
|
</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" >
|
<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="Filtering by predicate" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" >
|
||||||
<Section name="Basic usage" 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>
|
</Expression>
|
||||||
<OverallResult success="true" skips="0"/>
|
<OverallResult success="true" skips="0"/>
|
||||||
</TestCase>
|
</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" >
|
<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" >
|
<Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
|
||||||
<Original>
|
<Original>
|
||||||
@@ -12563,6 +12694,17 @@ Approx( 0.98999999999999999 )
|
|||||||
</Expression>
|
</Expression>
|
||||||
<OverallResult success="true" skips="0"/>
|
<OverallResult success="true" skips="0"/>
|
||||||
</TestCase>
|
</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" >
|
<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" >
|
<Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
|
||||||
<Original>
|
<Original>
|
||||||
@@ -22878,6 +23020,6 @@ Approx( -1.95996398454005449 )
|
|||||||
</Section>
|
</Section>
|
||||||
<OverallResult success="true" skips="0"/>
|
<OverallResult success="true" skips="0"/>
|
||||||
</TestCase>
|
</TestCase>
|
||||||
<OverallResults successes="2161" failures="158" expectedFailures="43" skips="12"/>
|
<OverallResults successes="2175" failures="158" expectedFailures="43" skips="12"/>
|
||||||
<OverallResultsCases successes="323" failures="96" expectedFailures="18" skips="6"/>
|
<OverallResultsCases successes="328" failures="96" expectedFailures="18" skips="6"/>
|
||||||
</Catch2TestRun>
|
</Catch2TestRun>
|
||||||
|
|||||||
@@ -6119,6 +6119,104 @@ Approx( 1.30000000000000004 )
|
|||||||
</Expression>
|
</Expression>
|
||||||
<OverallResult success="true" skips="0"/>
|
<OverallResult success="true" skips="0"/>
|
||||||
</TestCase>
|
</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" >
|
<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="Filtering by predicate" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" >
|
||||||
<Section name="Basic usage" 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>
|
</Expression>
|
||||||
<OverallResult success="true" skips="0"/>
|
<OverallResult success="true" skips="0"/>
|
||||||
</TestCase>
|
</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" >
|
<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" >
|
<Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
|
||||||
<Original>
|
<Original>
|
||||||
@@ -12563,6 +12694,17 @@ Approx( 0.98999999999999999 )
|
|||||||
</Expression>
|
</Expression>
|
||||||
<OverallResult success="true" skips="0"/>
|
<OverallResult success="true" skips="0"/>
|
||||||
</TestCase>
|
</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" >
|
<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" >
|
<Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
|
||||||
<Original>
|
<Original>
|
||||||
@@ -22877,6 +23019,6 @@ Approx( -1.95996398454005449 )
|
|||||||
</Section>
|
</Section>
|
||||||
<OverallResult success="true" skips="0"/>
|
<OverallResult success="true" skips="0"/>
|
||||||
</TestCase>
|
</TestCase>
|
||||||
<OverallResults successes="2161" failures="158" expectedFailures="43" skips="12"/>
|
<OverallResults successes="2175" failures="158" expectedFailures="43" skips="12"/>
|
||||||
<OverallResultsCases successes="323" failures="96" expectedFailures="18" skips="6"/>
|
<OverallResultsCases successes="328" failures="96" expectedFailures="18" skips="6"/>
|
||||||
</Catch2TestRun>
|
</Catch2TestRun>
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
#include <helpers/range_test_helpers.hpp>
|
#include <helpers/range_test_helpers.hpp>
|
||||||
|
|
||||||
#include <catch2/catch_approx.hpp>
|
#include <catch2/catch_approx.hpp>
|
||||||
|
#include <catch2/catch_template_test_macros.hpp>
|
||||||
#include <catch2/catch_test_macros.hpp>
|
#include <catch2/catch_test_macros.hpp>
|
||||||
#include <catch2/generators/catch_generator_exception.hpp>
|
#include <catch2/generators/catch_generator_exception.hpp>
|
||||||
#include <catch2/generators/catch_generators_adapters.hpp>
|
#include <catch2/generators/catch_generators_adapters.hpp>
|
||||||
@@ -339,6 +340,7 @@ public:
|
|||||||
bool next() override {
|
bool next() override {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
bool isFinite() const override { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
// Avoids -Wweak-vtables
|
// Avoids -Wweak-vtables
|
||||||
@@ -472,6 +474,7 @@ namespace {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
bool const& get() const override;
|
bool const& get() const override;
|
||||||
|
bool isFinite() const override { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
// Avoids -Wweak-vtables
|
// Avoids -Wweak-vtables
|
||||||
@@ -509,6 +512,7 @@ namespace {
|
|||||||
|
|
||||||
bool const& get() const override;
|
bool const& get() const override;
|
||||||
size_t stringificationCalls() const { return m_stringificationCalls; }
|
size_t stringificationCalls() const { return m_stringificationCalls; }
|
||||||
|
bool isFinite() const override { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
// Avoids -Wweak-vtables
|
// Avoids -Wweak-vtables
|
||||||
@@ -618,6 +622,8 @@ namespace {
|
|||||||
++m_idx;
|
++m_idx;
|
||||||
return m_idx < m_elements.size();
|
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_THROWS( map_generator.skipToNthElement( 7 ) );
|
||||||
REQUIRE( map_calls == map_calls_2 + 1 );
|
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 next() -> bool override { return false; }
|
||||||
|
auto isFinite() const -> bool override { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
static auto make_test_generator()
|
static auto make_test_generator()
|
||||||
|
|||||||
@@ -83,6 +83,8 @@ namespace {
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto next() -> bool override { return false; }
|
auto next() -> bool override { return false; }
|
||||||
|
|
||||||
|
auto isFinite() const -> bool override { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
static auto make_test_skip_generator()
|
static auto make_test_skip_generator()
|
||||||
|
|||||||
Reference in New Issue
Block a user