-
Notifications
You must be signed in to change notification settings - Fork 217
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
Add Cardano.Api.Tx generators #2985
Conversation
be8a161
to
a1a28cd
Compare
65ec3d4
to
bb9ef33
Compare
@sevanspowell I have rebased this onto latest master. |
Thank you! |
74ee8cb
to
27efd39
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good thanks.
Please squash the branch though - it's actually harder to review the single commits for things like this.
describe "genTxInsCollateral" $ do | ||
it "ByronEra" $ | ||
property | ||
$ forAll (genTxInsCollateral ByronEra) | ||
$ genTxInCollateralCoverage ByronEra | ||
it "ShelleyEra" $ | ||
property | ||
$ forAll (genTxInsCollateral ShelleyEra) | ||
$ genTxInCollateralCoverage ShelleyEra | ||
it "AllegraEra" $ | ||
property | ||
$ forAll (genTxInsCollateral AllegraEra) | ||
$ genTxInCollateralCoverage AllegraEra | ||
it "MaryEra" $ | ||
property | ||
$ forAll (genTxInsCollateral MaryEra) | ||
$ genTxInCollateralCoverage MaryEra | ||
it "AlonzoEra" $ | ||
property | ||
$ forAll (genTxInsCollateral AlonzoEra) | ||
$ genTxInCollateralCoverage AlonzoEra |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be possible to factor such code by using AnyCardanoEra
. I put some code in the other PR - #2975 (comment).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. I tried to to this using existential quantification but then I had issues with the era
quantifier escaping it's scope (skolem error). I'll try again with AnyCardanoEra
.
789ee49
to
620350a
Compare
Differing views on this. I will leave multiple commits for the review process and squash before bors. That way those that prefer multiple commits can review commit-by-commit, and those that don't can view the diff or squash locally. |
bors r+ |
2985: Add Cardano.Api.Tx generators r=sevanspowell a=sevanspowell - [ ] Copied and extended Tx generators from the cardano-api library. We were unable to import them due to issues with cabal sublibs. - [ ] Made a first pass at providing coverage tests for as many of the generators as possible. - Further note: I've decided to take a "best-effort" approach to providing coverage to generators. Coverage of generators is difficult, particularly for sum types and large product types. If you can see a better way of doing this, please let me know! - Best reviewed commit-by-commit ### Issue Number ADP-1147 Co-authored-by: Samuel Evans-Powell <[email protected]> Co-authored-by: IOHK <[email protected]>
bors cancel |
- Copied and extended Tx generators from the cardano-api library. We were unable to import them due to issues with cabal sublibs. - Made a first pass at providing coverage tests for as many of the generators as possible. - NOTE: I've decided to take a "best-effort" approach to providing coverage to generators. Coverage of generators is difficult, particularly for sum types and large product types. If you can see a better way of doing this, please let me know! Co-authored-by: Rodney Lorrimar <[email protected]>
8a6fdf5
to
db9553e
Compare
Canceled. |
bors r+ |
Build succeeded: |
Copied and extended Tx generators from the cardano-api library. We were unable to import them due to issues with cabal sublibs.
Made a first pass at providing coverage tests for as many of the generators as possible.
Best reviewed commit-by-commit
Issue Number
ADP-1147