module Test.Hspec.Core.QuickCheck (
modifyArgs
, modifyMaxSuccess
, modifyMaxDiscardRatio
, modifyMaxSize
, modifyMaxShrinks
) where
import Prelude ()
import Test.Hspec.Core.Compat
import Test.QuickCheck
import Test.Hspec.Core.Spec
modifyMaxSuccess :: (Int -> Int) -> SpecWith a -> SpecWith a
modifyMaxSuccess :: forall a. (Int -> Int) -> SpecWith a -> SpecWith a
modifyMaxSuccess = (Args -> Args) -> SpecWith a -> SpecWith a
forall a. (Args -> Args) -> SpecWith a -> SpecWith a
modifyArgs ((Args -> Args) -> SpecWith a -> SpecWith a)
-> ((Int -> Int) -> Args -> Args)
-> (Int -> Int)
-> SpecWith a
-> SpecWith a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Int -> Int) -> Args -> Args
modify
where
modify :: (Int -> Int) -> Args -> Args
modify :: (Int -> Int) -> Args -> Args
modify Int -> Int
f Args
args = Args
args {maxSuccess = f (maxSuccess args)}
modifyMaxDiscardRatio :: (Int -> Int) -> SpecWith a -> SpecWith a
modifyMaxDiscardRatio :: forall a. (Int -> Int) -> SpecWith a -> SpecWith a
modifyMaxDiscardRatio = (Args -> Args) -> SpecWith a -> SpecWith a
forall a. (Args -> Args) -> SpecWith a -> SpecWith a
modifyArgs ((Args -> Args) -> SpecWith a -> SpecWith a)
-> ((Int -> Int) -> Args -> Args)
-> (Int -> Int)
-> SpecWith a
-> SpecWith a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Int -> Int) -> Args -> Args
modify
where
modify :: (Int -> Int) -> Args -> Args
modify :: (Int -> Int) -> Args -> Args
modify Int -> Int
f Args
args = Args
args {maxDiscardRatio = f (maxDiscardRatio args)}
modifyMaxSize :: (Int -> Int) -> SpecWith a -> SpecWith a
modifyMaxSize :: forall a. (Int -> Int) -> SpecWith a -> SpecWith a
modifyMaxSize = (Args -> Args) -> SpecWith a -> SpecWith a
forall a. (Args -> Args) -> SpecWith a -> SpecWith a
modifyArgs ((Args -> Args) -> SpecWith a -> SpecWith a)
-> ((Int -> Int) -> Args -> Args)
-> (Int -> Int)
-> SpecWith a
-> SpecWith a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Int -> Int) -> Args -> Args
modify
where
modify :: (Int -> Int) -> Args -> Args
modify :: (Int -> Int) -> Args -> Args
modify Int -> Int
f Args
args = Args
args {maxSize = f (maxSize args)}
modifyMaxShrinks :: (Int -> Int) -> SpecWith a -> SpecWith a
modifyMaxShrinks :: forall a. (Int -> Int) -> SpecWith a -> SpecWith a
modifyMaxShrinks = (Args -> Args) -> SpecWith a -> SpecWith a
forall a. (Args -> Args) -> SpecWith a -> SpecWith a
modifyArgs ((Args -> Args) -> SpecWith a -> SpecWith a)
-> ((Int -> Int) -> Args -> Args)
-> (Int -> Int)
-> SpecWith a
-> SpecWith a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Int -> Int) -> Args -> Args
modify
where
modify :: (Int -> Int) -> Args -> Args
modify :: (Int -> Int) -> Args -> Args
modify Int -> Int
f Args
args = Args
args {maxShrinks = f (maxShrinks args)}
modifyArgs :: (Args -> Args) -> SpecWith a -> SpecWith a
modifyArgs :: forall a. (Args -> Args) -> SpecWith a -> SpecWith a
modifyArgs = (Params -> Params) -> SpecWith a -> SpecWith a
forall a. (Params -> Params) -> SpecWith a -> SpecWith a
modifyParams ((Params -> Params) -> SpecWith a -> SpecWith a)
-> ((Args -> Args) -> Params -> Params)
-> (Args -> Args)
-> SpecWith a
-> SpecWith a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Args -> Args) -> Params -> Params
modify
where
modify :: (Args -> Args) -> Params -> Params
modify :: (Args -> Args) -> Params -> Params
modify Args -> Args
f Params
p = Params
p {paramsQuickCheckArgs = f (paramsQuickCheckArgs p)}