Skip to content

Commit e1613ba

Browse files
committed
Made Conway GoldenSpec era-specific
1 parent 5e87a58 commit e1613ba

File tree

10 files changed

+935
-7
lines changed

10 files changed

+935
-7
lines changed

eras/conway/impl/cardano-ledger-conway.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ library testlib
135135
Test.Cardano.Ledger.Conway.Era
136136
Test.Cardano.Ledger.Conway.Genesis
137137
Test.Cardano.Ledger.Conway.GenesisSpec
138-
Test.Cardano.Ledger.Conway.GoldenSpec
139138
Test.Cardano.Ledger.Conway.GovActionReorderSpec
140139
Test.Cardano.Ledger.Conway.Imp
141140
Test.Cardano.Ledger.Conway.Imp.BbodySpec
@@ -250,6 +249,7 @@ test-suite tests
250249
Paths_cardano_ledger_conway
251250
Test.Cardano.Ledger.Conway.Binary.CddlSpec
252251
Test.Cardano.Ledger.Conway.GoldenTranslation
252+
Test.Cardano.Ledger.Conway.GoldenSpec
253253

254254
default-language: Haskell2010
255255
ghc-options:

eras/conway/impl/test/Main.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import Cardano.Ledger.Conway.Tx (tierRefScriptFee)
88
import Test.Cardano.Ledger.Common
99
import qualified Test.Cardano.Ledger.Conway.Binary.CddlSpec as Cddl
1010
import qualified Test.Cardano.Ledger.Conway.GenesisSpec as Genesis
11+
import qualified Test.Cardano.Ledger.Conway.GoldenSpec as GoldenSpec
1112
import qualified Test.Cardano.Ledger.Conway.GoldenTranslation as GoldenTranslation
1213
import qualified Test.Cardano.Ledger.Conway.GovActionReorderSpec as GovActionReorder
1314
import Test.Cardano.Ledger.Conway.Plutus.PlutusSpec as PlutusSpec
@@ -24,6 +25,7 @@ main = ledgerTestMain $ do
2425
describe "Plutus" $ do
2526
PlutusSpec.spec
2627
Cddl.spec
28+
GoldenSpec.spec
2729
describe "Various tests for functions defined in Conway" $ do
2830
prop "tierRefScriptFee is a linear function when growth is 1" $ \(Positive sizeIncrement) baseFee (NonNegative size) ->
2931
tierRefScriptFee 1 sizeIncrement baseFee size

eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/GoldenSpec.hs renamed to eras/conway/impl/test/Test/Cardano/Ledger/Conway/GoldenSpec.hs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ module Test.Cardano.Ledger.Conway.GoldenSpec (spec) where
66

77
import Paths_cardano_ledger_conway (getDataFileName)
88
import Test.Cardano.Ledger.Common
9-
import Test.Cardano.Ledger.Conway.Era (ConwayEraTest)
9+
import Test.Cardano.Ledger.Conway.Era ()
1010
import Test.Cardano.Ledger.Core.JSON (goldenJsonPParamsSpec, goldenJsonPParamsUpdateSpec)
11+
import Cardano.Ledger.Conway (ConwayEra)
1112

12-
spec :: forall era. ConwayEraTest era => Spec
13+
spec :: Spec
1314
spec =
1415
describe "Golden" $ do
1516
beforeAll (getDataFileName "golden/pparams.json") $
16-
goldenJsonPParamsSpec @era
17+
goldenJsonPParamsSpec @ConwayEra
1718
beforeAll (getDataFileName "golden/pparams-update.json") $
18-
goldenJsonPParamsUpdateSpec @era
19+
goldenJsonPParamsUpdateSpec @ConwayEra

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ import qualified Test.Cardano.Ledger.Conway.Binary.Regression as Regression
6161
import qualified Test.Cardano.Ledger.Conway.BinarySpec as Binary
6262
import qualified Test.Cardano.Ledger.Conway.CommitteeRatifySpec as CommitteeRatify
6363
import qualified Test.Cardano.Ledger.Conway.DRepRatifySpec as DRepRatify
64-
import qualified Test.Cardano.Ledger.Conway.GoldenSpec as Golden
6564
import qualified Test.Cardano.Ledger.Conway.Imp as Imp
6665
import Test.Cardano.Ledger.Conway.ImpTest (ConwayEraImp)
6766
import qualified Test.Cardano.Ledger.Conway.Proposals as Proposals
@@ -114,7 +113,6 @@ spec ::
114113
Spec
115114
spec =
116115
describe "Conway features" $ do
117-
Golden.spec @era
118116
Proposals.spec @era
119117
Binary.spec @era
120118
DRepRatify.spec @era

eras/dijkstra/cardano-ledger-dijkstra.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ test-suite tests
134134
hs-source-dirs: test
135135
other-modules:
136136
Paths_cardano_ledger_dijkstra
137+
Test.Cardano.Ledger.Dijkstra.GoldenSpec
137138

138139
default-language: Haskell2010
139140
ghc-options:

0 commit comments

Comments
 (0)