QuickCheck 2.15 → 2.15.0.1
raw patch · 4 files changed
+15/−6 lines, 4 filesdep ~randomPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: random
API changes (from Hackage documentation)
Files
- QuickCheck.cabal +2/−2
- src/Test/QuickCheck/Property.hs +1/−0
- src/Test/QuickCheck/Test.hs +7/−4
- tests/DiscardRatio.hs +5/−0
QuickCheck.cabal view
@@ -1,5 +1,5 @@ Name: QuickCheck-Version: 2.15+Version: 2.15.0.1 Cabal-Version: >= 1.10 Build-type: Simple License: BSD3@@ -65,7 +65,7 @@ source-repository this type: git location: https://github.com/nick8325/quickcheck- tag: 2.15+ tag: 2.15.0.1 flag templateHaskell Description: Build Test.QuickCheck.All, which uses Template Haskell.
src/Test/QuickCheck/Property.hs view
@@ -659,6 +659,7 @@ #ifndef NO_DEEPSEQ s `deepseq` #endif+ b `seq` mapTotalResult $ \res -> res { classes = (s, b):classes res }
src/Test/QuickCheck/Test.hs view
@@ -403,10 +403,13 @@ } showTestCount :: State -> String-showTestCount st =- number (numSuccessTests st) "test"- ++ concat [ "; " ++ show (numDiscardedTests st) ++ " discarded"- | numDiscardedTests st > 0+showTestCount st = formatTestCount (numSuccessTests st) (numDiscardedTests st)++formatTestCount :: Int -> Int -> String+formatTestCount succeeded discarded =+ number succeeded "test"+ ++ concat [ "; " ++ show discarded ++ " discarded"+ | discarded > 0 ] runATest :: State -> Property -> IO Result
tests/DiscardRatio.hs view
@@ -49,3 +49,8 @@ putStrLn "\nExpecting success (discard ratio 40): x < 50 ==> True" quickCheckYes $ withDiscardRatio 40 p50 quickCheckYesWith stdArgs{maxDiscardRatio = 40} p50++ -- Annoying interactions of discard and cover+ quickCheckYes $ forAllBlind (oneof [return True, return discard]) $ \ b -> cover 10 b "b" True+ quickCheck $ cover 10 discard "b" True+ quickCheck $ classify discard "b" True