mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 21:36:11 +01:00
Make rest of the generators final
This commit is contained in:
parent
e1a0cce82b
commit
b5a287f09f
@ -14,7 +14,7 @@ namespace Catch {
|
|||||||
namespace Generators {
|
namespace Generators {
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
class TakeGenerator : public IGenerator<T> {
|
class TakeGenerator final : public IGenerator<T> {
|
||||||
GeneratorWrapper<T> m_generator;
|
GeneratorWrapper<T> m_generator;
|
||||||
size_t m_returned = 0;
|
size_t m_returned = 0;
|
||||||
size_t m_target;
|
size_t m_target;
|
||||||
@ -51,7 +51,7 @@ namespace Generators {
|
|||||||
|
|
||||||
|
|
||||||
template <typename T, typename Predicate>
|
template <typename T, typename Predicate>
|
||||||
class FilterGenerator : public IGenerator<T> {
|
class FilterGenerator final : public IGenerator<T> {
|
||||||
GeneratorWrapper<T> m_generator;
|
GeneratorWrapper<T> m_generator;
|
||||||
Predicate m_predicate;
|
Predicate m_predicate;
|
||||||
public:
|
public:
|
||||||
@ -91,7 +91,7 @@ namespace Generators {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
class RepeatGenerator : public IGenerator<T> {
|
class RepeatGenerator final : public IGenerator<T> {
|
||||||
static_assert(!std::is_same<T, bool>::value,
|
static_assert(!std::is_same<T, bool>::value,
|
||||||
"RepeatGenerator currently does not support bools"
|
"RepeatGenerator currently does not support bools"
|
||||||
"because of std::vector<bool> specialization");
|
"because of std::vector<bool> specialization");
|
||||||
@ -147,7 +147,7 @@ namespace Generators {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, typename U, typename Func>
|
template <typename T, typename U, typename Func>
|
||||||
class MapGenerator : public IGenerator<T> {
|
class MapGenerator final : public IGenerator<T> {
|
||||||
// TBD: provide static assert for mapping function, for friendly error message
|
// TBD: provide static assert for mapping function, for friendly error message
|
||||||
GeneratorWrapper<U> m_generator;
|
GeneratorWrapper<U> m_generator;
|
||||||
Func m_function;
|
Func m_function;
|
||||||
|
Loading…
Reference in New Issue
Block a user