Skip to content

Commit

Permalink
Alonzo tests transitioned
Browse files Browse the repository at this point in the history
  • Loading branch information
lehins committed Dec 1, 2022
1 parent 365bc9b commit 550d5c0
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 14 deletions.
6 changes: 4 additions & 2 deletions eras/alonzo/test-suite/cardano-ledger-alonzo-test.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,10 @@ library
cardano-ledger-binary:{cardano-ledger-binary, testlib},
cardano-ledger-core,
cardano-ledger-pretty,
cardano-ledger-allegra,
cardano-ledger-shelley,
cardano-ledger-shelley-test,
cardano-ledger-shelley-ma,
cardano-ledger-mary,
cardano-ledger-shelley-ma-test,
cardano-protocol-tpraos,
cardano-slotting,
Expand Down Expand Up @@ -100,11 +101,12 @@ test-suite cardano-ledger-alonzo-test
aeson >= 2,
base16-bytestring,
bytestring,
cardano-ledger-allegra,
cardano-ledger-alonzo,
cardano-ledger-alonzo-test,
cardano-ledger-binary:{cardano-ledger-binary, testlib},
cardano-ledger-core,
cardano-ledger-shelley-ma,
cardano-ledger-mary,
cardano-ledger-shelley-ma-test,
cardano-protocol-tpraos,
cardano-slotting,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
module Test.Cardano.Ledger.Alonzo.AlonzoEraGen where

import Cardano.Ledger.Address (Addr (..))
import Cardano.Ledger.Allegra.Scripts (Timelock (..), translateTimelock)
import Cardano.Ledger.Allegra.TxAuxData (AllegraTxAuxData (..))
import Cardano.Ledger.Alonzo (AlonzoEra)
import Cardano.Ledger.Alonzo.Data (AlonzoTxAuxData (..), Data (..), mkAlonzoTxAuxData)
import Cardano.Ledger.Alonzo.Language (Language (..))
Expand Down Expand Up @@ -78,9 +80,6 @@ import Cardano.Ledger.Mary.Value
import Cardano.Ledger.Pretty.Alonzo ()
import Cardano.Ledger.Shelley.PParams (Update)
import Cardano.Ledger.Shelley.TxBody (DCert, Wdrl)
import Cardano.Ledger.ShelleyMA.AuxiliaryData (AllegraTxAuxData (..))
import Cardano.Ledger.ShelleyMA.Era ()
import Cardano.Ledger.ShelleyMA.Timelocks (Timelock (..), translateTimelock)
import Cardano.Ledger.TxIn (TxIn)
import Cardano.Ledger.UTxO
( EraUTxO (..),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

module Test.Cardano.Ledger.Alonzo.Examples.Consensus where

import Cardano.Ledger.Allegra.Scripts (Timelock (..), ValidityInterval (..))
import Cardano.Ledger.Alonzo (Alonzo)
import Cardano.Ledger.Alonzo.Data
( AuxiliaryDataHash (..),
Expand Down Expand Up @@ -40,7 +41,6 @@ import Cardano.Ledger.Shelley.API
)
import Cardano.Ledger.Shelley.Rules (ShelleyDelegsPredFailure (..), ShelleyLedgerPredFailure (..))
import Cardano.Ledger.Shelley.Tx (ShelleyTx (..))
import Cardano.Ledger.ShelleyMA.Timelocks (Timelock (..), ValidityInterval (..))
import Cardano.Ledger.TxIn (mkTxInPartial)
import Cardano.Ledger.UTxO (makeWitnessesVKey)
import Cardano.Slotting.Slot (EpochNo (..), SlotNo (..))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

module Test.Cardano.Ledger.Alonzo.Serialisation.Generators where

import Cardano.Ledger.Allegra.Scripts (ValidityInterval (..))
import Cardano.Ledger.Alonzo (AlonzoEra)
import Cardano.Ledger.Alonzo.Data
( AlonzoTxAuxData (..),
Expand Down Expand Up @@ -65,7 +66,6 @@ import Cardano.Ledger.Keys (KeyHash)
import Cardano.Ledger.Mary.Value (MultiAsset)
import Cardano.Ledger.Shelley.PParams (Update)
import Cardano.Ledger.Shelley.TxBody (DCert, Wdrl)
import Cardano.Ledger.ShelleyMA.Timelocks (ValidityInterval (..))
import Cardano.Ledger.TxIn (TxIn)
import Cardano.Ledger.Val (DecodeNonNegative, Val)
import Cardano.Slotting.Slot (SlotNo)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Cardano.Ledger.Alonzo (Alonzo)
import Cardano.Ledger.Alonzo.Data (Data)
import Cardano.Ledger.Alonzo.TxWits (AlonzoTxWits, Redeemers)
import Cardano.Ledger.Core
import qualified Cardano.Ledger.ShelleyMA.Timelocks as MA
import Cardano.Ledger.Allegra.Scripts
import qualified Data.ByteString.Lazy as BSL
import Paths_cardano_ledger_alonzo_test
import Test.Cardano.Ledger.Shelley.Serialisation.CDDLUtils
Expand All @@ -26,7 +26,7 @@ tests n = withResource combinedCDDL (const (pure ())) $ \cddl ->
[ cddlTest @(Value Alonzo) (eraProtVerHigh @Alonzo) n "coin",
cddlAnnotatorTest @(TxBody Alonzo) (eraProtVerHigh @Alonzo) n "transaction_body",
cddlAnnotatorTest @(TxAuxData Alonzo) (eraProtVerHigh @Alonzo) n "auxiliary_data",
cddlAnnotatorTest @(MA.Timelock Alonzo) (eraProtVerHigh @Alonzo) n "native_script",
cddlAnnotatorTest @(Timelock Alonzo) (eraProtVerHigh @Alonzo) n "native_script",
cddlAnnotatorTest @(Data Alonzo) (eraProtVerHigh @Alonzo) n "plutus_data",
cddlTest @(TxOut Alonzo) (eraProtVerHigh @Alonzo) n "transaction_output",
cddlAnnotatorTest @(AlonzoTxWits Alonzo) (eraProtVerHigh @Alonzo) n "transaction_witness_set",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ import Cardano.Ledger.Binary (ToCBOR (..))
import Cardano.Ledger.Core
import Cardano.Ledger.Mary (Mary)
import qualified Cardano.Ledger.Shelley.API as API
import Cardano.Ledger.ShelleyMA.AuxiliaryData (AllegraTxAuxData)
import Cardano.Ledger.ShelleyMA.TxBody (MATxBody)
import Data.Typeable (Typeable)
import Test.Cardano.Ledger.AllegraEraGen ()
import Test.Cardano.Ledger.Binary.RoundTrip
Expand All @@ -48,12 +46,12 @@ alonzoEncodeDecodeTests =
testGroup
"encoded mary types can be decoded as alonzo types"
[ testProperty "decoding auxilliary" $
embedTripAnnExpectation @(AllegraTxAuxData Mary) @(TxAuxData Alonzo)
embedTripAnnExpectation @(TxAuxData Mary) @(TxAuxData Alonzo)
(eraProtVerLow @Mary)
(eraProtVerLow @Alonzo)
(\_ _ -> pure ()),
testProperty "decoding txbody" $
embedTripAnnExpectation @(MATxBody Mary) @(TxBody Alonzo)
embedTripAnnExpectation @(TxBody Mary) @(TxBody Alonzo)
(eraProtVerLow @Mary)
(eraProtVerLow @Alonzo)
(\_ _ -> pure ()),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module Test.Cardano.Ledger.Alonzo.TxInfo where

import Cardano.Ledger.Address (Addr (..), BootstrapAddress (..))
import Cardano.Ledger.Allegra.Scripts (ValidityInterval (..))
import Cardano.Ledger.Alonzo (Alonzo)
import Cardano.Ledger.Alonzo.PParams ()
import Cardano.Ledger.Alonzo.Tx (AlonzoTx (..), IsValid (..))
Expand All @@ -13,7 +14,6 @@ import Cardano.Ledger.Credential (StakeReference (..))
import Cardano.Ledger.Crypto (StandardCrypto)
import Cardano.Ledger.Language (Language (..))
import Cardano.Ledger.Shelley.TxBody (Wdrl (..))
import Cardano.Ledger.ShelleyMA.Timelocks (ValidityInterval (..))
import Cardano.Ledger.TxIn (TxIn (..), mkTxInPartial)
import Cardano.Ledger.UTxO (UTxO (..))
import qualified Cardano.Ledger.Val as Val
Expand Down

0 comments on commit 550d5c0

Please sign in to comment.