quickcheck-unicode 1.0.0.1 → 1.0.1.0
raw patch · 2 files changed
+20/−6 lines, 2 files
Files
- Test/QuickCheck/Unicode.hs +17/−3
- quickcheck-unicode.cabal +3/−3
Test/QuickCheck/Unicode.hs view
@@ -2,7 +2,7 @@ -- | -- Module : Test.QuickCheck.Unicode--- Copyright : (c) 2014 Bryan O'Sullivan+-- Copyright : (c) 2014-2017 Bryan O'Sullivan -- License : BSD-style -- Maintainer : bos@serpentine.com -- Stability : stable@@ -28,9 +28,11 @@ -- * Generators , char , string+ , string1 -- ** Helpers , list+ , list1 -- ** Basic generators , planes@@ -74,11 +76,23 @@ string :: Gen String string = list char +-- | Generate a non-empty list of Unicode code points.+string1 :: Gen String+string1 = list char+ -- | Generate a list of values. list :: Gen a -> Gen [a]-list gen =+list gen = listN 0 gen++-- | Generate a non-empty list of values.+list1 :: Gen a -> Gen [a]+list1 gen = listN 1 gen++-- | Generate a list of at least /n/ values.+listN :: Int -> Gen a -> Gen [a]+listN m gen = sized $ \n ->- do k <- choose (0,n)+ do k <- choose (m,n) vectorOf k gen -- | Shrink a Unicode code point.
quickcheck-unicode.cabal view
@@ -1,16 +1,16 @@ name: quickcheck-unicode-version: 1.0.0.1+version: 1.0.1.0 homepage: https://github.com/bos/quickcheck-unicode bug-reports: https://github.com/bos/quickcheck-unicode/issues synopsis: Generator and shrink functions for testing Unicode-related software. description: Generator and shrink functions for testing Unicode-related software.-license: BSD3+license: BSD2 license-file: LICENSE author: Bryan O'Sullivan <bos@serpentine.com> maintainer: Bryan O'Sullivan <bos@serpentine.com>-copyright: 2014 Bryan O'Sullivan+copyright: 2014-2017 Bryan O'Sullivan category: Testing, Text build-type: Simple cabal-version: >= 1.8