Skip to content

Commit 6c69b19

Browse files
committed
storage-test: move TestBlock to testlib
1 parent 705c40b commit 6c69b19

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

ouroboros-consensus/ouroboros-consensus.cabal

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,7 @@ library unstable-consensus-testlib
383383
Test.Ouroboros.Consensus.ChainGenerator.Some
384384
Test.Ouroboros.Consensus.DiffusionPipelining
385385
Test.Ouroboros.Consensus.Protocol
386+
Test.Ouroboros.Storage.TestBlock
386387
Test.QuickCheck.Extras
387388
Test.Util.BoolProps
388389
Test.Util.ChainDB
@@ -453,6 +454,7 @@ library unstable-consensus-testlib
453454
fs-api ^>=0.3,
454455
fs-sim ^>=0.3,
455456
generics-sop,
457+
hashable,
456458
io-classes,
457459
io-sim,
458460
mempack,
@@ -735,10 +737,8 @@ test-suite storage-test
735737
aeson,
736738
base,
737739
bifunctors,
738-
binary,
739740
bytestring,
740741
cardano-binary,
741-
cardano-crypto-class ^>=2.2,
742742
cardano-ledger-binary:testlib,
743743
cardano-ledger-core:{cardano-ledger-core, testlib},
744744
cardano-slotting:{cardano-slotting, testlib},
@@ -753,7 +753,6 @@ test-suite storage-test
753753
fs-api ^>=0.3,
754754
fs-sim ^>=0.3,
755755
generics-sop,
756-
hashable,
757756
io-classes,
758757
io-sim,
759758
mempack,

ouroboros-consensus/test/storage-test/Test/Ouroboros/Storage/TestBlock.hs renamed to ouroboros-consensus/src/unstable-consensus-testlib/Test/Ouroboros/Storage/TestBlock.hs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ import qualified Ouroboros.Network.Mock.Chain as Chain
125125
import System.FS.API.Lazy
126126
import Test.Cardano.Slotting.Numeric ()
127127
import Test.Cardano.Slotting.TreeDiff ()
128-
import Test.Ouroboros.Storage.ChainDB.Model
129128
import Test.QuickCheck
130129
import Test.Util.Orphans.Arbitrary ()
131130
import Test.Util.Orphans.SignableRepresentation ()
@@ -935,8 +934,6 @@ deriving instance ToExpr (HeaderEnvelopeError TestBlock)
935934
deriving instance ToExpr BftValidationErr
936935
deriving instance ToExpr (ExtValidationError TestBlock)
937936

938-
instance ModelSupportsBlock TestBlock
939-
940937
deriving anyclass instance ToExpr FsPath
941938
deriving anyclass instance ToExpr BlocksPerFile
942939
deriving instance ToExpr BinaryBlockInfo

ouroboros-consensus/test/storage-test/Test/Ouroboros/Storage/ChainDB/StateMachine.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,8 @@ deriving instance
345345
(TestConstraints blk, Show it, Show flr) =>
346346
Show (Success blk it flr)
347347

348+
instance ModelSupportsBlock TestBlock
349+
348350
-- | Short-hand
349351
type TestIterator m blk = WithEq (Iterator m blk (AllComponents blk))
350352

0 commit comments

Comments
 (0)