6#include "../namespaces.h"
7#include "../utilities/semantics/move_into_vector.h"
8#include "combinators/oneof_generator.h"
10#include <catch/catch.hpp>
22 char16_t lower_bound =
std::numeric_limits<
char16_t>::min(),
23 char16_t upper_bound =
std::numeric_limits<
char16_t>::max()
24 ) : random_engine{
std::random_device{}()},
27 assert(lower_bound <= upper_bound);
31 QChar const&
get()
const override {
return current_character; }
34 current_character = QChar(
static_cast<
char16_t>(distribution(random_engine)));
40 QChar current_character;
42 std::mt19937 random_engine;
43 std::uniform_int_distribution<
unsigned int> distribution;
50
51
52
53
54
55
57 return Catch::Generators::GeneratorWrapper<QChar>(std::unique_ptr<Catch::Generators::IGenerator<QChar>>(
new QDOC_CATCH_GENERATORS_PRIVATE_NAMESPACE::QCharGenerator(lower_bound, upper_bound)));
68 struct sizeof_alphabet;
76 template<>
struct sizeof_alphabet<
Alphabets::ascii_alpha> {
static constexpr std::size_t
value{sizeof_alphabet_v<Alphabets::ascii_lowercase> + sizeof_alphabet_v<Alphabets::ascii_uppercase>}; };
99 return uniformly_valued_oneof(
QDOC_CATCH_GENERATORS_UTILITIES_ABSOLUTE_NAMESPACE::move_into_vector(ascii_alpha(), digit()), std::vector{traits::sizeof_alphabet_v<traits::Alphabets::ascii_alpha> , traits::sizeof_alphabet_v<traits::Alphabets::digit>});
104 std::vector{traits::sizeof_alphabet_v<traits::Alphabets::ascii_alphanumeric>, std::size_t{1}, std::size_t{1}, std::size_t{1}});
QCharGenerator(char16_t lower_bound=std::numeric_limits< char16_t >::min(), char16_t upper_bound=std::numeric_limits< char16_t >::max())
QChar const & get() const override
constexpr std::size_t sizeof_alphabet_v
@ portable_posix_filename
Catch::Generators::GeneratorWrapper< QChar > digit()
Catch::Generators::GeneratorWrapper< QChar > portable_posix_filename()
Catch::Generators::GeneratorWrapper< QChar > ascii_alpha()
Catch::Generators::GeneratorWrapper< QChar > ascii_lowercase()
Catch::Generators::GeneratorWrapper< QChar > ascii_uppercase()
Catch::Generators::GeneratorWrapper< QChar > ascii_alphanumeric()
Catch::Generators::GeneratorWrapper< QChar > character(char16_t lower_bound=std::numeric_limits< char16_t >::min(), char16_t upper_bound=std::numeric_limits< char16_t >::max())
Returns a generator of that generates elements of QChar whose ucs value is in the range [lower_bound,...
#define QDOC_CATCH_GENERATORS_PRIVATE_NAMESPACE
#define QDOC_CATCH_GENERATORS_UTILITIES_ABSOLUTE_NAMESPACE
#define QDOC_CATCH_GENERATORS_QCHAR_ALPHABETS_NAMESPACE
#define QDOC_CATCH_GENERATORS_TRAITS_NAMESPACE
#define QDOC_CATCH_GENERATORS_ROOT_NAMESPACE
static constexpr std::size_t value
static constexpr std::size_t value
static constexpr std::size_t value
static constexpr std::size_t value
static constexpr std::size_t value