Liking cljdoc? Tell your friends :D
Clojure only.

active.quickcheck

A QuickCheck clone for Clojure.

A QuickCheck clone for Clojure.
raw docstring

==>cljmacro

(==> ?bool ?prop)

Create a property that only has to hold when its prerequisite holds.

Create a property that only has to hold when its prerequisite holds.
raw docstring

and->arbitraryclj

(and->arbitrary a & args)

arbitrarycljmacro

(arbitrary form)

Convenient syntax for constructing arbitraries.

This is usually used implicitly via the property macro.

The argument form can be one of the following:

  • boolean, integer, byte, short, int, long, unsigned byte, unsigned-short, unsigned-int, unsigned-long natural, rational, float, char, ascii-char, printable-ascii-char, string, ascii-string, printable-ascii-string, byte-array, symbol, keyword
  • (one-of <equality> <expr> ...)
  • (tuple <arb> ...)
  • (list <arb>)
  • (vector <arb>)
  • (set <arb>)
  • (record <constructor> [<accessor> <arb> ...])
  • (mixed <pred> <arb> <pred> <arb> ...)
  • (map <arb1> <arb2>) ; map with keys from <arb1>, values from <arb2>
  • ~<expr>, which evaluates <expr> as a regular expression

The syntax is extensible via the expand-arbitrary multimethod.

Convenient syntax for constructing arbitraries.

This is usually used implicitly via the property macro.

The argument form can be one of the following:

- boolean, integer, byte, short, int, long, 
  unsigned byte, unsigned-short, unsigned-int, unsigned-long
  natural, rational, float, char, ascii-char,
  printable-ascii-char, string, ascii-string, printable-ascii-string,
  byte-array, symbol, keyword
- (one-of <equality> <expr> ...)
- (tuple <arb> ...)
- (list <arb>)
- (vector <arb>)
- (set <arb>)
- (record <constructor> [<accessor> <arb> ...])
- (mixed <pred> <arb> <pred> <arb> ...)
- (map <arb1> <arb2>) ; map with keys from <arb1>, values from <arb2>
- ~<expr>, which evaluates <expr> as a regular expression

The syntax is extensible via the expand-arbitrary multimethod.
raw docstring

arbitrary-ascii-charclj

Arbitrary ASCII character.

Arbitrary ASCII character.
raw docstring

arbitrary-ascii-letterclj

Arbitrary ASCII letter.

Arbitrary ASCII letter.
raw docstring

arbitrary-ascii-stringclj

Arbitrary string of ASCII characters.

Arbitrary string of ASCII characters.
raw docstring

arbitrary-booleanclj

Arbitrary boolean.

Arbitrary boolean.
raw docstring

arbitrary-byteclj

Arbitrary byte.

Arbitrary byte.
raw docstring

arbitrary-byte-arrayclj

Arbitrary byte-array.

Arbitrary byte-array.
raw docstring

arbitrary-charclj

Arbitrary char.

Arbitrary char.
raw docstring

arbitrary-coll-ofclj

(arbitrary-coll-of arbitrary-el & kwargs)

Arbitrary collection mimicking Clojure spec's coll-of

Arbitrary collection mimicking Clojure spec's coll-of
raw docstring

arbitrary-floatclj

Arbitrary float.

Arbitrary float.
raw docstring

arbitrary-functionclj

(arbitrary-function arbitrary-result & arbitrary-args)

Arbitrary function.

Arbitrary function.
raw docstring

arbitrary-generatorclj

(arbitrary-generator Arbitrary-type)

Access generator field from a [[Arbitrary-type]] record. See active.quickcheck/make-arbitrary.

Access `generator` field from a [[Arbitrary-type]] record. See [[active.quickcheck/make-arbitrary]].
raw docstring

arbitrary-intclj

Arbitrary int.

Arbitrary int.
raw docstring

arbitrary-integerclj

Arbitrary integer.

Arbitrary integer.
raw docstring

arbitrary-integer-from-toclj

(arbitrary-integer-from-to from to)

Arbitrary integer from range.

Arbitrary integer from range.
raw docstring

