You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the documentation, it would seem that this shouldn't work:
(quickcheck (property [(x arbitrary-integer)]
(property [(y arbitrary-integer)]
(= (* x y) (* y x)))
But it does; if the body is changed to fail, the reporting does the right thing: tells you the x and y that cause the issue.
And indeed, so does this:
(quickcheck (property [(x arbitrary-integer)]
(if (< x 10)
(property [(y arbitrary-integer)]
(= (* x y) (* y x)))
(property [(y arbitrary-integer)]
(= (* x y) (* y x 2))))
This is great, but nothing on the documentation makes it obvious this would be possible! For property:
"The ids are bound to the result of the given gen/arb-exprs inside the body expressions. The body expressions are used as the bodies of a predicate function that will be run with newly generated values from the specified generators or arbitraries."
The text was updated successfully, but these errors were encountered:
From the documentation, it would seem that this shouldn't work:
But it does; if the body is changed to fail, the reporting does the right thing: tells you the
x
andy
that cause the issue.And indeed, so does this:
This is great, but nothing on the documentation makes it obvious this would be possible! For
property
:"The ids are bound to the result of the given gen/arb-exprs inside the body expressions. The body expressions are used as the bodies of a predicate function that will be run with newly generated values from the specified generators or arbitraries."
The text was updated successfully, but these errors were encountered: