-
Notifications
You must be signed in to change notification settings - Fork 8
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
"(exhausted)" is printed late? #19
Comments
Thanks to Johannes Waldmann for noticing and reporting this caveat: #19
The meaning of exhausted in LeanCheck is slightly confusing indeed... I have added (e9f1a89, 5529de1) the following note in the haddock of leancheck/src/Test/LeanCheck/IO.hs Lines 50 to 54 in 5529de1
The straightorward meaning of exhausted would be to say that all possible values are tested. Unfortunately, that is not the case in LeanCheck: here "exhaustion" means: no more tests could be enumerated. The problem is that there is no way for LeanCheck to know that tests are exhausted unless it tries to enumerate one more element. In your example here: > checkFor 2 $ \ x -> x == not (not x)
+++ OK, passed 2 tests. LeanCheck has no way of knowing that there are only two possible booleans unless it tries (and fails) to enumerate a third. We are left with two options:
With option 1, we would be inconsistent with the number of tests and enumerated values. With option 2, we have a slightly confusing meaning of "exhausted". |
this is nit-picking, but ..
I was expecting the
(exhausted)
message to appear already in the first example.The text was updated successfully, but these errors were encountered: