Skip to content
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

Make the check* family of functions exit as soon as a counterexample is found #5

Closed
rudymatela opened this issue Feb 16, 2018 · 1 comment
Assignees

Comments

@rudymatela
Copy link
Owner

Look:

$ ghci
> :set +s
> checkFor 100 (/= 0)
*** Failed! Falsifiable (after 1 tests):
0
(0.01 secs, 186,296 bytes)
> checkFor 10000000 (/= 0)
*** Failed! Falsifiable (after 1 tests):
0
(3.34 secs, 8,968,395,808 bytes)

The above two calls for checkFor should have the same runtime but they have not --- as soon as a counterexample is found checkFor should print it and exit (currently it is running tests after it has found the fault!). Somewhere in the implementation I am using sequence on the wrong place.

I discovered this when working on #4.

@rudymatela
Copy link
Owner Author

Done. See 24ad795.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant