Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data U
- data U24
- extensionProperty ∷ ∀ a. (Arbitrary a, Eq a, Show a, FromCBOR a, ToCBOR a) ⇒ Property
- cborFlatTermValid ∷ ToCBOR a ⇒ a → Property
- data SizeTestConfig a = SizeTestConfig {
- debug ∷ a → String
- gen ∷ Gen a
- precise ∷ Bool
- addlCtx ∷ Map TypeRep SizeOverride
- computedCtx ∷ a → Map TypeRep SizeOverride
- cfg ∷ Buildable a ⇒ SizeTestConfig a
- scfg ∷ Show a ⇒ SizeTestConfig a
- sizeTest ∷ ∀ a. ToCBOR a ⇒ SizeTestConfig a → Property
Binary test helpers
Like U
, but we expect to read back the Cbor Data Item when decoding.
extensionProperty ∷ ∀ a. (Arbitrary a, Eq a, Show a, FromCBOR a, ToCBOR a) ⇒ Property Source #
Given a data type which can be extended, verify we can indeed do so without breaking anything. This should work with every time which adopted the schema of having at least one constructor of the form: .... | Unknown Word8 ByteString
cborFlatTermValid ∷ ToCBOR a ⇒ a → Property Source #
Machinery to test we perform "flat" encoding.
Static size estimates
data SizeTestConfig a Source #
Configuration for a single test case.
SizeTestConfig | |
|
cfg ∷ Buildable a ⇒ SizeTestConfig a Source #
Default configuration, for Buildable
types.
scfg ∷ Show a ⇒ SizeTestConfig a Source #
Default configuration, for Show
able types.