Hello,
Is there any analogues of forAll and forAllShrink property combinators,
to test property, which expects 2 arguments.
I am not sure, but maybe it will look like this:
QuickChick (forAllShrink2
some_generator_1
some_generator_2
shrink_1
shrink_2
binary_function_my_property
).
I managed to write such a function for forAll :
Definition forAll2 {A B C: Type} `{Show A} `{Show C} `{Checkable B}
(g1 : G A) (g2 : G C) (f : A -> C -> B)
: Checker :=
a <- g1 ;;
c <- g2 ;;
r <- checker (f a c) ;;
match r with
Success => ret Success
| Failure b => ret (Failure (a,c,b))
end.
but I didn’t write same for forAllShrink, so maybe I am reinventing the wheel, and such property combinators already exists. Please advice.
Thanks.