Copyright | No rights reserved |
---|---|
License | MIT |
Maintainer | jprupp@protonmail.ch |
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- arbitraryBS :: Gen ByteString
- arbitraryBS1 :: Gen ByteString
- arbitraryBSn :: Int -> Gen ByteString
- arbitraryBSS :: Gen ShortByteString
- arbitraryBSS1 :: Gen ShortByteString
- arbitraryBSSn :: Int -> Gen ShortByteString
- arbitraryMaybe :: Gen a -> Gen (Maybe a)
- arbitraryNetwork :: Gen Network
- arbitraryUTCTime :: Gen UTCTime
- data ReadBox = forall a.(Read a, Show a, Eq a, Typeable a) => ReadBox (Gen a)
- data JsonBox = forall a.(Show a, Eq a, Typeable a, ToJSON a, FromJSON a) => JsonBox (Gen a)
- data MarshalJsonBox = forall s a.(Show a, Show s, Eq a, Typeable a, MarshalJSON s a) => MarshalJsonBox (Gen (s, a))
- data SerialBox = forall a.(Show a, Eq a, Typeable a, Serial a) => SerialBox (Gen a)
- data MarshalBox = forall s a.(Show a, Show s, Eq a, Typeable a, Marshal s a) => MarshalBox (Gen (s, a))
- data IdentityTests = IdentityTests {
- readTests :: [ReadBox]
- jsonTests :: [JsonBox]
- marshalJsonTests :: [MarshalJsonBox]
- serialTests :: [SerialBox]
- marshalTests :: [MarshalBox]
- testIdentity :: IdentityTests -> Spec
- testSerial :: (Eq a, Show a, Typeable a, Serial a) => Gen a -> Spec
- testRead :: (Eq a, Read a, Show a, Typeable a) => Gen a -> Spec
- testJson :: (Eq a, Show a, Typeable a, ToJSON a, FromJSON a) => Gen a -> Spec
Documentation
arbitraryBS :: Gen ByteString Source #
Arbitrary strict ByteString
.
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
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 MarshalJsonBox Source #
forall s a.(Show a, Show s, Eq a, Typeable a, MarshalJSON s a) => MarshalJsonBox (Gen (s, a)) |
data MarshalBox Source #
data IdentityTests Source #
IdentityTests | |
|
Instances
Default IdentityTests Source # | |
Defined in Haskoin.Util.Arbitrary.Util def :: IdentityTests # |
testIdentity :: IdentityTests -> Spec Source #
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