Skip to content

Commit 7fc74f4

Browse files
committed
Add Era module to Shelley testlib
1 parent b05dd52 commit 7fc74f4

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

eras/shelley/impl/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
* `vsDRepsL` moved to Conway
2222
* `vsCommitteeStateL` moved to Conway
2323

24+
### `testlib`
25+
26+
* Added `Era` module with `ShelleyEraTest` class
27+
2428
## 1.16.0.0
2529

2630
* Add `ShelleyInstantStake`, `shelleyInstantStakeCredentialsL`, `addShelleyInstantStake`, `deleteShelleyInstantStake`, `resolveShelleyInstantStake`

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ library testlib
141141
Test.Cardano.Ledger.Shelley.Binary.RoundTrip
142142
Test.Cardano.Ledger.Shelley.CDDL
143143
Test.Cardano.Ledger.Shelley.Constants
144+
Test.Cardano.Ledger.Shelley.Era
144145
Test.Cardano.Ledger.Shelley.Imp
145146
Test.Cardano.Ledger.Shelley.Imp.EpochSpec
146147
Test.Cardano.Ledger.Shelley.Imp.LedgerSpec
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{-# LANGUAGE FlexibleContexts #-}
2+
{-# LANGUAGE UndecidableSuperClasses #-}
3+
{-# OPTIONS_GHC -Wno-orphans #-}
4+
5+
module Test.Cardano.Ledger.Shelley.Era (
6+
EraTest,
7+
ShelleyEraTest,
8+
) where
9+
10+
import Cardano.Ledger.Shelley
11+
import Cardano.Ledger.Shelley.LedgerState
12+
import Cardano.Ledger.Shelley.Scripts
13+
import Data.Default
14+
import Test.Cardano.Ledger.Common
15+
import Test.Cardano.Ledger.Era
16+
import Test.Cardano.Ledger.Shelley.Arbitrary ()
17+
import Test.Cardano.Ledger.Shelley.TreeDiff ()
18+
19+
class
20+
( EraTest era
21+
, ShelleyEraScript era
22+
, Eq (StashedAVVMAddresses era)
23+
, Show (StashedAVVMAddresses era)
24+
, ToExpr (StashedAVVMAddresses era)
25+
, NFData (StashedAVVMAddresses era)
26+
, Default (StashedAVVMAddresses era)
27+
, Arbitrary (StashedAVVMAddresses era)
28+
) =>
29+
ShelleyEraTest era
30+
31+
instance EraTest ShelleyEra
32+
33+
instance ShelleyEraTest ShelleyEra

0 commit comments

Comments
 (0)