packages feed

number-length 0.2.0.0 → 0.2.1.0

raw patch · 7 files changed

+32/−9 lines, 7 filesdep +quickcheck-instancesPVP ok

version bump matches the API change (PVP)

Dependencies added: quickcheck-instances

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -1,6 +1,12 @@ # ChangeLog / ReleaseNotes  +## Version 0.2.1.0++* Depend on `quickcheck-instances` to provide `instance Arbitrary Natural` for+  unit tests. (**minor change**)++ ## Version 0.2.0.0  * Instances for `Integer` and `Natural`.
number-length.cabal view
@@ -1,5 +1,5 @@ name:                   number-length-version:                0.2.0.0+version:                0.2.1.0 synopsis:   Number of digits in a number in decimal and hexadecimal representation. description:@@ -102,6 +102,9 @@     other-modules:         TestCase.Data.NumberLength.Natural       , Data.NumberLength.Natural+    build-depends:+        quickcheck-instances >=0.3.15 && <1+        -- ^ Version 0.3.15 is the first that contains instances for Natural.    build-depends:       base >=4.5 && <5@@ -184,4 +187,4 @@ source-repository this   type:                 git   location:             git://github.com/trskop/number-length.git-  tag:                  v0.2.0.0+  tag:                  v0.2.1.0
test/TestCase/Data/NumberLength.hs view
@@ -3,7 +3,7 @@ -- | -- Module:       $HEADER$ -- Description:  TODO--- Copyright:    (c) 2015-2016, Peter Trško+-- Copyright:    (c) 2015-2018, Peter Trško -- License:      BSD3 -- -- Stability:    experimental@@ -29,6 +29,9 @@ import Test.Framework.Providers.HUnit (testCase) import Test.Framework.Providers.QuickCheck2 (testProperty) import Test.HUnit ((@?=))+#ifdef HAVE_NATURAL+import Test.QuickCheck.Instances ()+#endif  import Data.NumberLength     ( BoundedNumberLength(maxNumberLength, maxNumberLengthHex)
test/TestCase/Data/NumberLength/Int.hs view
@@ -2,7 +2,7 @@ -- | -- Module:       $HEADER$ -- Description:  TODO--- Copyright:    (c) 2015-2016, Peter Trško+-- Copyright:    (c) 2015-2018, Peter Trško -- License:      BSD3 -- -- Stability:    experimental@@ -176,6 +176,7 @@  property_lengthInt :: Int -> Bool property_lengthInt = lengthInt <==> numberLengthDec+{-# ANN property_lengthInt "HLint: ignore Use camelCase" #-}  -- }}} lengthInt -------------------------------------------------------------- -- }}} Decimal ----------------------------------------------------------------@@ -252,6 +253,7 @@  property_lengthIntHex :: Int -> Bool property_lengthIntHex = lengthIntHex <==> numberLengthHex+{-# ANN property_lengthIntHex "HLint: ignore Use camelCase" #-}  -- }}} lengthIntHex ----------------------------------------------------------- -- }}} Hexadecimal ------------------------------------------------------------
test/TestCase/Data/NumberLength/Integer.hs view
@@ -2,7 +2,7 @@ -- | -- Module:       $HEADER$ -- Description:  TODO--- Copyright:    (c) 2015-2016, Peter Trško+-- Copyright:    (c) 2015-2018, Peter Trško -- License:      BSD3 -- -- Stability:    experimental@@ -95,8 +95,10 @@ test_lengthInteger n = lengthInteger n @?= numberLengthDec n test_lengthIntegerHex n = lengthIntegerHex n @?= numberLengthHex n -property_lengthInteger :: Integer -> Bool+property_lengthInteger, property_lengthIntegerHex :: Integer -> Bool+ property_lengthInteger = lengthInteger <==> numberLengthDec+{-# ANN property_lengthInteger "HLint: ignore Use camelCase" #-} -property_lengthIntegerHex :: Integer -> Bool property_lengthIntegerHex = lengthIntegerHex <==> numberLengthHex+{-# ANN property_lengthIntegerHex "HLint: ignore Use camelCase" #-}
test/TestCase/Data/NumberLength/Natural.hs view
@@ -2,7 +2,7 @@ -- | -- Module:       $HEADER$ -- Description:  TODO--- Copyright:    (c) 2015-2016, Peter Trško+-- Copyright:    (c) 2015-2018, Peter Trško -- License:      BSD3 -- -- Stability:    experimental@@ -33,6 +33,7 @@ import Test.Framework.Providers.HUnit (testCase) import Test.Framework.Providers.QuickCheck2 (testProperty) import Test.HUnit (Assertion, (@?=))+import Test.QuickCheck.Instances ()  import Data.NumberLength.Natural     ( lengthNatural@@ -84,5 +85,9 @@ test_lengthNaturalHex n = lengthNaturalHex n @?= numberLengthHex n  property_lengthNatural, property_lengthNaturalHex :: Natural -> Bool+ property_lengthNatural = lengthNatural <==> numberLengthDec+{-# ANN property_lengthNatural "HLint: ignore Use camelCase" #-}+ property_lengthNaturalHex = lengthNaturalHex <==> numberLengthHex+{-# ANN property_lengthNaturalHex "HLint: ignore Use camelCase" #-}
test/TestCase/Data/NumberLength/Word.hs view
@@ -2,7 +2,7 @@ -- | -- Module:       $HEADER$ -- Description:  TODO--- Copyright:    (c) 2015-2016, Peter Trško+-- Copyright:    (c) 2015-2018, Peter Trško -- License:      BSD3 -- -- Stability:    experimental@@ -164,6 +164,7 @@  property_lengthWord :: Word -> Bool property_lengthWord = lengthWord <==> numberLength+{-# ANN property_lengthWord "HLint: ignore Use camelCase" #-}  -- }}} lengthWord ------------------------------------------------------------- -- }}} Decimal ----------------------------------------------------------------@@ -237,6 +238,7 @@  property_lengthWordHex :: Word -> Bool property_lengthWordHex = lengthWordHex <==> numberLengthHex+{-# ANN property_lengthWordHex "HLint: ignore Use camelCase" #-}  -- }}} lengthWordHex ---------------------------------------------------------- -- }}} Hexadecimal ------------------------------------------------------------