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

PropTests: improving the shrinking capabilities of PropValue #250

Open
Acaccia opened this issue Jan 11, 2024 · 2 comments
Open

PropTests: improving the shrinking capabilities of PropValue #250

Acaccia opened this issue Jan 11, 2024 · 2 comments

Comments

@Acaccia
Copy link
Collaborator

Acaccia commented Jan 11, 2024

The proptest lib has strategies for shrinking values which fail property tests.

For now, PropValue uses the default strategy, which for our case does not really help a lot: our generated values are too big, and the default shrinking would use too many steps for giving us something useful.

It seems PropValue could implement the ValueTree trait, which contains a simplify method.

@moodmosaic
Copy link
Member

Is the current shrinking strategy integrated or type-based?

@Acaccia
Copy link
Collaborator Author

Acaccia commented Jan 12, 2024

Those are new notions for me, so I hope I understand the blog post correctly.

It seems it's integrated to the strategy. From their book:

Note that shrinking never shrinks a value to something outside the range the strategy describes.

@github-project-automation github-project-automation bot moved this to Status: 🆕 New in Stacks Core Eng Feb 2, 2024
@smcclellan smcclellan added this to the WASM Phase 3 milestone Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Status: 🆕 New
Development

No branches or pull requests

3 participants