Experimental support for compiling schemas to test.check generators.
Experimental support for compiling schemas to test.check generators.
(fmap f)Helper wrapper that maps f over all values.
Helper wrapper that maps f over all values.
(generate & generator-args)(generate & rest7169)Inputs: [& generator-args] Returns: s/Any
Sample a single element of low to moderate size.
Inputs: [& generator-args] Returns: s/Any Sample a single element of low to moderate size.
(generator schema)(generator schema leaf-generators)(generator schema leaf-generators wrappers)(generator G__7143)(generator G__7147 G__7148)(generator G__7152 G__7153 G__7154)Inputs: ([schema] [schema leaf-generators] [schema :- Schema leaf-generators :- LeafGenerators wrappers :- GeneratorWrappers]) Returns: Generator
Produce a test.check generator for schema.
leaf-generators must return generators for all leaf schemas, and can also return generators for non-leaf schemas to override default generation logic.
constraints is an optional mapping from schema to wrappers for the default generators, which can impose constraints, fix certain values, etc.
Inputs: ([schema] [schema leaf-generators] [schema :- Schema leaf-generators :- LeafGenerators wrappers :- GeneratorWrappers]) Returns: Generator Produce a test.check generator for schema. leaf-generators must return generators for all leaf schemas, and can also return generators for non-leaf schemas to override default generation logic. constraints is an optional mapping from schema to wrappers for the default generators, which can impose constraints, fix certain values, etc.
A mapping from schemas to wrappers that should be used around the default generators.
A mapping from schemas to wrappers that should be used around the default generators.
A mapping from schemas to generating functions that should be used.
A mapping from schemas to generating functions that should be used.
(merged m)Helper wrapper that merges some keys into a schema
Helper wrapper that merges some keys into a schema
(sample k & generator-args)(sample G__7161 & rest7162)Inputs: [k & generator-args] Returns: [s/Any]
Sample k elements from generator.
Inputs: [k & generator-args] Returns: [s/Any] Sample k elements from generator.
(such-that f)Helper wrapper that filters to values that match predicate.
Helper wrapper that filters to values that match predicate.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |