package base_quickcheck
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Randomized testing framework, designed for compatibility with Base
Install
dune-project
Dependency
Authors
Maintainers
Sources
base_quickcheck-v0.15.0.tar.gz
sha256=360e6b8f3660398936ec88fecb9e7761370ee63acf8372d3208d4d31c00181f2
doc/base_quickcheck/Base_quickcheck/Shrinker/index.html
Module Base_quickcheck.ShrinkerSource
Shrinkers produce small values from large values. When a random test case fails, a shrinker finds the simplest version of the problem.
Basic Shrinkers
This shrinker treats a type as atomic, never attempting to produce smaller values.
This helper module type exists separately just to open Bigarray in its scope.
Source
val bigstring :
(Base.char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t
tSource
val float32_vec :
(Base.float, Bigarray.float32_elt, Bigarray.fortran_layout) Bigarray.Array1.t
tSource
val float64_vec :
(Base.float, Bigarray.float64_elt, Bigarray.fortran_layout) Bigarray.Array1.t
tSource
val float32_mat :
(Base.float, Bigarray.float32_elt, Bigarray.fortran_layout) Bigarray.Array2.t
tSource
val float64_mat :
(Base.float, Bigarray.float64_elt, Bigarray.fortran_layout) Bigarray.Array2.t
tSource
val map_tree_using_comparator :
comparator:('key, 'cmp) Base.Comparator.t ->
'key t ->
'data t ->
('key, 'data, 'cmp) Base.Map.Using_comparator.Tree.t tSource
val set_tree_using_comparator :
comparator:('elt, 'cmp) Base.Comparator.t ->
'elt t ->
('elt, 'cmp) Base.Set.Using_comparator.Tree.t tModifying Shrinkers
Filters and maps according to f, and provides input to t via f_inverse. Only the f direction produces options, intentionally.
Shrinkers for Recursive Types
Ties the recursive knot to shrink recursive types.
For example, here is an shrinker for binary trees:
let tree_shrinker leaf_shrinker =
fixed_point (fun self ->
either leaf_shrinker (both self self)
|> map
~f:(function
| First leaf -> `Leaf leaf
| Second (l, r) -> `Node (l, r))
~f_inverse:(function
| `Leaf leaf -> First leaf
| `Node (l, r) -> Second (l, r)))Creates a t that forces the lazy argument as necessary. Can be used to tie (mutually) recursive knots.
Low-level functions
Most users will not need to call these.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page