chell-quickcheck 0.2 → 0.2.1
raw patch · 2 files changed
+22/−4 lines, 2 filesdep ~QuickCheckPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: QuickCheck
API changes (from Hackage documentation)
Files
- chell-quickcheck.cabal +3/−3
- lib/Test/Chell/QuickCheck.hs +19/−1
chell-quickcheck.cabal view
@@ -1,5 +1,5 @@ name: chell-quickcheck-version: 0.2+version: 0.2.1 license: MIT license-file: license.txt author: John Millikin <jmillikin@gmail.com>@@ -19,7 +19,7 @@ source-repository this type: bazaar location: https://john-millikin.com/branches/chell-quickcheck/0.2/- tag: chell-quickcheck_0.2+ tag: chell-quickcheck_0.2.1 library hs-source-dirs: lib@@ -28,7 +28,7 @@ build-depends: base >= 4.0 && < 5.0 , chell >= 0.3 && < 0.4- , QuickCheck >= 2.3 && < 2.5+ , QuickCheck >= 2.3 && < 2.6 , random exposed-modules:
lib/Test/Chell/QuickCheck.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE CPP #-}+ module Test.Chell.QuickCheck ( property ) where@@ -32,7 +34,8 @@ let state = State.MkState { State.terminal = term , State.maxSuccessTests = QuickCheck.maxSuccess args- , State.maxDiscardedTests = QuickCheck.maxDiscard args+ , State.maxDiscardedTests = maxDiscardedTests args prop+ , State.computeSize = computeSize (QuickCheck.maxSize args) (QuickCheck.maxSuccess args) , State.numSuccessTests = 0 , State.numDiscardedTests = 0@@ -41,6 +44,12 @@ , State.randomSeed = mkStdGen seed , State.numSuccessShrinks = 0 , State.numTryShrinks = 0+#if MIN_VERSION_QuickCheck(2,5,0)+ , State.numTotTryShrinks = 0+#endif+#if MIN_VERSION_QuickCheck(2,5,1)+ , State.numRecentlyDiscardedTests = 0+#endif } result <- Test.test state (Gen.unGen (QuickCheck.property prop))@@ -66,3 +75,12 @@ roundTo :: Int -> Int -> Int roundTo n m = (n `div` m) * m++maxDiscardedTests :: QuickCheck.Testable prop => QuickCheck.Args -> prop -> Int+#if MIN_VERSION_QuickCheck(2,5,0)+maxDiscardedTests args p = if QuickCheck.exhaustive p+ then QuickCheck.maxDiscardRatio args+ else QuickCheck.maxDiscardRatio args * QuickCheck.maxSuccess args+#else+maxDiscardedTests args _ = QuickCheck.maxDiscard args+#endif