Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
PlutusTx.Test.Run.Code
Synopsis
- module PlutusTx.Eval
- evaluationResultMatchesHaskell ∷ Lift DefaultUni hask ⇒ CompiledCode a → (∀ r. (Eq r, Show r) ⇒ r → r → k) → hask → k
- assertEvaluatesSuccessfully ∷ CompiledCode a → Assertion
- assertEvaluatesWithError ∷ CompiledCode a → Assertion
- assertResult ∷ TestName → CompiledCode Bool → TestNested
Documentation
module PlutusTx.Eval
evaluationResultMatchesHaskell ∷ Lift DefaultUni hask ⇒ CompiledCode a → (∀ r. (Eq r, Show r) ⇒ r → r → k) → hask → k Source #
Evaluate CompiledCode
and check that the result matches a given Haskell value
(perhaps obtained by running the Haskell code that the term was compiled
from). We evaluate the lifted Haskell value as well, because lifting may
produce reducible terms. The function is polymorphic in the comparison
operator so that we can use it with both HUnit Assertions and QuickCheck
Properties.