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

Imp improvements #3842

Merged
merged 2 commits into from
Nov 3, 2023
Merged

Imp improvements #3842

merged 2 commits into from
Nov 3, 2023

Conversation

lehins
Copy link
Collaborator

@lehins lehins commented Nov 2, 2023

Description

A whole bunch of improvements to Imp Spec

  • Proper integration with HSpec
  • Implement matching lifted expectation that work in MonadIO
  • Removal of impIO and impIOMSg in favor of lifted expectations and impAnn
  • Fix printing of expectations and excepotions

Other relevant changes:

  • Move GovSpec to testlib
  • Fix GovSpec tests

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated
  • When applicable, versions are updated in .cabal and CHANGELOG.md files according to the
    versioning process.
  • The version bounds in .cabal files for all affected packages are updated. If you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md)
  • All visible changes are prepended to the latest section of a CHANGELOG.md for the affected packages. New section is never added with the code changes. (See RELEASING.md)
  • Code is formatted with fourmolu (use scripts/fourmolize.sh)
  • Cabal files are formatted (use scripts/cabal-format.sh)
  • hie.yaml has been updated (use scripts/gen-hie.sh)
  • Self-reviewed the diff

@lehins lehins requested review from Soupstraw and aniketd November 2, 2023 01:25
@lehins lehins force-pushed the lehins/imp-improvements branch from b5266b4 to 0ca8d62 Compare November 2, 2023 12:15
Copy link
Contributor

@aniketd aniketd left a comment

Choose a reason for hiding this comment

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

Awesome!!! 🎉

@lehins lehins force-pushed the lehins/imp-improvements branch from b188eeb to 222a01d Compare November 2, 2023 13:44
Copy link
Contributor

@Soupstraw Soupstraw left a comment

Choose a reason for hiding this comment

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

Nice! I really like the changes.

@lehins lehins force-pushed the lehins/imp-improvements branch 5 times, most recently from 2b509e5 to 719dd6e Compare November 3, 2023 16:13
* Rewrite `ImpTestM` as `ReaderT` with `IORef` and change `MonadState`
  instance.
* Add `Example` instance for `ImpTestM`, that integrates it into HSpec
* Failure reporting and logging works nicely
* Introduce new expectations that work with Either
* Add lifted versions of expectations to a new
  `Test.Cardano.Ledger.Imp.Common` module
* Make GovSpec polymorphic in `era`. Fix and improve some of the tests.
@lehins lehins force-pushed the lehins/imp-improvements branch from 719dd6e to ab40c97 Compare November 3, 2023 18:25
@lehins lehins enabled auto-merge November 3, 2023 20:06
@lehins lehins merged commit f06c864 into master Nov 3, 2023
@iohk-bors iohk-bors bot deleted the lehins/imp-improvements branch November 3, 2023 20:17
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.

4 participants