hspec-core 2.5.7 → 2.5.8
raw patch · 2 files changed
+13/−4 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Test.Hspec.Core.QuickCheck: modifyArgs :: (Args -> Args) -> SpecWith a -> SpecWith a
+ Test.Hspec.Core.QuickCheck: modifyMaxShrinks :: (Int -> Int) -> SpecWith a -> SpecWith a
Files
- hspec-core.cabal +2/−2
- src/Test/Hspec/Core/QuickCheck.hs +11/−2
hspec-core.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: aad8baed239fa77de8e6985c3f9589ef910687c7b0e9a6eed0dcf32ca3faf146+-- hash: 2816c495eba299470f8178ab0162b41c33ff43fdd8c7d53ed3743386b018f184 name: hspec-core-version: 2.5.7+version: 2.5.8 license: MIT license-file: LICENSE copyright: (c) 2011-2018 Simon Hengel,
src/Test/Hspec/Core/QuickCheck.hs view
@@ -1,9 +1,10 @@ -- | Stability: provisional module Test.Hspec.Core.QuickCheck (- modifyMaxSuccess+ modifyArgs+, modifyMaxSuccess , modifyMaxDiscardRatio , modifyMaxSize-+, modifyMaxShrinks ) where import Test.QuickCheck@@ -30,6 +31,14 @@ modify :: (Int -> Int) -> Args -> Args modify f args = args {maxSize = f (maxSize args)} +-- | Use a modified `maxShrinks` for given spec.+modifyMaxShrinks :: (Int -> Int) -> SpecWith a -> SpecWith a+modifyMaxShrinks = modifyArgs . modify+ where+ modify :: (Int -> Int) -> Args -> Args+ modify f args = args {maxShrinks = f (maxShrinks args)}++-- | Use modified `Args` for given spec. modifyArgs :: (Args -> Args) -> SpecWith a -> SpecWith a modifyArgs = modifyParams . modify where