cardano-ledger-binary-1.5.0.0: Binary serialization library used throughout ledger
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Cardano.Ledger.Binary.Vintage.Helpers

Synopsis

Documentation

Binary test helpers

data U Source #

Instances

Instances details
Arbitrary U Source # 
Instance details

Defined in Test.Cardano.Ledger.Binary.Vintage.Helpers

Methods

arbitraryGen U Source #

shrinkU → [U] Source #

Show U Source # 
Instance details

Defined in Test.Cardano.Ledger.Binary.Vintage.Helpers

Methods

showsPrecIntUShowS Source #

showUString Source #

showList ∷ [U] → ShowS Source #

DecCBOR U Source # 
Instance details

Defined in Test.Cardano.Ledger.Binary.Vintage.Helpers

Methods

decCBORDecoder s U Source #

dropCBORProxy UDecoder s () Source #

labelProxy UText Source #

EncCBOR U Source # 
Instance details

Defined in Test.Cardano.Ledger.Binary.Vintage.Helpers

Methods

encCBORUEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy USize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [U] → Size Source #

Eq U Source # 
Instance details

Defined in Test.Cardano.Ledger.Binary.Vintage.Helpers

Methods

(==)UUBool Source #

(/=)UUBool Source #

data U24 Source #

Like U, but we expect to read back the Cbor Data Item when decoding.

Instances

Instances details
Show U24 Source # 
Instance details

Defined in Test.Cardano.Ledger.Binary.Vintage.Helpers

Methods

showsPrecIntU24ShowS Source #

showU24String Source #

showList ∷ [U24] → ShowS Source #

DecCBOR U24 Source # 
Instance details

Defined in Test.Cardano.Ledger.Binary.Vintage.Helpers

EncCBOR U24 Source # 
Instance details

Defined in Test.Cardano.Ledger.Binary.Vintage.Helpers

Methods

encCBORU24Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy U24Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [U24] → Size Source #

Eq U24 Source # 
Instance details

Defined in Test.Cardano.Ledger.Binary.Vintage.Helpers

Methods

(==)U24U24Bool Source #

(/=)U24U24Bool Source #

extensionProperty ∷ ∀ a. (Arbitrary a, Eq a, Show a, DecCBOR a, EncCBOR 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

cborFlatTermValidEncCBOR a ⇒ a → Property Source #

Machinery to test we perform "flat" encoding.

Static size estimates

data SizeTestConfig a Source #

Configuration for a single test case.

Constructors

SizeTestConfig 

Fields

cfgBuildable a ⇒ SizeTestConfig a Source #

Default configuration, for Buildable types.

scfgShow a ⇒ SizeTestConfig a Source #

Default configuration, for Showable types.

sizeTest ∷ ∀ a. EncCBOR a ⇒ SizeTestConfig a → Property Source #

Create a test case from the given test configuration.