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

Add ascii/latin1/unicode character generators #73

Merged
merged 1 commit into from
May 6, 2017
Merged

Conversation

jacobstanley
Copy link
Member

@jacobstanley jacobstanley commented May 6, 2017

This adds some generators for various character sets, and a property test which fails with the current version of text on Hackage as an example usage.

The test was inspired by haskell/text#176 and the generator choices are similar to the ones which have recently been added to QuickCheck using Arbitrary instances for Char newtypes.

screen shot 2017-05-06 at 5 42 32 pm

prop_takeEnd :: Property
prop_takeEnd =
property $ do
xs <- forAll $ Gen.string (Range.linear 0 100) Gen.unicode
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is changed from Gen.unicode to Gen.latin1 then the test will start passing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant