-
Notifications
You must be signed in to change notification settings - Fork 105
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
How exactly to rerun failed examples? #281
Comments
You should have the shrunken version of the values that failed your property printed to the console by the failure handler. |
Yes. But if you have quite complicated structures (even after shrinking) with very custom |
Very true. This is a language-level problem I think, and requires a language-level solution. Being able to stringify arbitrary bits of the AST with a good macro system would make this trivial. In the mean time, as a hack, you could write a modifier type that dumps a value declaration as its |
I do agree with your suggestion to improve the replay diagnostic. Especially now that Xcode lets you copy diagnostic banner text. |
Maybe one could also add another property to |
Hi, I'm trying to figure out how exactly to reproduce a failure in my test so I can debug it. I receive output like "Replay with 1006624065 8850 and size 2". But I'm not exactly sure how I can generate the exact example that caused the failure.
I'm trying
but it looks like that generates 100 test cases. How can I get only exactly the one that failed?
As a workaround I guess I can assign my condition in the
forAll
closure to a variable and work withif ... else
, but maybe there's an easier way.(Also, it would be nice if the output could be something like
or something, because currently it's not really intuitively clear where these values need to be inserted.)
The text was updated successfully, but these errors were encountered: