cardano-ledger-babbage-1.15.0.0: Cardano ledger introducing refrence scripts and inline datums
Safe HaskellNone
LanguageHaskell2010

Test.Cardano.Ledger.Babbage.Binary.Golden

Synopsis

Documentation

cborAnnGoldenSpec Source #

Arguments

∷ (Eq a, Show a, ToCBOR a, DecCBOR (Annotator a), HasCallStack) 
⇒ (FilePath → IO FilePath)

Action to get the full path, usually will be Paths_package_name.getDataFileName

→ FilePath

File path to the golden file relative to the root of the package

→ Version

Protocol version to be used for decoding

→ a

Value, which in an encoded form will be expected to produce the same contents as in the golden file.

→ Spec 

Check ToCBOR golden spec as well as roundtripping of the golden example with DecCBOR for its Annotator version.

cborGoldenSpec Source #

Arguments

∷ (Eq a, Show a, EncCBOR a, DecCBOR a, HasCallStack) 
⇒ (FilePath → IO FilePath)

Action to get the full path, usually will be Paths_package_name.getDataFileName

→ FilePath

File path to the golden file relative to the root of the package

→ Version

Protocol version to be used for encoding

→ a

Value, which in an encoded form will be expected to produce the same contents as in the golden file.

→ Spec 

Check EncCBOR golden spec as well as roundtripping of the golden example with DecCBOR

expectDecoderResultOn ∷ (DecCBOR (Annotator a), Eq b, HasCallStack, Show b) ⇒ Version → Enc → a → (a → b) → Expectation Source #

expectDecoderSuccessAnnWith ∷ (DecCBOR (Annotator a), HasCallStack, Show a, Eq a) ⇒ (a → a → Bool) → Version → Enc → a → Expectation Source #

goldenForEncCBOR Source #

Arguments

∷ EncCBOR a 
⇒ FilePath

Path to the golden file relative to the package

→ Version

Protocol version to be used for encoding

→ a

Value, which in an encoded form will be expected to produce the same contents as in the golden file.

→ Golden ByteString 

Golden specification for EncCBOR

goldenForHashHex Source #

Arguments

∷ FilePath

Path to the golden file relative to the root of the package

→ Hash h a

Hash value to compare against the golden file

→ Golden String 

Golden specification for a cryptographic hash, stored as a hex string

goldenForToCBOR Source #

Arguments

∷ ToCBOR a 
⇒ FilePath

Path to the golden file relative to the root of the package

→ a

Value, which in an encoded form will be expected to produce the same contents as in the golden file.

→ Golden ByteString 

Golden specification for ToCBOR