(test-case {:keys [doc body context ns file line metadata] :as test-case})
A test case body may execute arbitrary code and may have side effects. It should throw an exception to indicate failure. Returning without throwing an exception indicates success.
A test case body may execute arbitrary code and may have side effects. It should throw an exception to indicate failure. Returning without throwing an exception indicates success.
(test-case-result type' source)
(test-case-result type' source thrown)
Creates a test case result map with keys :pass?, :source, and :thrown.
pass? is true if the test case passed successfully, false otherwise.
source is the test case object that returned this result.
thrown is the exception (Throwable) thrown by a failing test case.
Creates a test case result map with keys :pass?, :source, and :thrown. pass? is true if the test case passed successfully, false otherwise. source is the test case object that returned this result. thrown is the exception (Throwable) thrown by a failing test case.
(test-case-result? x)
True if x is a test case result.
True if x is a test case result.
(try-test-case f)
Executes a test case function. Catches all Throwables. Returns a map with the following key-value pairs:
:source - the input function :pass? - true if the function ran without throwing :thrown - the Throwable instance if thrown
Executes a test case function. Catches all Throwables. Returns a map with the following key-value pairs: :source - the input function :pass? - true if the function ran without throwing :thrown - the Throwable instance if thrown
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close