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

QCheck2: how to build a generator with a custom shrinker? #222

Open
vch9 opened this issue Jan 14, 2022 · 0 comments
Open

QCheck2: how to build a generator with a custom shrinker? #222

vch9 opened this issue Jan 14, 2022 · 0 comments

Comments

@vch9
Copy link
Contributor

vch9 commented Jan 14, 2022

Lets say I want to use my own shrinker (e.g. shrink a list from the start to the end), what should I use?

My first thought was to use make_primitive but it requires a gen: Random.State.t -> 'a instead of a QCheck2.Gen.t.

I know a convenient solution is to use QCheck but in my particular use we plan to use QCheck2 everywhere, thus, wipe every use of QCheck.

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

No branches or pull requests

1 participant