Generators for test.check.
Convex Lisp types and constructs expressed as Clojure data structures.
Useful for quickly writing sophisticated generative tests with the convex.clj
namespace.
Generators for [test.check](https://github.com/clojure/test.check). Convex Lisp types and constructs expressed as Clojure data structures. Useful for quickly writing sophisticated generative tests with the [[convex.clj]] namespace.
(any-but exclusion-set)
Any type but from the given exclusion-set
.
Any type but from the given `exclusion-set`.
(binding+ n-min n-max)
(binding+ n-min n-max gen-value)
Vector of [ [[symbol]] [[any]] ]
where symbols are garanteed to be unique.
Useful for generating let
-like bindings.
Vector of `[ [[symbol]] [[any]] ]` where symbols are garanteed to be unique. Useful for generating `let`-like bindings.
Like blob
but fixed size representing 32 bytes.
Like [[blob]] but fixed size representing 32 bytes.
Like blob
but fixed size representing 8 bytes.
Compatible with addresses.
Like [[blob]] but fixed size representing 8 bytes. Compatible with addresses.
(call gen-sym gen-arg+)
Random call to a (~sym ~@arg+)
form.
Random call to a `(~sym ~@arg+)` form.
Any double, including +/- Infinity and NaN.
Any double, including +/- Infinity and NaN.
Any valid character for hexadecimal notation, from �
to .
Any valid character for hexadecimal notation, from ` ` to ` `.
A valid hex-string where each byte is written as two hex-digit
.
A valid hex-string where each byte is written as two [[hex-digit]].
Like hex-string
but fixed size representing 32 bytes.
Like [[hex-string]] but fixed size representing 32 bytes.
Like hex-string
but fixed size representing 8 bytes.
Compatible with addresses.
Like [[hex-string]] but fixed size representing 8 bytes. Compatible with addresses.
(kv+ gen-k gen-v)
Vector of [Key Value]
.
Ensures that all the keys are distinct which might matter in test situations.
Vector of `[Key Value]`. Ensures that all the keys are distinct which might matter in test situations.
(mix-one-in gen-one gen-coll)
Ensures that an item from gen-one
is present and shuffled in the sequential collection produced by gen-coll
.
Ensures that an item from `gen-one` is present and shuffled in the sequential collection produced by `gen-coll`.
(number-bounded option+)
Like number
but accept a map with :min
and :max
for setting boundaries.
Both are optional.
Like [[number]] but accept a map with `:min` and `:max` for setting boundaries. Both are optional.
(outlier set-gen-good)
(outlier gen-good gen-wrong)
Produces a vector of items where each item is either a good item or anything else.
Ensures that at least one wrong item is produced.
Both kind can be given explicitly or a set of good generators can be given from which a "bad" generator can be deduced.
Useful for testing in order to produce inputs that are always faulty (at least partly).
Produces a vector of items where each item is either a good item or anything else. Ensures that at least one wrong item is produced. Both kind can be given explicitly or a set of good generators can be given from which a "bad" generator can be deduced. Useful for testing in order to produce inputs that are always faulty (at least partly).
(quoted gen)
Quotes the value produced by gen
such as (quote x)
.
Quotes the value produced by `gen` such as `(quote x)`.
Base generators for recursive Convex types where an item of a collection can be a collection as well.
Leaves are scalar
while containes can be lists, maps, sets, and vectors.
Produces a scalar in roughly 10% of outputs.
Base generators for recursive Convex types where an item of a collection can be a collection as well. Leaves are [[scalar]] while containes can be lists, maps, sets, and vectors. Produces a scalar in roughly 10% of outputs.
Like string
but can be used for building keywords and symbols.
Size is between 1 and 64 characters and the first character is compatible with symbolic types.
Like [[string]] but can be used for building keywords and symbols. Size is between 1 and 64 characters and the first character is compatible with symbolic types.
Like symbol
but the output is quoted.
Like [[symbol]] but the output is quoted.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close