plutus-tx-1.48.0.0: Libraries for Plutus Tx and its prelude
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusTx.Test.Golden

Synopsis

TH CodGen

goldenCodeGenPpr a ⇒ TestNameQ a → ExpQ Source #

Compilation testing

goldenPir ∷ (PrettyUni uni, Pretty fun, uni `Everywhere` Flat, Flat fun) ⇒ TestNameCompiledCodeIn uni fun a → TestNested Source #

Does not print uniques.

goldenPirReadable ∷ (PrettyUni uni, Pretty fun, uni `Everywhere` Flat, Flat fun) ⇒ TestNameCompiledCodeIn uni fun a → TestNested Source #

Does not print uniques.

goldenPirReadableU ∷ (PrettyUni uni, Pretty fun, uni `Everywhere` Flat, Flat fun) ⇒ TestNameCompiledCodeIn uni fun a → TestNested Source #

Prints uniques. This should be used sparingly: a simple change to a script or a compiler pass may change all uniques, making it difficult to see the actual change if all uniques are printed. It is nonetheless useful sometimes.

Golden evaluation testing

Combined testing

Pretty-printing

prettyBudgetExBudgetSizeIntegerDoc ann Source #

This function formats budget and size information.

Given a UPLC program, there are two quantification of "size": Term size and Flat size. Term Size measures AST nodes of the given UPLC program. Flat Size measures the number of bytes when the given program serialized into bytestring using binary flat encoding format.

Cost of storing smart contract onchain is partially determined by the Flat size. So it is useful to have Flat size measurement in case we adopt new or introduce optimizations to the flat encoding format.