-
Notifications
You must be signed in to change notification settings - Fork 176
Start to re-organize test hierarchy: ImpSpec #5803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 5 additions & 12 deletions
17
eras/allegra/impl/testlib/Test/Cardano/Ledger/Allegra/Imp.hs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,30 +1,23 @@ | ||
| {-# LANGUAGE AllowAmbiguousTypes #-} | ||
| {-# LANGUAGE DataKinds #-} | ||
| {-# LANGUAGE FlexibleContexts #-} | ||
| {-# LANGUAGE ScopedTypeVariables #-} | ||
| {-# LANGUAGE TypeApplications #-} | ||
| {-# LANGUAGE TypeFamilies #-} | ||
| {-# LANGUAGE TypeOperators #-} | ||
| {-# OPTIONS_GHC -Wno-orphans #-} | ||
|
|
||
| module Test.Cardano.Ledger.Allegra.Imp (spec) where | ||
|
|
||
| import Cardano.Ledger.Allegra (AllegraEra) | ||
| import Cardano.Ledger.Core | ||
| import Cardano.Ledger.Shelley.Rules | ||
| import Test.Cardano.Ledger.Allegra.ImpTest | ||
| import Test.Cardano.Ledger.Imp.Common | ||
| import qualified Test.Cardano.Ledger.Shelley.Imp as ShelleyImp | ||
| import qualified Test.Cardano.Ledger.Shelley.Imp as Shelley | ||
|
|
||
| spec :: | ||
| forall era. | ||
| ( ShelleyEraImp era | ||
| , EraSpecificSpec era | ||
| , Event (EraRule "RUPD" era) ~ RupdEvent | ||
| ) => | ||
| proxy era -> | ||
| Spec | ||
| spec = do | ||
| ShelleyImp.spec @era | ||
|
|
||
| instance EraSpecificSpec AllegraEra where | ||
| eraSpecificSpec = ShelleyImp.shelleyEraSpecificSpec | ||
| spec era = do | ||
| Shelley.spec era | ||
| describe "AllegraEra Onwards" $ pure () | ||
|
lehins marked this conversation as resolved.
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 18 additions & 30 deletions
48
eras/alonzo/impl/testlib/Test/Cardano/Ledger/Alonzo/Imp.hs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,51 +1,39 @@ | ||
| {-# LANGUAGE AllowAmbiguousTypes #-} | ||
| {-# LANGUAGE DataKinds #-} | ||
| {-# LANGUAGE FlexibleContexts #-} | ||
| {-# LANGUAGE RankNTypes #-} | ||
| {-# LANGUAGE ScopedTypeVariables #-} | ||
| {-# LANGUAGE TypeApplications #-} | ||
| {-# LANGUAGE TypeOperators #-} | ||
| {-# OPTIONS_GHC -Wno-orphans #-} | ||
|
|
||
| module Test.Cardano.Ledger.Alonzo.Imp where | ||
|
|
||
| import Cardano.Ledger.Alonzo (AlonzoEra) | ||
| import Cardano.Ledger.Core | ||
| import Cardano.Ledger.Shelley.Core (ShelleyEraTxCert) | ||
| import Cardano.Ledger.Shelley.Rules | ||
| import qualified Test.Cardano.Ledger.Alonzo.Imp.BbodySpec as Bbody | ||
| import qualified Test.Cardano.Ledger.Alonzo.Imp.UtxoSpec as Utxo | ||
| import qualified Test.Cardano.Ledger.Alonzo.Imp.UtxosSpec as Utxos | ||
| import qualified Test.Cardano.Ledger.Alonzo.Imp.UtxowSpec as Utxow | ||
| import qualified Test.Cardano.Ledger.Alonzo.Imp.BbodySpec as BBODY | ||
| import qualified Test.Cardano.Ledger.Alonzo.Imp.UtxoSpec as UTXO | ||
| import qualified Test.Cardano.Ledger.Alonzo.Imp.UtxosSpec as UTXOS | ||
| import qualified Test.Cardano.Ledger.Alonzo.Imp.UtxowSpec as UTXOW | ||
| import Test.Cardano.Ledger.Alonzo.ImpTest | ||
| import Test.Cardano.Ledger.Imp.Common | ||
| import qualified Test.Cardano.Ledger.Mary.Imp as MaryImp | ||
| import qualified Test.Cardano.Ledger.Shelley.Imp as ShelleyImp | ||
| import qualified Test.Cardano.Ledger.Mary.Imp as Mary | ||
|
|
||
| spec :: | ||
| forall era. | ||
| ( AlonzoEraImp era | ||
| , EraSpecificSpec era | ||
| , Event (EraRule "RUPD" era) ~ RupdEvent | ||
| ) => | ||
| proxy era -> | ||
| Spec | ||
| spec = do | ||
| MaryImp.spec @era | ||
| describe "AlonzoImpSpec" . withEachEraVersion @era $ do | ||
| Bbody.spec | ||
| Utxo.spec | ||
| Utxos.spec | ||
| Utxow.spec | ||
| spec era = do | ||
| Mary.spec era | ||
| describe "AlonzoEra Onwards" $ withImpInitEachEraVersion era $ do | ||
| BBODY.spec | ||
| UTXO.spec | ||
| UTXOS.spec | ||
| UTXOW.spec | ||
|
|
||
| alonzoEraSpecificSpec :: | ||
| forall era. | ||
| (AlonzoEraImp era, ShelleyEraTxCert era) => | ||
| SpecWith (ImpInit (LedgerSpec era)) | ||
| alonzoEraSpecificSpec = do | ||
| describe "Alonzo era specific Imp spec" $ | ||
| describe "Certificates without deposits" $ do | ||
| Utxow.alonzoEraSpecificSpec | ||
|
|
||
| instance EraSpecificSpec AlonzoEra where | ||
| eraSpecificSpec = | ||
| ShelleyImp.shelleyEraSpecificSpec >> alonzoEraSpecificSpec | ||
| proxy era -> | ||
| Spec | ||
| alonzoEraSpecificSpec era = withImpInitEachEraVersion era $ do | ||
| describe "AlonzoEra Specific" $ do | ||
| UTXOW.alonzoEraSpecificSpec |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.