-
Notifications
You must be signed in to change notification settings - Fork 39
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
Feat/integrated shrinking #116
Conversation
* Add shrinking documentation * Go back to the previous implementation of Gen.int_range and adapt * Fix wrong origins on some char generators * Reorder and improve consistency of functions * Add documentation sections * Change the default origin from center to lower for various generators
* Add Tree.t, getters and pp to API * Add an optional depth to pp * change generate_print to generate_tree
Not tested yet
98c19d0
to
cf83c83
Compare
I think I have managed to make function shrinking work again 🎉 At least the first tests are positive, see: let test_basic : QCheck2.Test.t =
let open QCheck2 in
Test.make (fun1 Observable.int bool) (fun (Fun (_, f)) -> f 42 = f 17)
I am going to test it further today, add some documentation on all its APIs, then we should be good to go! |
6a32880
to
e607e2b
Compare
@c-cube IMHO this PR is done. In the last days I have implemented a first version of function shrinking. It's not perfect but it works (ish). Please do another (hopefully last 😁 ) review |
I am currently migrating all existing Tezos tests to QCheck2 as a dogfooding experiment. Current status:
I think the bulk of the PR can still be reviewed (but this should not be merged until such obvious regressions are fixed 😁 ) |
I just pushed:
I'd be happy to get a review on these recent code changes as I am not experienced in OCaml performance 🙏 I'm resuming migrating my project to QCheck2 to see if I detect other problems |
Tezos QCheck tests all pass with QCheck2. I note that the total run time is slower with QCheck2 (~60s with QCheck2, ~50s with QCheck1). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice. I think it's almost there, I just added a bunch of suggestions, but I think this can be merged real soon :)
@c-cube I believe I have managed all threads, please review again 🙏 |
But that's not rétro-compatible, is it? That's my point
|
Alright team, this time I think it's merged for good! 🎉 Thank you very much @sir4ur0n for your hard work and patience. This was quite the epic PR! |
This is a reopening with additional fixes to original PR #109 adding QCheck2 and Integrated shrinking.