arbitrary-keywordclj

Arbitrary keyword.

Arbitrary keyword.
raw docstring

arbitrary-listclj

(arbitrary-list arbitrary-el)

Arbitrary list.

Arbitrary list.
raw docstring

arbitrary-longclj

Arbitrary long.

Arbitrary long.
raw docstring

arbitrary-mapclj

(arbitrary-map arbitrary-key arbitrary-value)

Arbitrary map over the given arbitrary key and value.

Arbitrary map over the given arbitrary key and value.
raw docstring

arbitrary-mixedclj

(arbitrary-mixed pred+arbitrary-promise-list)

Arbitrary value from one of a list of (promises of) arbitraries.

Arbitrary value from one of a list of (promises of) arbitraries.
raw docstring

arbitrary-naturalclj

Arbitrary natural number.

Arbitrary natural number.
raw docstring

arbitrary-one-ofclj

(arbitrary-one-of eql? & vals)

Arbitrary value from a list of values, and equality predicate.

Arbitrary value from a list of values, and equality predicate.
raw docstring

arbitrary-printable-ascii-charclj

Arbitrary printable ASCII character.

Arbitrary printable ASCII character.
raw docstring

arbitrary-printable-ascii-stringclj

Arbitrary string of printable ASCII characters.

Arbitrary string of printable ASCII characters.
raw docstring

arbitrary-rationalclj

Arbitrary rational number.

Arbitrary rational number.
raw docstring

arbitrary-recordclj

(arbitrary-record construct accessors & arbitrary-els)

Arbitrary record.

Arbitrary record.
raw docstring

arbitrary-sequence-likeclj

(arbitrary-sequence-like choose-sequence sequence->list arbitrary-el)

Arbitrary sequence-like container.

Arbitrary sequence-like container.
raw docstring

arbitrary-setclj

(arbitrary-set arbitrary-el)

Arbitrary set.

Arbitrary set.
raw docstring

arbitrary-shortclj

Arbitrary short.

Arbitrary short.
raw docstring

arbitrary-stringclj

Arbitrary string.

Arbitrary string.
raw docstring

arbitrary-symbolclj

Arbitrary symbol.

Arbitrary symbol.
raw docstring

arbitrary-transformerclj

(arbitrary-transformer Arbitrary-type)

Access transformer field from a [[Arbitrary-type]] record. See active.quickcheck/make-arbitrary.

Access `transformer` field from a [[Arbitrary-type]] record. See [[active.quickcheck/make-arbitrary]].
raw docstring

arbitrary-tupleclj

(arbitrary-tuple & arbitrary-els)

Arbitrary fixed-size vector.

Arbitrary fixed-size vector.
raw docstring

arbitrary-unsigned-byteclj

Arbitrary unsigned byte.

Arbitrary unsigned byte.
raw docstring

arbitrary-unsigned-intclj

Arbitrary unsigned int.

Arbitrary unsigned int.
raw docstring

arbitrary-unsigned-longclj

Arbitrary unsigned long.

Arbitrary unsigned long.
raw docstring

arbitrary-unsigned-shortclj

Arbitrary unsigned short.

Arbitrary unsigned short.
raw docstring

arbitrary-vectorclj

(arbitrary-vector arbitrary-el)

Arbitrary vector.

Arbitrary vector.
raw docstring

arbitrary?clj

(arbitrary? thing)

Is object a Arbitrary-type record? See active.quickcheck/make-arbitrary.

Is object a `Arbitrary-type` record? See [[active.quickcheck/make-arbitrary]].
raw docstring

checkclj

(check config prop)

Run a property against a configuration and report results.

Run a property against a configuration and report results.
raw docstring

check-result-arguments-listclj

(check-result-arguments-list Check-result-type)

Access arguments-list field from a [[Check-result-type]] record. See active.quickcheck/make-check-result.

Access `arguments-list` field from a [[Check-result-type]] record. See [[active.quickcheck/make-check-result]].
raw docstring

check-result-okclj

(check-result-ok Check-result-type)

Access ok field from a [[Check-result-type]] record. See active.quickcheck/make-check-result.

