packages feed

genvalidity-hspec 0.7.0.3 → 0.7.0.4

raw patch · 5 files changed

+41/−26 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -2,6 +2,14 @@  ## [Unreleased] +## [0.7.0.3] - 2020-02-10++### Changed++* Removed doctests+* Improved the cabal file+* Fixed the `monadSpec` to not generate the list length using `genUnchecked`+ ## [0.7.0.2] - 2019-09-23  * Removed nonsense shrinking from `genValidSpec` and `genInvalidSpec`.
genvalidity-hspec.cabal view
@@ -1,13 +1,13 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.31.2.+-- This file has been generated from package.yaml by hpack version 0.33.0. -- -- see: https://github.com/sol/hpack ----- hash: 4517ade0d9cad5e659cb289f188395877a398f7a6e4621835f50d06570df018a+-- hash: f5acdda3f053861f0ebdb215817b65bc55fa4b9999a323a9875e7728b8b8f8f1  name:           genvalidity-hspec-version:        0.7.0.3+version:        0.7.0.4 synopsis:       Standard spec's for GenValidity instances description:    Note: There are companion packages for this library:                 .
src/Test/Validity/Monad.hs view
@@ -116,10 +116,10 @@         (unwords [nameOf @f, "of ints"])         ((+) <$> genUnchecked)         "increments"-        (do s <- abs <$> genUnchecked+        (do s <- genListLength             pure $ \b -> unGen gen (mkQCGen b) s)         "perturbations using the int"-        (do s <- abs <$> genUnchecked+        (do s <- genListLength             pure $ \b -> unGen gen (mkQCGen $ 2 * b) s)         "perturbations using the double the int"         (pure <$> ((+) <$> genUnchecked))
src/Test/Validity/Utils.hs view
@@ -34,9 +34,13 @@ import Test.Validity.Property.Utils  nameOf ::-       forall a. Typeable a-    => String-nameOf = show $ typeRep (Proxy @a)+     forall a. Typeable a+  => String+nameOf =+  let s = show $ typeRep (Proxy @a)+   in if ' ' `elem` s+        then "(" ++ s ++ ")"+        else s  genDescr ::        forall a. Typeable a
test/Test/Validity/ShrinkingSpec.hs view
@@ -4,25 +4,28 @@  import Test.Hspec +import Data.Int+import Data.Ratio+ import Test.Validity.Shrinking  spec :: Spec spec = do-    shrinkValiditySpec @Rational-    shrinkValidSpec @Int-    shrinkInvalidSpec @Rational-    describe "shrinkUncheckedPreservesValidOnGenValid" $ do-        it "Rational" $ shrinkValidPreservesValidOnGenValid @Rational-        it "[Rational]" $ shrinkValidPreservesValidOnGenValid @[Rational]-    describe "shrinkValidPreservesValidOnGenValid" $ do-        it "Rational" $ shrinkValidPreservesValidOnGenValid @Rational-        it "[Rational]" $ shrinkValidPreservesValidOnGenValid @[Rational]-    describe "shrinkInvalidPreservesInvalidOnGenInvalid" $ do-        it "Rational" $ shrinkInvalidPreservesInvalidOnGenInvalid @Rational-        it "[Rational]" $ shrinkInvalidPreservesInvalidOnGenInvalid @[Rational]-    describe "shrinkUncheckedDoesNotShrinkToItself" $ do-        it "Int" $ shrinkUncheckedDoesNotShrinkToItself @Int-        it "[Int]" $ shrinkUncheckedDoesNotShrinkToItself @[Int]-    describe "shrinkValidDoesNotShrinkToItself" $ do-        it "Rational" $ shrinkValidDoesNotShrinkToItself @Rational-        it "[Rational]" $ shrinkValidDoesNotShrinkToItself @[Rational]+  shrinkValiditySpec @(Ratio Int8)+  shrinkValidSpec @Int+  shrinkInvalidSpec @(Ratio Int8)+  describe "shrinkUncheckedPreservesValidOnGenValid" $ do+    it "Ordering" $ shrinkValidPreservesValidOnGenValid @Ordering+    it "[Ordering]" $ shrinkValidPreservesValidOnGenValid @[Ordering]+  describe "shrinkValidPreservesValidOnGenValid" $ do+    it "Ordering" $ shrinkValidPreservesValidOnGenValid @Ordering+    it "[Ordering]" $ shrinkValidPreservesValidOnGenValid @[Ordering]+  describe "shrinkInvalidPreservesInvalidOnGenInvalid" $ do+    it "Ordering" $ shrinkInvalidPreservesInvalidOnGenInvalid @(Ratio Int8)+    it "[Ordering]" $ shrinkInvalidPreservesInvalidOnGenInvalid @[Ratio Int8]+  describe "shrinkUncheckedDoesNotShrinkToItself" $ do+    it "Int" $ shrinkUncheckedDoesNotShrinkToItself @Int+    it "[Int]" $ shrinkUncheckedDoesNotShrinkToItself @[Int]+  describe "shrinkValidDoesNotShrinkToItself" $ do+    it "Ordering" $ shrinkValidDoesNotShrinkToItself @Ordering+    it "[Ordering]" $ shrinkValidDoesNotShrinkToItself @[Ordering]