Skip to content

Commit 60ecd1f

Browse files
committed
Test Genesis State Machine with quickcheck-dynamic (QD)
- add tests based on quickcheck-dynamic - group definition used in both QSM and QD tests - in QD-based tests, use reflection to pass static model parameters - Test.QuickCheck.Extras -> Test.Ouroboros.Consensus.QuickCheck.Extras - Remove old test based on quickcheck-state-machine
1 parent da502c2 commit 60ecd1f

File tree

15 files changed

+1160
-1328
lines changed

15 files changed

+1160
-1328
lines changed

ouroboros-consensus-diffusion/ouroboros-consensus-diffusion.cabal

+5-5
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ test-suite consensus-test
232232
main-is: Main.hs
233233
other-modules:
234234
Test.Consensus.BlockTree
235-
Test.Consensus.GSM
236-
Test.Consensus.GSM.Model
235+
Test.Consensus.GSM.Common
236+
Test.Consensus.GSM.QD
237237
Test.Consensus.Genesis.Setup
238238
Test.Consensus.Genesis.Setup.Classifiers
239239
Test.Consensus.Genesis.Setup.GenChains
@@ -247,7 +247,6 @@ test-suite consensus-test
247247
Test.Consensus.HardFork.Combinator
248248
Test.Consensus.HardFork.Combinator.A
249249
Test.Consensus.HardFork.Combinator.B
250-
Test.Consensus.IOSimQSM.Test.StateMachine.Sequential
251250
Test.Consensus.Network.AnchoredFragment.Extras
252251
Test.Consensus.Node
253252
Test.Consensus.PeerSimulator.BlockFetch
@@ -305,10 +304,11 @@ test-suite consensus-test
305304
ouroboros-network-framework,
306305
ouroboros-network-mock,
307306
ouroboros-network-protocols,
308-
pretty-show,
309-
quickcheck-state-machine:no-vendored-treediff,
307+
pretty,
308+
quickcheck-dynamic ^>=4.0.0,
310309
quiet,
311310
random,
311+
reflection,
312312
resource-registry,
313313
serialise,
314314
si-timers,

ouroboros-consensus-diffusion/test/consensus-test/Main.hs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module Main (main) where
22

33
import qualified Test.Consensus.Genesis.Tests (tests)
4-
import qualified Test.Consensus.GSM (tests)
4+
import qualified Test.Consensus.GSM.QD (tests)
55
import qualified Test.Consensus.HardFork.Combinator (tests)
66
import qualified Test.Consensus.Node (tests)
77
import qualified Test.Consensus.PeerSimulator.Tests (tests)
@@ -24,7 +24,8 @@ tests =
2424
]
2525
]
2626
, Test.Consensus.Genesis.Tests.tests
27-
, testGroup "GSM" Test.Consensus.GSM.tests
27+
, testGroup "GSM" [ testGroup "QD" Test.Consensus.GSM.QD.tests
28+
]
2829
, Test.Consensus.PeerSimulator.Tests.tests
2930
, Test.Consensus.PointSchedule.Shrinking.Tests.tests
3031
, Test.Consensus.PointSchedule.Tests.tests

0 commit comments

Comments
 (0)