Access `ok` field from a [[Check-result-type]] record. See [[active.quickcheck/make-check-result]].
raw docstring

check-result-stampclj

(check-result-stamp Check-result-type)

Access stamp field from a [[Check-result-type]] record. See active.quickcheck/make-check-result.

Access `stamp` field from a [[Check-result-type]] record. See [[active.quickcheck/make-check-result]].
raw docstring

check-result?clj

(check-result? thing)

Is object a Check-result-type record? See active.quickcheck/make-check-result.

Is object a `Check-result-type` record? See [[active.quickcheck/make-check-result]].
raw docstring

check-resultsclj

(check-results config prop)

Run a property against a configuration and return results.

Run a property against a configuration and return results.
raw docstring

choose-alphanumeric-charclj


choose-ascii-charclj

Generator for ASCII characters.

Generator for ASCII characters.
raw docstring

choose-ascii-letterclj

Generator for ASCII alphabetic letters.

Generator for ASCII alphabetic letters.
raw docstring

choose-byteclj

Generator for bytes in [-128, 127].

Generator for bytes in [-128, 127].
raw docstring

choose-byte-arrayclj

(choose-byte-array n)

Generator for a byte array with size n.

Generator for a byte array with size n.
raw docstring

choose-charclj

(choose-char lower upper)

Generator for chars within a range, bonds are inclusive.

Generator for chars within a range, bonds are inclusive.
raw docstring

choose-floatclj

(choose-float lower upper)

Generator for floats within a range, bounds are inclusive.

Generator for floats within a range, bounds are inclusive.
raw docstring

choose-intclj

Generator for ints in [-2147483648, 2147483647].

Generator for ints in [-2147483648, 2147483647].
raw docstring

choose-integerclj

(choose-integer lower upper)

Generator for integers within a range, bounds are inclusive.

Generator for integers within a range, bounds are inclusive.
raw docstring

choose-keywordclj

(choose-keyword n)

Generator for a keyword with size n+1.

Generator for a keyword with size n+1.
raw docstring

choose-listclj

(choose-list el-gen n)

Generator for a list of values with size n.

Generator for a list of values with size n.
raw docstring

choose-longclj

Generator for longs in [-9223372036854775808, 9223372036854775807].

Generator for longs in [-9223372036854775808, 9223372036854775807].
raw docstring

choose-mapclj

(choose-map el-gen n)

Generator for a map with size n. The passed element generator must generate key-value pairs.

Generator for a map with size n. The passed element generator must
generate key-value pairs.
raw docstring

choose-mixedclj

(choose-mixed gens)

Generator that chooses from a sequence of generators.

Generator that chooses from a sequence of generators.
raw docstring

choose-non-numeric-charclj


choose-one-ofclj

(choose-one-of lis)

Make a generator that yields one of a list of values.

Make a generator that yields one of a list of values.
raw docstring

choose-printable-ascii-charclj

Generator for printable ASCII characters.

Generator for printable ASCII characters.
raw docstring

choose-setclj

(choose-set el-gen n)

Generator for a set with size <= n

Generator for a set with size <= n
raw docstring

choose-shortclj

Generator for shorts in [-32768, 32767].

Generator for shorts in [-32768, 32767].
raw docstring

choose-stringclj

(choose-string char-gen n)

Generator for a string with size n.

Generator for a string with size n.
raw docstring

choose-symbolclj

(choose-symbol n)

Generator for a symbol with size n+1.

Generator for a symbol with size n+1.
raw docstring

choose-unsigned-byteclj

Generator for bytes in [0, 255].

Generator for bytes in [0, 255].
raw docstring

choose-unsigned-intclj

Generator for bytes in [0, 4294967295].

Generator for bytes in [0, 4294967295].
raw docstring

choose-unsigned-longclj

Generator for bytes in [0, 18446744073709551615].

Generator for bytes in [0, 18446744073709551615].
raw docstring

choose-unsigned-shortclj

Generator for bytes in [0, 65535].

Generator for bytes in [0, 65535].
raw docstring

choose-vectorclj

(choose-vector el-gen n)

Generator for a vector with size n.

