Liking cljdoc? Tell your friends :D

clojure.test.check.clojure-test


*default-opts*clj/s

The default options passed to clojure.test.check/quick-check by defspec.

The default options passed to clojure.test.check/quick-check
by defspec.
sourceraw docstring

*default-test-count*clj/s

source

*report-shrinking*clj/s

If true, a verbose report of the property being tested, the failing return value, and the arguments provoking that failure is emitted prior to the start of the shrinking search.

If true, a verbose report of the property being tested, the
failing return value, and the arguments provoking that failure is emitted
prior to the start of the shrinking search.
sourceraw docstring

*report-trials*clj/s

Controls whether property trials should be reported via clojure.test/report. Valid values include:

  • false - no reporting of trials (default)
  • a function - will be passed a clojure.test/report-style map containing :clojure.test.check/property and :clojure.test.check/trial slots
  • true - provides quickcheck-style trial reporting (dots) via trial-report-dots

(Note that all reporting requires running quick-check within the scope of a clojure.test run (via test-ns, test-all-vars, etc.))

Reporting functions offered by clojure.test.check include trial-report-dots and trial-report-periodic (which prints more verbose trial progress information every *trial-report-period* milliseconds).

Controls whether property trials should be reported via clojure.test/report.
Valid values include:

* false - no reporting of trials (default)
* a function - will be passed a clojure.test/report-style map containing
:clojure.test.check/property and :clojure.test.check/trial slots
* true - provides quickcheck-style trial reporting (dots) via
`trial-report-dots`

(Note that all reporting requires running `quick-check` within the scope of a
clojure.test run (via `test-ns`, `test-all-vars`, etc.))

Reporting functions offered by clojure.test.check include `trial-report-dots` and
`trial-report-periodic` (which prints more verbose trial progress information
every `*trial-report-period*` milliseconds).
sourceraw docstring

*trial-report-period*clj/s

Milliseconds between reports emitted by trial-report-periodic.

Milliseconds between reports emitted by `trial-report-periodic`.
sourceraw docstring

assert-checkclj/s

(assert-check {:keys [result] :as m})
source

default-reporter-fnclj/s

(default-reporter-fn {:keys [type] :as args})

Default function passed as the :reporter-fn to clojure.test.check/quick-check. Delegates to clojure.test/report.

Default function passed as the :reporter-fn to clojure.test.check/quick-check.
Delegates to clojure.test/report.
sourceraw docstring

defspecclj/s≠macro

clj
(defspec name property)
(defspec name num-tests? property)
(defspec name options? property)
cljs
(defspec &form &env name property)
(defspec &form &env name options property)

Defines a new clojure.test test var that uses quick-check to verify the property, running num-times trials by default. You can call the function defined as name with no arguments to trigger this test directly (i.e., without starting a wider clojure.test run). If called with arguments, the first argument is the number of trials, optionally followed by keyword arguments as defined for quick-check.

Defines a new clojure.test test var that uses `quick-check` to verify the
property, running num-times trials by default.  You can call the function defined as `name`
with no arguments to trigger this test directly (i.e., without starting a
wider clojure.test run).  If called with arguments, the first argument is the number of
trials, optionally followed by keyword arguments as defined for `quick-check`.
source (clj)source (cljs)raw docstring

trial-report-dotsclj/s

(trial-report-dots {[so-far total] :clojure.test.check.clojure-test/trial})

Intended to be bound as the value of *report-trials*; will emit a single dot every 1000 trials reported.

Intended to be bound as the value of `*report-trials*`; will emit a single
dot every 1000 trials reported.
sourceraw docstring

trial-report-periodicclj/s

(trial-report-periodic m)

Intended to be bound as the value of *report-trials*; will emit a verbose status every *trial-report-period* milliseconds, like this one:

Passing trial 3286 / 5000 for (your-test-var-name-here) (:)

Intended to be bound as the value of `*report-trials*`; will emit a verbose
status every `*trial-report-period*` milliseconds, like this one:

Passing trial 3286 / 5000 for (your-test-var-name-here) (:)
sourceraw docstring

with-test-out*clj/s

(with-test-out* f)
source

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

× close