packages feed

hedgehog-quickcheck 0.1 → 0.1.1

raw patch · 5 files changed

+29/−17 lines, 5 filesdep ~QuickCheckdep ~hedgehogdep ~transformersPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: QuickCheck, hedgehog, transformers

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,9 +1,9 @@ ## Version 0.1 (2017-07-16) -- Initial release ([#103][103], [@jystic][jystic])+- Initial release ([#103][103], [@jacobstanley][jacobstanley]) -[jystic]:-  https://github.com/jystic+[jacobstanley]:+  https://github.com/jacobstanley  [103]:   https://github.com/hedgehogqa/haskell-hedgehog/pull/103
LICENSE view
@@ -1,4 +1,4 @@-Copyright 2017, Jacob Stanley+Copyright 2017-2018, Jacob Stanley All Rights Reserved.  Redistribution and use in source and binary forms, with or without
hedgehog-quickcheck.cabal view
@@ -1,9 +1,7 @@-version: 0.1+version: 0.1.1  name:   hedgehog-quickcheck-license:-  BSD3 author:   Jacob Stanley maintainer:@@ -16,6 +14,14 @@   Use QuickCheck generators in Hedgehog and vice versa. description:   Use QuickCheck generators in Hedgehog and vice versa.+  .+  Hedgehog is a modern property-based testing system, in the spirit of+  QuickCheck. Hedgehog uses integrated shrinking, so shrinks obey the+  invariants of generated values by construction.+  .+  To get started quickly, see the examples:+  <https://github.com/hedgehogqa/haskell-hedgehog/tree/master/hedgehog-+ category:   Testing license:@@ -31,6 +37,15 @@   , GHC == 7.10.3   , GHC == 8.0.1   , GHC == 8.0.2+  , GHC == 8.2.2+  , GHC == 8.4.1+  , GHC == 8.4.2+  , GHC == 8.4.3+  , GHC == 8.4.4+  , GHC == 8.6.1+  , GHC == 8.6.2+  , GHC == 8.6.3+  , GHC == 8.6.4 extra-source-files:   README.md   CHANGELOG.md@@ -42,8 +57,8 @@ library   build-depends:       base                            >= 3          && < 5-    , hedgehog                        >= 0.5        && < 0.6-    , QuickCheck                      >= 2.7        && < 2.11+    , hedgehog                        >= 0.5        && < 1.1+    , QuickCheck                      >= 2.7        && < 2.14     , transformers                    >= 0.4        && < 0.6    ghc-options:
src/Hedgehog/Gen/QuickCheck.hs view
@@ -16,7 +16,7 @@  seedQCGen :: MonadGen m => m QuickCheck.QCGen seedQCGen =-  QuickCheck.mkQCGen <$> Gen.lift (Gen.integral_ Range.constantBounded)+  QuickCheck.mkQCGen <$> fromGenT (Gen.integral_ Range.constantBounded)  -- | Create a Hedgehog 'Gen' from a QuickCheck 'QuickCheck.Gen'. --
src/Test/QuickCheck/Hedgehog.hs view
@@ -4,13 +4,10 @@     hedgehog   ) where -import           Control.Monad.Trans.Maybe (runMaybeT)-import           Data.Functor.Identity (runIdentity)- import           Hedgehog-import           Hedgehog.Internal.Gen (runGenT)+import           Hedgehog.Internal.Gen (evalGen) import qualified Hedgehog.Internal.Seed as Seed-import           Hedgehog.Internal.Tree (Tree(..), Node(..))+import           Hedgehog.Internal.Tree (treeValue)  import qualified Test.QuickCheck as QuickCheck @@ -33,10 +30,10 @@       else do         seed <- genSeed         size <- QuickCheck.sized (pure . fromIntegral)-        case runIdentity . runMaybeT . runTree $ runGenT size seed gen of+        case evalGen size seed gen of           Nothing ->             loop (n - 1)           Just x ->-            pure $ nodeValue x+            pure $ treeValue x   in     loop (100 :: Int)