Generator for a vector with size n.
raw docstring

choose-with-frequenciesclj

(choose-with-frequencies lis)

Generator that chooses from a sequence of (frequency generator) pairs.

Generator that chooses from a sequence of (frequency generator) pairs.
raw docstring

classifycljmacro

(classify ?really? ?str ?testable)

Classify some test cases of a testable.

Classify some test cases of a testable.
raw docstring

coarbitraryclj

(coarbitrary arb val gen)

coerce->generatorclj

(coerce->generator thing)

Coerce an object to a generator.

Coerce an object to a generator.
raw docstring

coll-of->arbitraryclj

(coll-of->arbitrary a & kwargs)

collectclj

(collect lbl testable)

Label a testable value with an the string representation of an object.

Label a testable value with an the string representation of an object.
raw docstring

expand-arbitrarycljmultimethod

Multimethod to expand `arbitrary' forms.

Dispatches on the symbol for atomic arbitrary forms, and on [op] for compound arbitrary forms, where op is the operator.

Multimethod to expand `arbitrary' forms.

Dispatches on the symbol for atomic arbitrary forms,
and on [op] for compound arbitrary forms, where op is
the operator.
raw docstring

fn->arbitraryclj

(fn->arbitrary fun)

for-allclj

(for-all func & args)

Bind names to generated values.

Bind names to generated values.
raw docstring

for-all-with-namesclj

(for-all-with-names func arg-names args)

Bind names to generated values, supplying informative names.

Bind names to generated values, supplying informative names.
raw docstring

generateclj

(generate n rgen gen)

Extract a value from a generator, using size n and random generator rgen.

Extract a value from a generator, using size n and random generator rgen.
raw docstring

generate-one-ofclj

(generate-one-of arbs)

Randomly choose one of a list of given arbitraries

Randomly choose one of a list of given arbitraries
raw docstring

get-random-generatorclj


get-random-generator?clj

(get-random-generator? thing)

Is object a Get-random-generator-type record? See active.quickcheck/make-get-random-generator.

Is object a `Get-random-generator-type` record? See [[active.quickcheck/make-get-random-generator]].
raw docstring

get-sizeclj


get-size?clj

(get-size? thing)

Is object a Get-size-type record? See active.quickcheck/make-get-size.

Is object a `Get-size-type` record? See [[active.quickcheck/make-get-size]].
raw docstring

labelclj

(label str testable)

Label a testable value.

Label a testable value.
raw docstring

lift->generatorclj

(lift->generator func & gens)

Lift a function on values to generators.

Lift a function on values to generators.
raw docstring

make-arbitraryclj

(make-arbitrary generator transformer)

Construct a Arbitrary-type record.

generator: access via active.quickcheck/arbitrary-generator transformer: access via active.quickcheck/arbitrary-transformer

Construct a `Arbitrary-type` record.

`generator`: access via [[active.quickcheck/arbitrary-generator]]
`transformer`: access via [[active.quickcheck/arbitrary-transformer]]
raw docstring

make-check-resultclj

(make-check-result ok stamp arguments-list)

Construct a Check-result-type record.

ok: access via active.quickcheck/check-result-ok stamp: access via active.quickcheck/check-result-stamp arguments-list: access via active.quickcheck/check-result-arguments-list

Construct a `Check-result-type` record.

`ok`: access via [[active.quickcheck/check-result-ok]]
`stamp`: access via [[active.quickcheck/check-result-stamp]]
`arguments-list`: access via [[active.quickcheck/check-result-arguments-list]]
raw docstring

make-configclj

(make-config max-test max-fail size print-every)

Construct a Config-type record.

max-test: access via active.quickcheck/make-config-max-test max-fail: access via active.quickcheck/make-config-max-fail size: access via active.quickcheck/make-config-size print-every: access via active.quickcheck/make-config-print-every

Construct a `Config-type` record.

`max-test`: access via [[active.quickcheck/make-config-max-test]]
`max-fail`: access via [[active.quickcheck/make-config-max-fail]]
`size`: access via [[active.quickcheck/make-config-size]]
`print-every`: access via [[active.quickcheck/make-config-print-every]]
raw docstring

