-
Notifications
You must be signed in to change notification settings - Fork 168
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
Added unicode generators [PR was resubmitted] #63
base: master
Are you sure you want to change the base?
Conversation
Add improper_list/2, maybe_improper_list/2 generators.
I would expect Also, you could add unit-like tests, and which ensures it shrinks properly. Just updated the original ticket (#48). |
Some generated unicode is failing an is_instance check. For instance, this fails for every value generated (always on the first generated value):
unicode_characters() fails too. unicode_char() and unicode_string() work as expected, correctly flagging all values generated as instances. I hope unicode gets added to the main branch! Seems pretty important to have these types available. |
Any news regarding the unicode generator? |
After some thinking I think unicode generator does not belong to PropEr core. We should have proper_contrib or so? Reason: unicode generator can use only "official" PropEr APIs and does not need any changes in internals. Thoughts? |
Thanks for the quick response. That sounds ok too. As long as I can create random utf8 binaries for types like these: -type diff_op() :: delete | equal | insert. unicode_binary() is defined in the unicode module as an alias for binary().
|
I do not have a strong opinion on this. What @motiejus points out makes sense, but on the other hand it's very convenient to have it built-in and not have to know about and download another package. The only requirements we have if this is to become part of PropEr is that it is as robust as possible (in particular, it should shrink properly) and it comes with tests and documentation. If I understand the comments here, the current pull request does not have these properties, but I have not played with it. |
This ticket should be closed, as it's fixed in 3d211d6 |
Add improper_list/2, maybe_improper_list/2 generators.
PR #62 is an old version of this request.