Skip to content

Commit

Permalink
Fixup rational tests (#4340)
Browse files Browse the repository at this point in the history
* Size regression tests for Rational

* Start on laws tests

* Numerical hierarchy laws

* Property tests for Rational-specific behaviours

* Finish porting tests

* Documentation of test practices, updateMaterialized, coverage

* Refactor laws tests into larger suite

* updateMaterialized

* Remove dep

Co-authored-by: Koz Ross <koz.ross@retro-freedom.nz>
  • Loading branch information
michaelpj and kozross committed Jan 18, 2022
1 parent cc72a56 commit ed16143
Show file tree
Hide file tree
Showing 25 changed files with 1,126 additions and 7 deletions.
5 changes: 3 additions & 2 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ write-ghc-environment-files: never
tests: true
benchmarks: true

-- The only sensible test display option
test-show-details: streaming
-- The only sensible test display option, since it allows us to have colourized
-- 'tasty' output.
test-show-details: direct

allow-newer:
-- Pins to an old version of Template Haskell, unclear if/when it will be updated
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 17 additions & 1 deletion nix/pkgs/haskell/materialized-darwin/.plan.nix/plutus-tx.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions nix/pkgs/haskell/materialized-darwin/default.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions nix/pkgs/haskell/materialized-linux/.plan.nix/plutus-tx-plugin.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 17 additions & 1 deletion nix/pkgs/haskell/materialized-linux/.plan.nix/plutus-tx.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions nix/pkgs/haskell/materialized-linux/default.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 17 additions & 1 deletion nix/pkgs/haskell/materialized-windows/.plan.nix/plutus-tx.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions nix/pkgs/haskell/materialized-windows/default.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 14 additions & 1 deletion plutus-tx-plugin/plutus-tx-plugin.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ library
else
build-depends: ghc >=8.10 && <9


test-suite plutus-tx-tests
import: lang
if flag(use-ghc-stub)
Expand Down Expand Up @@ -130,3 +129,17 @@ test-suite plutus-tx-tests
containers -any
-- NOTE: -g makes the plugin give better errors
ghc-options: -g

test-suite size
import: lang
-- needs plutus-tx-plugin but it looks unused
ghc-options: -Wno-unused-packages
type: exitcode-stdio-1.0
main-is: Main.hs
hs-source-dirs: test/size
build-depends:
base >= 4.9 && < 5.0,
plutus-tx -any,
plutus-tx-plugin,
tagged -any,
tasty -any

0 comments on commit ed16143

Please sign in to comment.