make-config-max-failclj

(make-config-max-fail Config-type)

Access max-fail field from a [[Config-type]] record. See active.quickcheck/make-config.

Access `max-fail` field from a [[Config-type]] record. See [[active.quickcheck/make-config]].
raw docstring

make-config-max-testclj

(make-config-max-test Config-type)

Access max-test field from a [[Config-type]] record. See active.quickcheck/make-config.

Access `max-test` field from a [[Config-type]] record. See [[active.quickcheck/make-config]].
raw docstring

make-config-print-everyclj

(make-config-print-every Config-type)

Access print-every field from a [[Config-type]] record. See active.quickcheck/make-config.

Access `print-every` field from a [[Config-type]] record. See [[active.quickcheck/make-config]].
raw docstring

make-config-sizeclj

(make-config-size Config-type)

Access size field from a [[Config-type]] record. See active.quickcheck/make-config.

Access `size` field from a [[Config-type]] record. See [[active.quickcheck/make-config]].
raw docstring

make-config?clj

(make-config? thing)

Is object a Config-type record? See active.quickcheck/make-config.

Is object a `Config-type` record? See [[active.quickcheck/make-config]].
raw docstring

make-get-random-generatorclj

(make-get-random-generator)

Construct a Get-random-generator-type record.

Construct a `Get-random-generator-type` record.
raw docstring

make-get-sizeclj

(make-get-size)

Construct a Get-size-type record.

Construct a `Get-size-type` record.
raw docstring

make-promoteclj

(make-promote func)

Construct a Promote-type record.

func: access via active.quickcheck/promote-func

Construct a `Promote-type` record.

`func`: access via [[active.quickcheck/promote-func]]
raw docstring

make-propertyclj

(make-property func arg-names args)

Construct a Property-type record.

func: access via active.quickcheck/property-func arg-names: access via active.quickcheck/property-arg-names args: access via active.quickcheck/property-args

Construct a `Property-type` record.

`func`: access via [[active.quickcheck/property-func]]
`arg-names`: access via [[active.quickcheck/property-arg-names]]
`args`: access via [[active.quickcheck/property-args]]
raw docstring

make-variantclj

(make-variant v gen)

Construct a Variant-type record.

v: access via active.quickcheck/variant-v gen: access via active.quickcheck/variant-generator

Construct a `Variant-type` record.

`v`: access via [[active.quickcheck/variant-v]]
`gen`: access via [[active.quickcheck/variant-generator]]
raw docstring

make-with-sizeclj

(make-with-size size generator)

Construct a With-size-type record.

size: access via active.quickcheck/with-size-size generator: access via active.quickcheck/with-size-generator

Construct a `With-size-type` record.

`size`: access via [[active.quickcheck/with-size-size]]
`generator`: access via [[active.quickcheck/with-size-generator]]
raw docstring

map-of->arbitraryclj

(map-of->arbitrary ks vs)

nothingclj


or->arbitraryclj

(or->arbitrary & args)

pickclj

(pick n lis)

Pick an element from a sequence of (frequency, generator) pairs.

Pick an element from a sequence of (frequency, generator) pairs.
raw docstring

promoteclj


promote-funcclj

(promote-func Promote-type)

Access func field from a [[Promote-type]] record. See active.quickcheck/make-promote.

Access `func` field from a [[Promote-type]] record. See [[active.quickcheck/make-promote]].
raw docstring

promote?clj

(promote? thing)

Is object a Promote-type record? See active.quickcheck/make-promote.

Is object a `Promote-type` record? See [[active.quickcheck/make-promote]].
raw docstring

propertycljmacro

(property clauses body0 & bodies)

Create a property through binding identifiers to arbitraries.

The clauses are a vector of alternating identifiers and arbitraries, which are implicitly in the syntax understood by the arbitrary macro.

The body can use the identifiers, and should evaluate to a boolean saying whether the property is satisfied.

Create a property through binding identifiers to arbitraries.

The clauses are a vector of alternating identifiers and arbitraries,
which are implicitly in the syntax understood by the arbitrary macro.

