ContainerOf is a domain that generates random containers filled with elements from an inner domain
更多...
#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
- 模板参数
-
| 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
定义 arbitrary.h:42
InRange is a domain that generates random values within a specified range
定义 in_range.h:31
std::enable_if< detail::is_associative_container< T >::value, AssociativeContainerOf< T, Inner > >::type ContainerOf(Inner &&inner)
定义 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 |
该结构体的文档由以下文件生成: