Skip to content

Commit a48864f

Browse files
authored
Merge pull request #5330 from IntersectMBO/td/delegspec-across-eras
Run Imp DELEG tests across eras
2 parents 3e45e26 + b065c65 commit a48864f

File tree

17 files changed

+403
-248
lines changed

17 files changed

+403
-248
lines changed

eras/allegra/impl/testlib/Test/Cardano/Ledger/Allegra/Imp.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ spec = do
2020
describe "AllegraImpSpec" . withEachEraVersion @era $
2121
UtxowSpec.spec
2222

23-
instance EraSpecificSpec AllegraEra
23+
instance EraSpecificSpec AllegraEra where
24+
eraSpecificSpec = ShelleyImp.shelleyEraSpecificSpec

eras/allegra/impl/testlib/Test/Cardano/Ledger/Allegra/ImpTest.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ instance ShelleyEraImp AllegraEra where
4343
modifyImpInitProtVer = shelleyModifyImpInitProtVer
4444
genRegTxCert = shelleyGenRegTxCert
4545
genUnRegTxCert = shelleyGenUnRegTxCert
46+
delegStakeTxCert = shelleyDelegStakeTxCert
4647

4748
impAllegraSatisfyNativeScript ::
4849
( ShelleyEraImp era

eras/alonzo/impl/testlib/Test/Cardano/Ledger/Alonzo/Imp.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import qualified Test.Cardano.Ledger.Alonzo.Imp.UtxowSpec as Utxow
1616
import Test.Cardano.Ledger.Alonzo.ImpTest
1717
import Test.Cardano.Ledger.Imp.Common
1818
import qualified Test.Cardano.Ledger.Mary.Imp as MaryImp
19+
import qualified Test.Cardano.Ledger.Shelley.Imp as ShelleyImp
1920

2021
spec ::
2122
forall era.
@@ -40,4 +41,5 @@ alonzoEraSpecificSpec = do
4041
Utxow.alonzoEraSpecificSpec
4142

4243
instance EraSpecificSpec AlonzoEra where
43-
eraSpecificSpec = alonzoEraSpecificSpec
44+
eraSpecificSpec =
45+
ShelleyImp.shelleyEraSpecificSpec >> alonzoEraSpecificSpec

eras/alonzo/impl/testlib/Test/Cardano/Ledger/Alonzo/ImpTest.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,7 @@ instance ShelleyEraImp AlonzoEra where
439439
modifyImpInitProtVer = shelleyModifyImpInitProtVer
440440
genRegTxCert = shelleyGenRegTxCert
441441
genUnRegTxCert = shelleyGenUnRegTxCert
442+
delegStakeTxCert = shelleyDelegStakeTxCert
442443

443444
instance MaryEraImp AlonzoEra
444445

eras/babbage/impl/testlib/Test/Cardano/Ledger/Babbage/Imp.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import qualified Test.Cardano.Ledger.Babbage.Imp.UtxosSpec as Utxos
1616
import qualified Test.Cardano.Ledger.Babbage.Imp.UtxowSpec as Utxow
1717
import Test.Cardano.Ledger.Babbage.ImpTest (BabbageEraImp)
1818
import Test.Cardano.Ledger.Imp.Common
19+
import qualified Test.Cardano.Ledger.Shelley.Imp as ShelleyImp
1920

2021
spec :: forall era. (BabbageEraImp era, EraSpecificSpec era) => Spec
2122
spec = do
@@ -28,4 +29,4 @@ spec = do
2829

2930
instance EraSpecificSpec BabbageEra where
3031
eraSpecificSpec =
31-
AlonzoImp.alonzoEraSpecificSpec
32+
ShelleyImp.shelleyEraSpecificSpec >> AlonzoImp.alonzoEraSpecificSpec

eras/babbage/impl/testlib/Test/Cardano/Ledger/Babbage/ImpTest.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ instance ShelleyEraImp BabbageEra where
6262
modifyImpInitProtVer = shelleyModifyImpInitProtVer
6363
genRegTxCert = shelleyGenRegTxCert
6464
genUnRegTxCert = shelleyGenUnRegTxCert
65+
delegStakeTxCert = shelleyDelegStakeTxCert
6566

6667
babbageFixupTx ::
6768
( HasCallStack

eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp.hs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,9 @@ conwayEraGenericSpec = do
7373

7474
conwayEraSpecificSpec :: SpecWith (ImpInit (LedgerSpec ConwayEra))
7575
conwayEraSpecificSpec = do
76-
describe "Conway era specific Imp spec" $
77-
describe "Certificates without deposits" $ do
78-
describe "DELEG" Deleg.conwayEraSpecificSpec
79-
describe "UTXO" Utxo.conwayEraSpecificSpec
76+
describe "Conway era specific Imp spec" $ do
77+
describe "DELEG" Deleg.conwayEraSpecificSpec
78+
describe "UTXO" Utxo.conwayEraSpecificSpec
8079

8180
instance EraSpecificSpec ConwayEra where
8281
eraSpecificSpec =

0 commit comments

Comments
 (0)