plutarch-testlib-1.0.0
Safe HaskellSafe-Inferred
LanguageGHC2021

Plutarch.Test.Laws

Synopsis

Documentation

checkLedgerPropertiesValue :: TestTree Source #

Like checkLedgerProperties but specialized to PValue

This is an ugly kludge because PValue doesn't have a direct PData conversion, and bringing one in would break too much other stuff to be worth it.

@since WIP

checkLedgerPropertiesAssocMap :: TestTree Source #

Like checkLedgerProperties but specialized to PMap

Same as above

@since WIP

checkLedgerProperties :: forall (a :: S -> Type). (Typeable a, PLiftable a, PTryFrom PData a, Eq (AsHaskell a), PIsData a, ToData (AsHaskell a), Arbitrary (AsHaskell a), Pretty (AsHaskell a), Show (AsHaskell a)) => TestTree Source #

@since WIP

checkLedgerPropertiesPCountable :: forall (a :: S -> Type). (Typeable a, PCountable a, Arbitrary (AsHaskell a), Pretty (AsHaskell a), Eq (AsHaskell a), Show (AsHaskell a), PLiftable a) => TestTree Source #

@since WIP

checkLedgerPropertiesPEnumerable :: forall (a :: S -> Type). (Typeable a, PEnumerable a, Arbitrary (AsHaskell a), Pretty (AsHaskell a), Eq (AsHaskell a), PLiftable a) => TestTree Source #

@since WIP

checkHaskellOrdEquivalent :: forall (plutarchInput :: S -> Type). (PLiftable plutarchInput, Pretty (AsHaskell plutarchInput), Arbitrary (AsHaskell plutarchInput), Typeable (AsHaskell plutarchInput), Ord (AsHaskell plutarchInput), Typeable plutarchInput, POrd plutarchInput) => TestTree Source #

@since WIP

checkHaskellNumEquivalent :: forall (plutarchInput :: S -> Type). (PLiftable plutarchInput, Pretty (AsHaskell plutarchInput), Arbitrary (AsHaskell plutarchInput), Eq (AsHaskell plutarchInput), Typeable (AsHaskell plutarchInput), Num (AsHaskell plutarchInput), Typeable plutarchInput, PIntegralDomain plutarchInput) => TestTree Source #

checkPLiftableLaws :: forall (a :: S -> Type). (Arbitrary (AsHaskell a), Pretty (AsHaskell a), Eq (AsHaskell a), PLiftable a, Show (AsHaskell a)) => [TestTree] Source #

Verifies that the specified Plutarch and Haskell types satisfy the laws of PLiftable.

@since WIP

checkPOrdLaws :: forall (a :: S -> Type). (Arbitrary (AsHaskell a), Pretty (AsHaskell a), PLiftable a, POrd a) => [TestTree] Source #

Verifies that the specified Plutarch type satisfies the POrd laws for mandatory methods.

@since WIP