Liking cljdoc? Tell your friends :D

com.gfredericks.test.chuck.clojure-test


*chuck-captured-reports*clj/s

source

-reportclj/s

(-report reports)
source

-testingclj/s

(-testing name func)
source

capture-reportsclj/smacro

(capture-reports & body)
source (clj)source (cljs)

capture-reports*clj/s

(capture-reports* reports-atom f)
source

checkingclj/smacro

(checking name num-tests-or-options bindings & 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" 100 [x gen/int] (is (= (* 2 x) (+ x x)))).

You can optionally pass in a map of options instead of the number of tests, which will be passed to clojure.test.check/quick-check, e.g.:

(checking "doubling" {:num-tests 100 :seed 123 :max-size 10} [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" 100 [x gen/int] (is (= (* 2 x) (+ x x)))).

You can optionally pass in a map of options instead of the number of tests,
which will be passed to `clojure.test.check/quick-check`, e.g.:

  (checking "doubling" {:num-tests 100 :seed 123 :max-size 10}
    [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/
source (clj)source (cljs)raw docstring

for-allclj/smacro

(for-all bindings & body)

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

An alternative to clojure.test.check.properties/for-all that uses
clojure.test-style assertions (i.e., clojure.test/is) rather than
the truthiness of the body expression.
source (clj)source (cljs)raw 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 (clj)source (cljs)

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