Liking cljdoc? Tell your friends :D
All platforms.

clojure.test.check


quick-checkclj/s

(quick-check num-tests property & {:keys [seed max-size] :or {max-size 200}})

Tests property num-tests times. Takes optional keys :seed and :max-size. The seed parameter can be used to re-run previous tests, as the seed used is returned after a test is run. The max-size can be used to control the 'size' of generated values. The size will start at 0, and grow up to max-size, as the number of tests increases. Generators will use the size parameter to bound their growth. This prevents, for example, generating a five-thousand element vector on the very first test.

Examples:

(def p (for-all [a gen/pos-int] (> (* a a) a)))
(quick-check 100 p)
Tests `property` `num-tests` times.
Takes optional keys `:seed` and `:max-size`. The seed parameter
can be used to re-run previous tests, as the seed used is returned
after a test is run. The max-size can be used to control the 'size'
of generated values. The size will start at 0, and grow up to
max-size, as the number of tests increases. Generators will use
the size parameter to bound their growth. This prevents, for example,
generating a five-thousand element vector on the very first test.

Examples:

    (def p (for-all [a gen/pos-int] (> (* a a) a)))
    (quick-check 100 p)
source (clj)source (cljs)raw docstring

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

× close