cardano-ledger-core-1.21.0.0: Core components of Cardano ledgers from the Shelley release on.
Safe HaskellNone
LanguageHaskell2010

Test.Cardano.Ledger.Core.Binary

Synopsis

Documentation

decoderEquivalenceSpec ∷ (Eq t, ToCBOR t, DecCBOR (Annotator t), Arbitrary t, Show t) ⇒ VersionVersionSpec Source #

Generates arbitrary values, encodes them, and verifies that decoding with `DecCBOR (Annotator)` produces the same result as decoding with DecCBOR.

type Mem t = Annotator (MemoBytes t) Source #

Useful when deriving DecCBOR(Annotator T) deriving via (Mem T) instance DecCBOR (Annotator T)

fullAnnCddlSpec ∷ (Eq a, Show a, Arbitrary a, EncCBOR a, DecCBOR a, DecCBOR (Annotator a), HasCallStack) ⇒ VersionTextSpecWith HuddleEnv Source #

Full CDDL codec spec for types with both plain and Annotator decoders.

fullAnnGenCddlSpec ∷ (Eq a, Show a, EncCBOR a, DecCBOR a, DecCBOR (Annotator a), HasCallStack) ⇒ Gen a → VersionTextSpecWith HuddleEnv Source #

Like fullAnnCddlSpec but with a custom generator.

fullCddlSpec ∷ (Eq a, Show a, Arbitrary a, EncCBOR a, DecCBOR a, HasCallStack) ⇒ VersionTextSpecWith HuddleEnv Source #

CDDL codec spec for types with only plain decoders (no Annotator).

fullGenCddlSpec ∷ (Eq a, Show a, EncCBOR a, DecCBOR a, HasCallStack) ⇒ Gen a → VersionTextSpecWith HuddleEnv Source #

Like fullCddlSpec but with a custom generator.