Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- spec :: Spec
- shouldParseJSONAs :: forall a. (HasCallStack, FromJSON a) => LByteString -> Expectation
- roundtripFromAndToApi :: UTxO -> Property
- roundtripProtocolParameters :: PParams LedgerEra -> Property
- roundtripTxId :: Tx -> Property
- roundtripTxId' :: Tx -> Property
- roundtripLedger :: Tx -> Property
- roundtripCBOR :: (Eq a, Show a, ToCBOR a, FromCBOR a) => a -> Property
- appliesValidTransaction :: Property
- appliesValidTransactionFromJSON :: Property
- propDoesNotCollapse :: (Show (t a), Foldable t, Monoid (t a)) => String -> Gen (t a) -> Spec
- propRealisticValue :: Value -> Property
- propHasEnoughLovelace :: TxOut CtxUTxO -> Property
- propGeneratesGoodTxOut :: TxOut CtxUTxO -> Property
Documentation
shouldParseJSONAs :: forall a. (HasCallStack, FromJSON a) => LByteString -> Expectation Source #
roundtripFromAndToApi :: UTxO -> Property Source #
roundtripProtocolParameters :: PParams LedgerEra -> Property Source #
Test that the ProtocolParameters
To/FromJSON instances to roundtrip. Note
that we use the ledger PParams
type to generate values, but the cardano-api
type ProtocolParameters
is used for the serialization.
roundtripTxId :: Tx -> Property Source #
roundtripTxId' :: Tx -> Property Source #
roundtripLedger :: Tx -> Property Source #
roundtripCBOR :: (Eq a, Show a, ToCBOR a, FromCBOR a) => a -> Property Source #
appliesValidTransaction :: Property Source #
appliesValidTransactionFromJSON :: Property Source #
propDoesNotCollapse :: (Show (t a), Foldable t, Monoid (t a)) => String -> Gen (t a) -> Spec Source #
propRealisticValue :: Value -> Property Source #
A transaction or transaction output can usually only contain a realistic number of native asset entries. This property checks a realistic order of magnitude (100).
propHasEnoughLovelace :: TxOut CtxUTxO -> Property Source #
Check that an output has enough lovelace to cover asset deposits.
propGeneratesGoodTxOut :: TxOut CtxUTxO -> Property Source #
Check that the given TxOut
fulfills several requirements and does not use
unsupported features. See genTxOut
for rationale.