Сryptocurrency development analysis

Description

[CDEC-500] Add golden tests for `Address`

Since we are modifying this for CO-354, and it’s quite important to
preserve backwards compatibility of Addresses, I’ve added 5 golden
tests to ensure the various configurations of Addresses will have
proper test coverage.

## Linked issue

https://iohk.myjetbrains.com/youtrack/issue/CDEC-500

## 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)
— [~] 🏭 Refactoring that does not change existing functionality but does improve things like code readability, structure etc
— [x] 🔨 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.
^ we’re adding test coverage, which is not very noteworthy, and can be mentioned in a CHANGELOG entry for the parent YT ticket.

## Testing checklist
— [x] I have added tests to cover my changes.
— [x] All new and existing tests passed.
You can view, comment on, or merge this pull request online at:

https://github.com/input-output-hk/cardano-sl/pull/3405

— Commit Summary —

* [CDEC-500] Factor out example datatypes from Json+Bi tests
* [CDEC-500] Add golden tests for `Address`

— File Changes —

M chain/test/Test/Pos/Chain/Block/Bi.hs (9)
M core/cardano-sl-core.cabal (1)
M core/test/Test/Pos/Core/Bi.hs (533)
A core/test/Test/Pos/Core/ExampleHelpers.hs (686)
M core/test/Test/Pos/Core/Json.hs (173)
M core/test/cardano-sl-core-test.cabal (1)
A core/test/golden/json/Address0 (1)
A core/test/golden/json/Address1 (1)
A core/test/golden/json/Address2 (1)
A core/test/golden/json/Address3 (1)
A core/test/golden/json/Address4 (1)

— Patch Links —

https://github.com/input-output-hk/cardano-sl/pull/3405.patch
https://github.com/input-output-hk/cardano-sl/pull/3405.diff

Добавить комментарий