Liking cljdoc? Tell your friends :D

com.gfredericks.test.chuck.clojure-test


*chuck-captured-reports*clj/s

source

-reportclj/s

(-report report)
source

-testingclj/s

(-testing name func)
source

capture-reportsclj/smacro

(capture-reports & body)
source

capture-reports*clj/s

(capture-reports* reports-atom f)
source

checkingclj/smacro

(checking name & opt+body)

A macro intended to replace the testing macro in clojure.test with a generative form. To make

(testing "doubling" (is (= (* 2 2) (+ 2 2))))

generative, you simply have to change it to

(checking "doubling" [x gen/int] (is (= (* 2 x) (+ x x)))).

Test failures will be reported for the smallest case only.

Bindings and body are passed to com.gfredericks.test.chuck.properties/for-all.

Options can be provided to clojure.test.check/quick-check as an optional second argument, and should either evaluate to an integer (number of tests) or a map (with :num-tests specifying the number of tests). e.g.:

(let [options {:num-tests 100 :seed 123 :max-size 10}] (checking "doubling" options [x gen/int] (is (= (* 2 x) (+ x x)))))

For background, see http://blog.colinwilliams.name/blog/2015/01/26/alternative-clojure-dot-test-integration-with-test-dot-check/

A macro intended to replace the testing macro in clojure.test with a
generative form. To make

  (testing "doubling"
    (is (= (* 2 2) (+ 2 2))))

generative, you simply have to change it to

  (checking "doubling"
    [x gen/int]
    (is (= (* 2 x) (+ x x)))).

Test failures will be reported for the smallest case only.

Bindings and body are passed to com.gfredericks.test.chuck.properties/for-all.

Options can be provided to `clojure.test.check/quick-check` as an optional
second argument, and should either evaluate to an integer (number of tests) or a
map (with :num-tests specifying the number of tests). e.g.:

  (let [options {:num-tests 100 :seed 123 :max-size 10}]
    (checking "doubling" options
      [x gen/int]
      (is (= (* 2 x) (+ x x)))))

For background, see
http://blog.colinwilliams.name/blog/2015/01/26/alternative-clojure-dot-test-integration-with-test-dot-check/
sourceraw docstring

for-allclj/smacro

(for-all bindings & body)

An alternative to com.gfredericks.test.chuck.properties/for-all that uses clojure.test-style assertions (i.e., clojure.test/is) rather than the truthiness of the body expression.

See checking to additionally report clojure.test assertion failures.

An alternative to com.gfredericks.test.chuck.properties/for-all that uses
clojure.test-style assertions (i.e., clojure.test/is) rather than
the truthiness of the body expression.

See `checking` to additionally report clojure.test assertion failures.
sourceraw docstring

optionsclj/s

(options num-tests-or-options)
source

pass?clj/s

(pass? reports)
source

qc-and-report-exceptionclj/smacro

(qc-and-report-exception final-reports num-tests-or-options bindings & body)
source

report-exception-or-shrunkclj/s

(report-exception-or-shrunk result)
source

report-needed?clj/s

(report-needed? reports final-reports)
source

save-to-final-reportsclj/s

(save-to-final-reports final-reports reports)
source

shrunk-reportclj/s

(shrunk-report m)
source

timesclj/s

(times num-tests-or-options)
source

with-test-out*clj/s

(with-test-out* f)
source

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

× close