Checkers that combine other checkers.
Checkers that combine other checkers.
(every-checker & checker-forms)
Combines multiple checkers into one checker that passes when all component checkers pass. If one checker fails, the remainder are not run. The output shows which checker failed.
Example:
(fact 3 => (every-checker odd? neg?))
FAIL ...
...
During checking, these intermediate values were seen:
neg? => false
The combined checkers can include anything that can appear on the right-hand side of an arrow.
Example:
(fact "-1b-" => (every-checker #(= 4 (count %))
#"1b"))
Combines multiple checkers into one checker that passes when all component checkers pass. If one checker fails, the remainder are not run. The output shows which checker failed. Example: (fact 3 => (every-checker odd? neg?)) FAIL ... ... During checking, these intermediate values were seen: neg? => false The combined checkers can include anything that can appear on the right-hand side of an arrow. Example: (fact "-1b-" => (every-checker #(= 4 (count %)) #"1b"))
(some-checker & checker-forms)
Combines multiple checkers into one checker that passes when any of the component checkers pass. If one checker passes, the remainder are not run. Example:
(fact 3 => (some-checker even? neg?)) ; fails
The combined checkers can include anything that can appear on the right-hand side of an arrow.
Example:
(fact "-1b-" => (some-checker #(= 4 (count %))
"-1b-"))
Combines multiple checkers into one checker that passes when any of the component checkers pass. If one checker passes, the remainder are not run. Example: (fact 3 => (some-checker even? neg?)) ; fails The combined checkers can include anything that can appear on the right-hand side of an arrow. Example: (fact "-1b-" => (some-checker #(= 4 (count %)) "-1b-"))
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close