The body can use the identifiers, and should evaluate to a boolean
saying whether the property is satisfied.
raw docstring

property-arg-namesclj

(property-arg-names Property-type)

Access arg-names field from a [[Property-type]] record. See active.quickcheck/make-property.

Access `arg-names` field from a [[Property-type]] record. See [[active.quickcheck/make-property]].
raw docstring

property-argsclj

(property-args Property-type)

Access args field from a [[Property-type]] record. See active.quickcheck/make-property.

Access `args` field from a [[Property-type]] record. See [[active.quickcheck/make-property]].
raw docstring

property-funcclj

(property-func Property-type)

Access func field from a [[Property-type]] record. See active.quickcheck/make-property.

Access `func` field from a [[Property-type]] record. See [[active.quickcheck/make-property]].
raw docstring

property?clj

(property? thing)

Is object a Property-type record? See active.quickcheck/make-property.

Is object a `Property-type` record? See [[active.quickcheck/make-property]].
raw docstring

quickclj

Quick test-run configuration with minimal output.

Quick test-run configuration with minimal output.
raw docstring

quickcheckclj

(quickcheck prop)

Run a property against the `quick' configuration and report results.

Run a property against the `quick' configuration and report results.
raw docstring

quickcheck-resultsclj

(quickcheck-results prop)

Run a property against the `quick' configuration and return results.

Run a property against the `quick' configuration and return results.
raw docstring

resizeclj


set->arbitraryclj

(set->arbitrary s)

Make an arbitrary from a set (behaviour like enum)

Make an arbitrary from a set (behaviour like enum)
raw docstring

sizedclj

(sized func)

Apply a size to a generator.

Apply a size to a generator.
raw docstring

spec->arbitraryclj

(spec->arbitrary spec)

Make an arbitrary from a clojure spec

Make an arbitrary from a clojure spec
raw docstring

spec-form->arbitraryclj

(spec-form->arbitrary form)

Make an arbitrary from a s/formed spec

Make an arbitrary from a s/formed spec
raw docstring

spec-op->arbitraryclj

(spec-op->arbitrary op args)

Make an arbitrary from a spec op

Make an arbitrary from a spec op
raw docstring

such-thatclj


such-that-generatorclj

(such-that-generator gen pred)

such-that-maybeclj

(such-that-maybe gen pred)

symbol->arbitraryclj

(symbol->arbitrary sym)

trivialcljmacro

(trivial ?really? ?testable)

Classify some test cases of a testable as trivial.

Classify some test cases of a testable as trivial.
raw docstring

variantclj


variant-generatorclj

(variant-generator Variant-type)

Access gen field from a [[Variant-type]] record. See active.quickcheck/make-variant.

Access `gen` field from a [[Variant-type]] record. See [[active.quickcheck/make-variant]].
raw docstring

variant-vclj

(variant-v Variant-type)

Access v field from a [[Variant-type]] record. See active.quickcheck/make-variant.

Access `v` field from a [[Variant-type]] record. See [[active.quickcheck/make-variant]].
raw docstring

variant?clj

(variant? thing)

Is object a Variant-type record? See active.quickcheck/make-variant.

Is object a `Variant-type` record? See [[active.quickcheck/make-variant]].
raw docstring

verboseclj

Quick test-run configuration with verbose output.

Quick test-run configuration with verbose output.
raw docstring

with-size-generatorclj

(with-size-generator With-size-type)

Access generator field from a [[With-size-type]] record. See active.quickcheck/make-with-size.

Access `generator` field from a [[With-size-type]] record. See [[active.quickcheck/make-with-size]].
raw docstring

with-size-sizeclj

(with-size-size With-size-type)

Access size field from a [[With-size-type]] record. See active.quickcheck/make-with-size.

Access `size` field from a [[With-size-type]] record. See [[active.quickcheck/make-with-size]].
raw docstring

with-size?clj

(with-size? thing)

Is object a With-size-type record? See active.quickcheck/make-with-size.

Is object a `With-size-type` record? See [[active.quickcheck/make-with-size]].
raw docstring

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

× close