Liking cljdoc? Tell your friends :D

schema-generators.generators

Experimental support for compiling schemas to test.check generators.

Experimental support for compiling schemas to test.check generators.
raw docstring

+primitive-generators+clj/s

source

+simple-leaf-generators+clj/s

source

alwaysclj/s

(always x)
source

CompositeGeneratorclj/s≠protocol

composite-generatorclj/s

(composite-generator s params)
source

default-leaf-generatorsclj/s

(default-leaf-generators leaf-generators)
source

element-generatorclj/s

(element-generator e params)
source

elements-generatorclj/s

(elements-generator elts params)
source

enum-generatorsclj/s

(enum-generators s)
source

eq-generatorsclj/s

(eq-generators s)
source

fmapclj/s

(fmap f)

Helper wrapper that maps f over all values.

Helper wrapper that maps f over all values.
sourceraw docstring

g-apply-byclj/s

(g-apply-by f args)
source

g-byclj/s

(g-by f & args)
source

generateclj/s≠

clj
(generate & generator-args)
cljs
(generate & rest5227)

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.
sourceraw docstring

Generatorclj/s

A test.check generator

A test.check generator
sourceraw docstring

generatorclj/s≠

clj
(generator schema)
(generator schema leaf-generators)
(generator schema leaf-generators wrappers)
cljs
(generator G__5201)
(generator G__5205 G__5206)
(generator G__5210 G__5211 G__5212)

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.
sourceraw docstring

GeneratorWrappersclj/s

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.
sourceraw docstring

LeafGeneratorsclj/s

A mapping from schemas to generating functions that should be used.

A mapping from schemas to generating functions that should be used.
sourceraw docstring

mergedclj/s

(merged m)

Helper wrapper that merges some keys into a schema

Helper wrapper that merges some keys into a schema
sourceraw docstring

sampleclj/s≠

clj
(sample k & generator-args)
cljs
(sample G__5219 & rest5220)

Inputs: [k & generator-args] Returns: [s/Any]

Sample k elements from generator.

Inputs: [k & generator-args]
Returns: [s/Any]

Sample k elements from generator.
sourceraw docstring

Schemaclj/s

A Schema for Schemas

A Schema for Schemas
sourceraw docstring

such-thatclj/s

(such-that f)

Helper wrapper that filters to values that match predicate.

Helper wrapper that filters to values that match predicate.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close