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
|
jmid
left a comment
There was a problem hiding this comment.
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. |
jmid
left a comment
There was a problem hiding this comment.
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
bytesClose #83