Skip to content

Commit

Permalink
Added generic (Era agnostic tests) in Test.Cardano.Ledger.Generic pac…
Browse files Browse the repository at this point in the history
…kage

Meant to someday replace Test.Cardano.Ledger.Properties
Add many PrettyA instances for UTXOW UTXO UTXOS PPUP predicate failures.
Cleaned up the broken Policy type.
  • Loading branch information
TimSheard committed Feb 15, 2022
1 parent bc622cc commit d0b9428
Show file tree
Hide file tree
Showing 9 changed files with 2,204 additions and 263 deletions.
10 changes: 5 additions & 5 deletions libs/cardano-ledger-pretty/src/Cardano/Ledger/Pretty/Alonzo.hs
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,11 @@ ppTxWitness :: (Era era, PrettyA (Core.Script era)) => TxWitness era -> PDoc
ppTxWitness (TxWitness' vk wb sc da (Redeemers rd)) =
ppRecord
"TxWitness"
[ ("txwitsVKey", ppSet ppWitVKey vk),
("txwitsBoot", ppSet ppBootstrapWitness wb),
("txscripts", ppMap ppScriptHash prettyA sc),
("txdats", ppMap ppSafeHash ppData (unTxDats da)),
("txrdmrs", ppMap ppRdmrPtr (ppPair ppData ppExUnits) rd)
[ ("keys", ppSet ppWitVKey vk),
("bootstrap witnesses", ppSet ppBootstrapWitness wb),
("scripts map", ppMap ppScriptHash prettyA sc),
("Data map", ppMap ppSafeHash ppData (unTxDats da)),
("Redeemer map", ppMap ppRdmrPtr (ppPair ppData ppExUnits) rd)
]

instance
Expand Down
2 changes: 2 additions & 0 deletions libs/cardano-ledger-test/cardano-ledger-test.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ library
Test.Cardano.Ledger.Generic.Proof
Test.Cardano.Ledger.Generic.Scriptic
Test.Cardano.Ledger.Generic.Updaters
Test.Cardano.Ledger.Generic.PrettyCore
Test.Cardano.Ledger.Generic.Properties
Test.Cardano.Ledger.Model.API
Test.Cardano.Ledger.Model.Acnt
Test.Cardano.Ledger.Model.BaseTypes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ exampleTx :: Core.Tx A
exampleTx =
let pf = Alonzo Mock
in newTx
override
pf
[ Body (validatingBody pf),
WitnessesI
Expand Down
Loading

0 comments on commit d0b9428

Please sign in to comment.