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

Add tup2 to tup9 for Gen #181

Merged
merged 3 commits into from Dec 3, 2021
Merged

Add tup2 to tup9 for Gen #181

merged 3 commits into from Dec 3, 2021

Conversation

vch9
Copy link
Contributor

@vch9 vch9 commented Sep 15, 2021

Alternative (and easy) solution for #108.

Nothing smart happening there.

@jmid
Copy link
Collaborator

jmid commented Dec 2, 2021

I think these are fine. What do you think @c-cube?

Even if they are so straightforward, it would be nice to include tests of them.
Doing so, will require Printers - which should be included for the generators to be generally useful.

For uniformity it would be nice to add t2-t9 to QCheck as well with both generators and printers - and ideally also shrinkers...

@c-cube
Copy link
Owner

c-cube commented Dec 3, 2021

can we get the same in QCheck.Gen?

@vch9
Copy link
Contributor Author

vch9 commented Dec 3, 2021

Yes I will add these in QCheck.

When I did this PR I thought QCheck2 would replace QCheck. However, I started the migration in our project where we have a lot of QCheck tests and the execution's time has raised a lot. I now believe QCheck is still relevant in many cases.

@c-cube
Copy link
Owner

c-cube commented Dec 3, 2021

Indeed, it might be that they both have their use :-).

@vch9
Copy link
Contributor Author

vch9 commented Dec 3, 2021

It is ready again for a review @c-cube and @jmid. I added printers, shrinkers, generators and arbitraries? for QCheck and printer for QCheck2. I also added a lot of tests aswell. It's a lot of boiler-plate code thought.

@c-cube
Copy link
Owner

c-cube commented Dec 3, 2021

Looks good I think. Thanks for the patience on such boilerplat-y code :D

@c-cube c-cube merged commit cffcb6b into c-cube:master Dec 3, 2021
@jmid
Copy link
Collaborator

jmid commented Dec 4, 2021

However, I started the migration in our project where we have a lot of QCheck tests and the execution's time has raised a lot.

It would be great if you could extract a representable test case and share it here 🙏‍🙂

QCheck2 is a great effort! In the long run, I still hope for it to replace QCheck.
It will require some more engineering, testing, and fine-tuning evidently.
A real-world example test that takes too long w/QCheck2 would be a good starting point though (in comparison, the shrinker benchmarking in #177 is mostly based on artificial tests).

@vch9
Copy link
Contributor Author

vch9 commented Dec 4, 2021

A real-world example test that takes too long w/QCheck2 would be a good starting point though (in comparison, the shrinker benchmarking in #177 is mostly based on artificial tests).

It's a test in the Tezos code base, there is a lot of dependencies going on there. I don't know if it can be easily extracted for our testing purpose.

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

Successfully merging this pull request may close these issues.

None yet

3 participants