packages feed

quickcheck-special 0.1.0.4 → 0.1.0.5

raw patch · 2 files changed

+20/−8 lines, 2 filesdep ~QuickCheckPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: QuickCheck

API changes (from Hackage documentation)

Files

quickcheck-special.cabal view
@@ -1,9 +1,9 @@--- This file has been generated from package.yaml by hpack version 0.15.0.+-- This file has been generated from package.yaml by hpack version 0.17.0. -- -- see: https://github.com/sol/hpack  name:           quickcheck-special-version:        0.1.0.4+version:        0.1.0.5 synopsis:       Edge cases and special values for QuickCheck Arbitrary instances description:    The standard Arbitrary instances of QuickCheck don't generate special values. This is fixed by this package which provides the newtype Special with an Arbitrary instance. The special values are given by the SpecialValues typeclass. category:       Testing@@ -29,7 +29,7 @@   build-depends:       base < 6     , bytestring >= 0.9 && < 0.11-    , QuickCheck >= 2.1 && < 2.10+    , QuickCheck >= 2.1 && < 2.11     , scientific >= 0.2 && < 0.4     , text       >= 0.7 && < 1.3     , ieee754    >= 0.8 && < 0.9
src/Test/QuickCheck/Special.hs view
@@ -59,17 +59,17 @@ instance SpecialValues Double where specialValues = specialIEEE  instance SpecialValues Integer where-  specialValues = [ 0, 1, -1+  specialValues = [ 0, 1, -1, 2, -2                   , fromIntegral (minBound :: Int64)  - 1                   , fromIntegral (maxBound :: Int64)  + 1                   , fromIntegral (maxBound :: Word64) + 1                   ]  instance SpecialValues Natural where-  specialValues = [ 0, 1, fromIntegral (maxBound :: Word64) + 1 ]+  specialValues = [ 0, 1, 2, fromIntegral (maxBound :: Word64) + 1 ]  instance SpecialValues Rational where-  specialValues = [ 0, 1, -1, 0 % 1, - 0 % 1]+  specialValues = [ 0, 1, -1, 2, -2, 0 % 1, - 0 % 1]  instance SpecialValues Char where   specialValues = specialBoundedEnum ++ "\0\a\b\f\n\r\t\v\'\"\\aä "@@ -115,10 +115,22 @@  specialIEEE :: IEEE a => [a] specialIEEE = list ++ map negate list-  where list = [nan, 0, 1, epsilon, infinity, minDenormal, minNormal, maxFinite]+  where list = [ nan, 0, 1, epsilon, infinity+               , minDenormal, succIEEE minDenormal+               , minNormal, succIEEE minNormal+               , succIEEE minNormal+               , maxFinite, predIEEE maxFinite+               , 0x1000000, predIEEE 0x1000000, succIEEE 0x1000000 -- Integer range representable by Float+               , 0x20000000000000, predIEEE 0x20000000000000, succIEEE 0x20000000000000 -- Integer range representable by Double+               , 0x7FFFFFFFFFFFFC00, predIEEE 0x7FFFFFFFFFFFFC00, succIEEE 0x7FFFFFFFFFFFFC00 -- Largest Int64 value representable by Double+               , 0x8000000000000000, predIEEE 0x8000000000000000, succIEEE 0x8000000000000000 -- Largest Word64 value representable by Float and Double+               , 0x7000000000000000, predIEEE 0x7000000000000000, succIEEE 0x7000000000000000 -- Largest Int64 value representable by Float+               , 0x7000000, predIEEE 0x7000000, succIEEE 0x7000000 -- Largest Int32 value representable by Float and Double+               , 0x8000000, predIEEE 0x8000000, succIEEE 0x8000000 -- Largest Word32 value representable by Float and Double+               ]  specialInt :: (Num a, Bounded a) => [a]-specialInt = [0, 1, -1, minBound, maxBound, minBound + 1, maxBound - 1]+specialInt = [0, 1, -1, 2, -2, minBound, maxBound, minBound + 1, maxBound - 1, minBound + 2, maxBound - 2]  specialBoundedEnum :: (Enum a, Bounded a) => [a] specialBoundedEnum = [minBound, maxBound, succ minBound, pred maxBound]