Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Commit

Permalink
[CDEC-500] Factor out example datatypes from Json+Bi tests
Browse files Browse the repository at this point in the history
The `Bi` & `Json` modules had a number of datatypes which were shared
and could be factored out. This commit pulls them out into the
`ExampleHelpers` module.
  • Loading branch information
mhuesch committed Aug 15, 2018
1 parent 68862ed commit 0e17500
Show file tree
Hide file tree
Showing 6 changed files with 691 additions and 619 deletions.
9 changes: 5 additions & 4 deletions chain/test/Test/Pos/Chain/Block/Bi.hs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ import Pos.Crypto (Hash, SignTag (..), abstractHash, createPsk, hash,
import Test.Pos.Binary.Helpers.GoldenRoundTrip (goldenTestBi,
roundTripsBiBuildable, roundTripsBiShow)
import Test.Pos.Chain.Block.Gen
import Test.Pos.Core.Bi (exampleBlockVersion, exampleChainDifficulty,
exampleEpochIndex, exampleLightDlgIndices,
examplePublicKey, exampleSecretKey, exampleSecretKeys,
exampleSlotId, exampleSlotLeaders, exampleSoftwareVersion,
import Test.Pos.Core.ExampleHelpers (exampleBlockVersion,
exampleChainDifficulty, exampleEpochIndex,
exampleLightDlgIndices, examplePublicKey,
exampleSecretKey, exampleSecretKeys, exampleSlotId,
exampleSlotLeaders, exampleSoftwareVersion,
exampleSscPayload, exampleSscProof, exampleTxPayload,
exampleTxProof, exampleUpdatePayload, exampleUpdateProof,
feedPM, feedPMC, staticHeavyDlgIndexes,
Expand Down
1 change: 1 addition & 0 deletions core/cardano-sl-core.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ test-suite test
Test.Pos.Core.ChronoSpec
Test.Pos.Core.CoinSpec
Test.Pos.Core.EnumEmpTest
Test.Pos.Core.ExampleHelpers
Test.Pos.Core.Gen
Test.Pos.Core.Json
Test.Pos.Core.LimitsSpec
Expand Down
Loading

0 comments on commit 0e17500

Please sign in to comment.