-
Notifications
You must be signed in to change notification settings - Fork 39
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 bytes generator, printer and shrinker #245
Conversation
Cool! Haven't look very deep in the code yet but it could be nice to both add the generators to |
This is great indeed, thanks @n-osborne! 😃 I would also appreciate it if you would include tests of them in |
359ee6b
to
7a4e7e9
Compare
Looks good! |
Thanks @n-osborne! 🙏 I'm sorry that this drifted into a design PR as this takes extra time to get right. To summarize, with this PR we arrive at the below
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I've now taken another pass over this.
I spotted that some of these new string arbitrary
generator aliases are not exposed in the interface. Ideally this would have been caught by just writing a simple test - but on the other hand, we shouldn't have to write duplicate tests for both aliases... 🤷
(I also spotted that some of the shrinkers for the above are broken but that is not caused by this PR, so I'll file a separate issue).
Indicate what the new name is a synonym of, so that newcommers can easily make their choice.
This is the same fix that has been made in c-cube#258 for strings. `Shrink.bytes` now takes an optional char shrinker (default value being `Shrink.char`). So `bytes_printable` can shrink only on printable chars.
Thanks for the Taking another pass of it I noticed that the CHANGELOG entries are off - and there is also an unintentional reversion of #249 resulting from all the rebasing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
The changelog is still not quite right. I've added a proposal.
I've committed a few more changes I proposed in #245 (comment) For reference, below follows a summary of the resulting
|
@n-osborne can I ask you to take a quick look at the last commits - just one at a time - to see if they make sense - before we merge this PR:
|
Looks good to me. The |
Hereby merged - thanks! 😃 |
Add the missing primitives for
bytes
Close #83