ContainerOf is a domain that generates random containers filled with elements from an inner domain.
More...
#include <container_of.h>
|
| void | validate () const |
| unsigned | randomSize (Rng &rng) const |
| template<class Inner, class Corpus> |
| void | mutate (Rng &rng, Corpus &v, bool only_shrink, const Inner &inner) const |
ContainerOf is a domain that generates random containers filled with elements from an inner domain.
- Template Parameters
-
| T | The container type to generate (e.g. vector, list, set) |
| InnerDomain | The domain type used to generate the container elements |
This domain allows generating containers where each element is generated by an inner domain. It supports configuring the size constraints of the generated containers.
Example:
domain.WithMinSize(5);
domain.WithMaxSize(10);
domain.WithSize(7);
Arbitrary is a domain that generates random values of a given type.
Definition arbitrary.h:42
InRange is a domain that generates random values within a specified range.
Definition in_range.h:31
std::enable_if< detail::is_associative_container< T >::value, AssociativeContainerOf< T, Inner > >::type ContainerOf(Inner &&inner)
Definition container_of.h:174
◆ checkedSize()
| int zeroerr::ContainerOfBase::checkedSize |
( |
unsigned | value | ) |
|
|
inlinestaticprotected |
◆ mutate()
template<class Inner, class Corpus>
| void zeroerr::ContainerOfBase::mutate |
( |
Rng & | rng, |
|
|
Corpus & | v, |
|
|
bool | only_shrink, |
|
|
const Inner & | inner ) const |
|
inlineprotected |
◆ randomSize()
| unsigned zeroerr::ContainerOfBase::randomSize |
( |
Rng & | rng | ) |
const |
|
inlineprotected |
◆ validate()
| void zeroerr::ContainerOfBase::validate |
( |
| ) |
const |
|
inlineprotected |
◆ WithMaxSize()
| void zeroerr::ContainerOfBase::WithMaxSize |
( |
unsigned | value | ) |
|
|
inline |
◆ WithMinSize()
| void zeroerr::ContainerOfBase::WithMinSize |
( |
unsigned | value | ) |
|
|
inline |
◆ WithSize()
| void zeroerr::ContainerOfBase::WithSize |
( |
unsigned | value | ) |
|
|
inline |
◆ max_size
| int zeroerr::ContainerOfBase::max_size = 100 |
◆ min_size
| int zeroerr::ContainerOfBase::min_size = 0 |
◆ size
| int zeroerr::ContainerOfBase::size = -1 |
The documentation for this struct was generated from the following file: