As a first step for CDEC-500, factor out shared example datatypes, so that
I can add `Address` tests without duplicating code.
The `Bi` & `Json` modules had a number of datatypes which were shared
and could be factored out. This commit pulls them out into the
I currently import the `ExampleHelpers` unqualified and without an
import list — this goes against the guidelines but seems ok to me in a
## Linked issue
## Type of change
— [~] 🐞 Bug fix (non-breaking change which fixes an issue)
— [~] 🛠 New feature (non-breaking change which adds functionality)
— [~] ⚠️ Breaking change (fix or feature that would cause existing functionality to change)
— [x] 🏭 Refactoring that does not change existing functionality but does improve things like code readability, structure etc
— [~] 🔨 New or improved tests for existing code
— [~] ⛑ git-flow chore (backport, hotfix, etc)
## Developer checklist
— [x] I have read the [style guide](https://github.com/input-output-hk/cardano-sl/blob/develop/docs/style-guide.md) document, and my code follows the code style of this project.
— [x] If my code deals with exceptions, it follows the [guidelines](https://github.com/input-output-hk/cardano-sl/blob/develop/docs/exceptions.md).
— [x] I have updated any documentation accordingly, if needed. Documentation changes can be reflected in opening a PR on [cardanodocs.com](https://github.com/input-output-hk/cardanodocs.com), amending the inline [Haddock](https://www.haskell.org/haddock/) comments, any relevant README file or one of the document listed in the [docs](https://github.com/input-output-hk/cardano-sl/tree/develop/docs) directory.
— [~] CHANGELOG entry has been added and is linked to the correct PR on GitHub.
^ this is a minor PR; not putting it in the CHANGELOG.
## Testing checklist
— [~] I have added tests to cover my changes.
— [x] All new and existing tests passed.
^ refactoring, so existing tests should verify correctness.
You can view, comment on, or merge this pull request online at:
— Commit Summary —
* [CDEC-500] Factor out example datatypes from Json+Bi tests
— File Changes —
M core/cardano-sl-core.cabal (1)
M core/test/Test/Pos/Core/Bi.hs (510)
A core/test/Test/Pos/Core/ExampleHelpers.hs (639)
M core/test/Test/Pos/Core/Json.hs (127)
M core/test/cardano-sl-core-test.cabal (1)
— Patch Links —