16 template <
typename T,
typename =
void>
35 typename std::enable_if<std::is_integral<T>::value && !std::numeric_limits<T>::is_signed,
46 v =
static_cast<T
>(rng.
bounded(100));
52 typename std::enable_if<std::is_integral<T>::value && std::numeric_limits<T>::is_signed,
64 v =
static_cast<T
>(rng.
bounded(100));
70 using is_float_point =
typename std::enable_if<std::is_floating_point<T>::value,
void>::type;
78 return static_cast<T
>(rng.
bounded(1000));
82 v =
static_cast<T
>(rng.
bounded(1000));
89 typename std::enable_if<detail::is_specialization<T, std::basic_string>::value>::type;
107 impl.Mutate(rng, v, only_shrink);
112 template <
typename T>
114 typename std::enable_if<!detail::is_specialization<T, std::basic_string>::value,
117 T().begin(), T().end(), T().size(),
122 T().insert(T().end(), std::declval<typename T::value_type>()),
123 T().erase(T().begin()),
126 template <
typename T>
135 template <
typename T,
typename U>
138 std::pair<typename std::remove_const<T>::type, typename std::remove_const<U>::type>> {};
141 template <
typename... T>
143 :
public AggregateOf<std::tuple<typename std::remove_const<T>::type...>> {};
145 template <
typename T>
Definition: aggregate_of.h:17
T ValueType
Definition: arbitrary.h:74
T CorpusType
Definition: arbitrary.h:75
CorpusType GetRandomCorpus(Rng &rng) const override
Definition: arbitrary.h:77
void Mutate(Rng &rng, CorpusType &v, bool only_shrink) const override
Definition: arbitrary.h:81
Arbitrary()
Definition: arbitrary.h:130
T ValueType
Definition: arbitrary.h:58
T CorpusType
Definition: arbitrary.h:59
CorpusType GetRandomCorpus(Rng &rng) const override
Definition: arbitrary.h:61
void Mutate(Rng &rng, CorpusType &v, bool only_shrink) const override
Definition: arbitrary.h:63
void Mutate(Rng &rng, CorpusType &v, bool only_shrink) const override
Definition: arbitrary.h:106
CorpusType FromValue(const ValueType &v) const override
Definition: arbitrary.h:100
ValueType GetValue(const CorpusType &v) const override
Definition: arbitrary.h:99
T ValueType
Definition: arbitrary.h:96
std::vector< typename T::value_type > CorpusType
Definition: arbitrary.h:97
CorpusType GetRandomCorpus(Rng &rng) const override
Definition: arbitrary.h:104
void Mutate(Rng &rng, CorpusType &v, bool only_shrink) const override
Definition: arbitrary.h:45
CorpusType GetRandomCorpus(Rng &rng) const override
Definition: arbitrary.h:43
T ValueType
Definition: arbitrary.h:40
T CorpusType
Definition: arbitrary.h:41
bool ValueType
Definition: arbitrary.h:24
void Mutate(Rng &, CorpusType &v, bool) const override
Definition: arbitrary.h:29
CorpusType GetRandomCorpus(Rng &rng) const override
Definition: arbitrary.h:27
bool CorpusType
Definition: arbitrary.h:25
Definition: arbitrary.h:17
Domain class for generating random values of a specific type.
Definition: domain.h:22
uint32_t bounded(uint32_t range) noexcept
Definition: rng.h:126
Definition: container_of.h:74
#define ZEROERR_SUPPRESS_COMMON_WARNINGS_POP
Definition: config.h:265
#define ZEROERR_SUPPRESS_COMMON_WARNINGS_PUSH
Definition: config.h:218
Definition: benchmark.cpp:17
typename std::enable_if< std::is_integral< T >::value &&!std::numeric_limits< T >::is_signed, void >::type is_unsigned_int
Definition: arbitrary.h:36
typename std::enable_if< std::is_integral< T >::value &&std::numeric_limits< T >::is_signed, void >::type is_signed_int
Definition: arbitrary.h:53
typename std::enable_if< detail::is_specialization< T, std::basic_string >::value >::type is_string
Definition: arbitrary.h:89
typename std::enable_if< std::is_floating_point< T >::value, void >::type is_float_point
Definition: arbitrary.h:70
typename std::enable_if<!detail::is_specialization< T, std::basic_string >::value, decltype(T().begin(), T().end(), T().size(), T().insert(T().end(), std::declval< typename T::value_type >()), T().erase(T().begin()),(void) 0)>::type is_modifable
Definition: arbitrary.h:125
Definition: typetraits.h:42