constrained-generators
: poor useability for interaction between forAll
and dependsOn
#4161
Labels
constrained-generators
: poor useability for interaction between forAll
and dependsOn
#4161
If you write the following code:
The intention is to generate a list of positive numbers, and then put them all in the set. However, what happens instead is that we generate a list of numbers, and then fail generation if any of them happen to be non-positive:
However, you can rewrite the generator by splitting the
forAll
:and
quickCheck
is happy as ever:Now, if you understand how the system works this is something you can work around, but it would be nice for usability if we did the split automatically (it can be inferred from the
dependsOn
).The text was updated successfully, but these errors were encountered: