{-# OPTIONS_GHC -Wno-orphans #-}
module Test.Ouroboros.Storage.LedgerDB.OrphanArbitrary () where
import Ouroboros.Consensus.Config.SecurityParam (SecurityParam (..))
import Test.QuickCheck
instance Arbitrary SecurityParam where
arbitrary :: Gen SecurityParam
arbitrary = Word64 -> SecurityParam
SecurityParam (Word64 -> SecurityParam) -> Gen Word64 -> Gen SecurityParam
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Word64, Word64) -> Gen Word64
forall a. Random a => (a, a) -> Gen a
choose (Word64
0, Word64
6)
shrink :: SecurityParam -> [SecurityParam]
shrink (SecurityParam Word64
k) = Word64 -> SecurityParam
SecurityParam (Word64 -> SecurityParam) -> [Word64] -> [SecurityParam]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Word64 -> [Word64]
forall a. Arbitrary a => a -> [a]
shrink Word64
k