-
Notifications
You must be signed in to change notification settings - Fork 37
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
Documentation - role of Gen.t
vs. arbitrary
#281
Comments
Acknowledged! 🙂 In a past role teaching this stuff I prepared slides to explain the With that in mind, e.g., a Whereas my old slides go top-down, the relevant Cornell book chapter instead explains this bottom-up, starting from "pure generation" and explains Finally I should mention that
Tests built with list_of_size Gen.small_nat (pair char bool) : (char * bool) list QCheck.arbitrary = Notice how this uses I hope this helps! As always, PRs to improve the documentation are very welcome! 🙏😃 |
The documentation on the slides is helpful; maybe include a link or the slides in this repository. I believe this kind of high-level explanation would at the top of the MLI file would help. Something that is not obvious: is |
That's a good point and a constructive suggestion, thanks!
Indeed. QCheck2 offers integrated shrinking (see #106 #109 and #116 for details). QCheck2 isn't as battle tested as the older QCheck(1). The QCheck(1) vs. QCheck2 distinction could certainly also be made clearer in the documentation... Finally I'm realizing that https://c-cube.github.io/qcheck/0.21/qcheck-core/QCheck2/index.html is perhaps not as easily reachable from https://c-cube.github.io/qcheck/ as one could hope for. |
I am picking up QCheck and I struggle with how to write my tests; I believe the documentation would benefit from describing the relation of generators and arbitrariness better because they have a similar structure. For example: I need a small list of key-value pairs. Should I use the
Gen.t
orarbitrary
combinators to define this? Somearbitrary
functions takeGen.t
values as arguments - which is surprising and creates the confusion.The text was updated successfully, but these errors were encountered: