haskoin-core-0.20.4: Bitcoin & Bitcoin Cash library for Haskell
CopyrightNo rights reserved
LicenseMIT
Maintainerjprupp@protonmail.ch
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Haskoin.Util.Arbitrary.Util

Description

 
Synopsis

Documentation

arbitraryBS1 :: Gen ByteString Source #

Arbitrary non-empty strict ByteString

arbitraryBSn :: Int -> Gen ByteString Source #

Arbitrary strict ByteString of a given length

arbitraryBSS :: Gen ShortByteString Source #

Arbitrary ShortByteString.

arbitraryBSS1 :: Gen ShortByteString Source #

Arbitrary non-empty ShortByteString

arbitraryBSSn :: Int -> Gen ShortByteString Source #

Arbitrary ShortByteString of a given length

arbitraryMaybe :: Gen a -> Gen (Maybe a) Source #

Generate a Maybe from a Gen a

arbitraryNetwork :: Gen Network Source #

Generate an Network

arbitraryUTCTime :: Gen UTCTime Source #

Arbitrary UTCTime that generates dates after 01 Jan 1970 01:00:00 CET

data SerialBox Source #

Constructors

forall a.(Show a, Eq a, Typeable a, Serial a) => SerialBox (Gen a) 

data JsonBox Source #

Constructors

forall a.(Show a, Eq a, Typeable a, ToJSON a, FromJSON a) => JsonBox (Gen a) 

data NetBox Source #

Constructors

forall a.(Show a, Eq a, Typeable a) => NetBox (Network -> a -> Value, Network -> a -> Encoding, Network -> Value -> Parser a, Gen (Network, a)) 

data ReadBox Source #

Constructors

forall a.(Read a, Show a, Eq a, Typeable a) => ReadBox (Gen a) 

testSerial :: (Eq a, Show a, Typeable a, Serial a) => Gen a -> Spec Source #

Generate binary identity tests

testRead :: (Eq a, Read a, Show a, Typeable a) => Gen a -> Spec Source #

Generate Read/Show identity tests

testJson :: (Eq a, Show a, Typeable a, ToJSON a, FromJSON a) => Gen a -> Spec Source #

Generate Data.Aeson identity tests

testNetJson :: (Eq a, Show a, Typeable a) => (Network -> a -> Value) -> (Network -> a -> Encoding) -> (Network -> Value -> Parser a) -> Gen (Network, a) -> Spec Source #

Generate Data.Aeson identity tests for type that need the Network