Skip to content

Commit

Permalink
Merge #2985
Browse files Browse the repository at this point in the history
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 <mail@sevanspowell.net>
Co-authored-by: IOHK <devops+stack-project@iohk.io>
  • Loading branch information
3 people committed Oct 28, 2021
2 parents bc0d709 + 8a6fdf5 commit 12b6e2b
Show file tree
Hide file tree
Showing 4 changed files with 2,962 additions and 0 deletions.
20 changes: 20 additions & 0 deletions lib/core/cardano-wallet-core.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ library
aeson
, async
, base
, base16-bytestring
, bech32
, bech32-th
, binary
Expand All @@ -41,8 +42,12 @@ library
, cardano-api
, cardano-binary
, cardano-crypto
, cardano-crypto-class
, cardano-crypto-test
, cardano-numeric
, cardano-ledger-core
, cardano-ledger-byron-test
, cardano-ledger-alonzo
, cardano-slotting
, cborg
, containers
Expand All @@ -65,6 +70,8 @@ library
, generic-lens
, generic-arbitrary
, hashable
, hedgehog
, hedgehog-quickcheck
, http-api-data
, http-client
, http-client-tls
Expand All @@ -90,6 +97,7 @@ library
, persistent >=2.13 && <2.14
, persistent-sqlite >=2.13 && <2.14
, persistent-template >=2.12 && <2.13
, plutus-ledger-api
, pretty-simple
, profunctors
, quiet
Expand All @@ -103,10 +111,13 @@ library
, servant
, servant-client
, servant-server
, shelley-spec-ledger
, shelley-spec-ledger-test
, split
, splitmix
, statistics
, streaming-commons
, strict-containers
, strict-non-empty-containers
, string-interpolate
, template-haskell
Expand Down Expand Up @@ -249,6 +260,10 @@ library
Cardano.Wallet.Primitive.Types.UTxOIndex.Gen
Cardano.Wallet.Primitive.Types.UTxOSelection.Gen
Cardano.Wallet.Gen
-- TODO:
--
-- Use cardano-api:gen to import these generators from cardano-api
Cardano.Api.Gen
other-modules:
Paths_cardano_wallet_core

Expand Down Expand Up @@ -301,9 +316,11 @@ test-suite unit
, foldl
, generic-arbitrary
, generic-lens
, hedgehog
, hedgehog-quickcheck
, hspec >= 2.8.2
, hspec-core >= 2.8.2
, hspec-hedgehog
, http-api-data
, http-client
, http-client-tls
Expand All @@ -320,8 +337,10 @@ test-suite unit
, network-uri
, nothunks
, persistent
, plutus-ledger-api
, pretty-simple
, regex-pcre-builtin
, shelley-spec-ledger
, OddWord
, ouroboros-consensus
, QuickCheck
Expand Down Expand Up @@ -367,6 +386,7 @@ test-suite unit
main-is:
core-unit-test.hs
other-modules:
Cardano.Api.GenSpec
Cardano.Byron.Codec.CborSpec
Cardano.DB.Sqlite.DeleteSpec
Cardano.Pool.DB.Arbitrary
Expand Down

0 comments on commit 12b6e2b

Please sign in to comment.