simple-check.properties documentation
for-all
macro
[bindings & body]
Macro sugar for for-all*
. for-all
lets you name the parameter
and use them in expression, without wrapping them in a lambda. Like
for-all*
, it returns a property.
Examples
(for-all [a gen/int b gen/int] (>= (+ a b) a))
for-all*
fn
[args function]
Creates a property (properties are also generators). A property
is a generator that generates the result of applying the function
under test with the realized arguments. Once realized, the arguments
will be applied to function
with apply
.
Example:
(for-all* [gen/int gen/int] (fn [a b] (>= (+ a b) a)))