| Copyright | (c) 2014-2017 Bryan O'Sullivan |
|---|---|
| License | BSD-style |
| Maintainer | bos@serpentine.com |
| Stability | stable |
| Portability | portable |
| Safe Haskell | Safe |
| Language | Haskell98 |
Test.QuickCheck.Unicode
Contents
Description
QuickCheck Generator and shrink functions for testing software that uses Unicode data.
The default Arbitrary instance for the Char type intentionally
generates only ASCII values. This can lead to a false sense of
security in cases where Unicode compliance is required, as
encodings that span multiple bytes or code units will simply not be
exercised at all.
This module deliberately avoids using the text and bytestring
packages to avoid pulling in extra dependencies.
Newtype wrapper for convenience
Instances
| Eq a => Eq (Unicode a) Source # | |
| Ord a => Ord (Unicode a) Source # | |
| Read a => Read (Unicode a) Source # | |
| Show a => Show (Unicode a) Source # | |
| Arbitrary (Unicode Char) Source # | |
| Arbitrary (Unicode [Char]) Source # | |
Generators
Helpers
Basic generators
planes :: [(Int, Gen Int)] Source #
A weighted list of generators that favours ASCII characters, followed by planes 0 and 1.
Predicates
Shrinking functions
shrinkChar :: Char -> [Char] Source #
Shrink a Unicode code point.