-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Data.Incremental with class(ILC) and basic instances (Map,Monoi…
…dMap,Total) tests. Added ILC instances for Core: Coin, UMap, DPState, DState, PState, UTxOState etc. Added ILC instances for (Diff DPState), (Diff DState) (Diff UTxOstate) etc. Add property tests for ILC invariants for every ILC instance. Rewrote the "POOL" STS rule to use differences (Diff PState), and all the POOL tests Added the Conway era HSpec test directory: eras/conway/impl/test
- Loading branch information
Showing
33 changed files
with
1,293 additions
and
70 deletions.
There are no files selected for viewing
This file contains 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 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 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module Main where | ||
|
||
import Test.Cardano.Ledger.Common | ||
import Test.Cardano.Ledger.Conway.DiffSpec (conwayDiffSpecs) | ||
|
||
main :: IO () | ||
main = | ||
ledgerTestMain $ | ||
describe "Conway tests" $ do | ||
conwayDiffSpecs |
31 changes: 31 additions & 0 deletions
31
eras/conway/impl/test/Test/Cardano/Ledger/Conway/DiffSpec.hs
This file contains 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{-# LANGUAGE TypeApplications #-} | ||
|
||
module Test.Cardano.Ledger.Conway.DiffSpec (conwayDiffSpecs) where | ||
|
||
import Cardano.Ledger.Conway (ConwayEra) | ||
import Cardano.Ledger.Conway.Governance | ||
import Cardano.Ledger.Crypto (StandardCrypto) | ||
import Test.Cardano.Data ( | ||
propExtend, | ||
propZero, | ||
) | ||
import Test.Cardano.Ledger.Common | ||
import Test.Cardano.Ledger.Conway.Arbitrary () | ||
|
||
-- ========================================================== | ||
|
||
conwayDiffSpecs :: Spec | ||
conwayDiffSpecs = describe "ILC Diff tests" $ do | ||
describe "Diff EnactState" $ do | ||
propZero (arbitrary @(EnactState (ConwayEra StandardCrypto))) | ||
propExtend (arbitrary @(EnactState (ConwayEra StandardCrypto))) arbitrary | ||
describe "Diff RatifyState" $ do | ||
propZero (arbitrary @(RatifyState (ConwayEra StandardCrypto))) | ||
propExtend (arbitrary @(RatifyState (ConwayEra StandardCrypto))) arbitrary | ||
describe "Diff GovernanceState" $ do | ||
propZero (arbitrary @(GovernanceState (ConwayEra StandardCrypto))) | ||
propExtend (arbitrary @(GovernanceState (ConwayEra StandardCrypto))) arbitrary | ||
|
||
-- To run theses tests in ghci, uncomment and type 'main' | ||
-- main :: IO () | ||
-- main = hspec $ conwayDiffSpecs |
This file contains 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 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 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 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 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.