-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scoped coverage checking and confidence #469
Comments
I don't think it's possible to do what you want - how would Hedgehog know to only evaluate the coverage condition if cover 40 "pattern matches" (someRareCondition ==> isJust sub) where infixr 5 ==>
(==>) :: Bool -> Bool -> Bool
True ==> x = x
False ==> _ = True The other thing I'd suggest is to split your property test into two separate properties - one where |
That's precisely what this is:
If it's guarded by a I haven't looked into it, but I suspect that the
This is in a |
After checking the code, that does indeed seem to be the case. |
Ah yes, of course
Cool! I'm not very familiar with this part of Hedgehog, so you might want to ping one of the maintainers to confirm, but I'm sure a PR would be welcome! |
@jacobstanley is this correct? |
It'd probably be useful to have a |
Recommend against changing the behavior of the existing
Given #471 I think it would be worth thinking about the expected behavior if both existing and new functions get called with the same label. |
Testing my state machine code, I've noticed that when I have, say,
then that seems to translate to being 40% of ALL cases, not only the cases when
someRareCondition
is true. Is there a way to take that into account? If I were to modify the predicate tonot someRareCondition || isJust sub
in the argument ofcover
, then the coverage numbers would be severely inflated by all the times thatsomeRareCondition
is false.I had assumed that that was what the
withConfidence
functionality was for, but it seems to have no effect.The text was updated successfully, but these errors were encountered: