Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify documentation and properties of splitCoin. #31

Merged
merged 11 commits into from
Apr 7, 2020

Conversation

jonathanknowles
Copy link
Contributor

Related Issues

#18
#21
#22

Summary

This PR:

  • Clarifies the documentation of splitCoin, adding examples.
  • Tests that splitCoin preserves the total sum.
  • Tests that splitCoin only produces valid coins.

src/Cardano/Fee.hs Outdated Show resolved Hide resolved
Copy link
Contributor

@paweljakubas paweljakubas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks, fine. very nice property test, especially data coverage

src/Cardano/Fee.hs Outdated Show resolved Hide resolved
Additionally, test that shrinking always generates valid data.
When it's not possible to divide a coin evenly, each integral coin value
in the resulting list should always be within unity of the ideal
unrounded result.

This change adds a test to verify this property.
@jonathanknowles jonathanknowles merged commit 7295c18 into master Apr 7, 2020
@jonathanknowles jonathanknowles deleted the jonathanknowles/split-coin branch April 7, 2020 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants