(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)
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 |