Skip to content

Make tests retain 4GB less RAM #80

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

Merged
merged 2 commits into from
Jun 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion zlib/test/Test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,12 @@ test_exception = ioProperty $ do

test_compress_large_chunk :: Property
test_compress_large_chunk =
GZip.decompress (GZip.compress (BL.replicate len 0)) === BL.replicate len 0
counterexample
("Expected " ++ show len ++ " zeros but got different result, please investigate manually")
(property test)
where
test = GZip.decompress (GZip.compress (BL.replicate len 0)) == BL.replicate len 0

len = case finiteBitSize (0 :: Int) of
64 -> (1 `shiftL` 32) + 1
_ -> 0 -- ignore it
Expand Down
1 change: 1 addition & 0 deletions zlib/zlib.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,4 @@ test-suite tests
tasty >= 0.8 && < 1.6,
tasty-quickcheck >= 0.8 && < 1
ghc-options: -Wall
--with-rtsopts="-M1G"
Loading