Commit 6cb997ad authored by Oleg Grenrus's avatar Oleg Grenrus
Browse files

Remove maybeDecompress_plain property

parent 571bcfbe
......@@ -20,11 +20,12 @@ import Test.Tasty.QuickCheck
tests :: [TestTree]
tests = [ testCase "maybeDecompress" maybeDecompressUnitTest
, testProperty "decompress plain" $ forAll (listOf asciiWord8) prop_maybeDecompress_plain
-- "decompress plain" property is non-trivial to state,
-- maybeDecompress returns input bytestring only if error occurs right at the beginning of the decompression process
-- generating such input would essentially duplicate maybeDecompress implementation
, testProperty "decompress zlib" prop_maybeDecompress_zlib
, testProperty "decompress gzip" prop_maybeDecompress_gzip
]
where asciiWord8 = elements [32..126]
maybeDecompressUnitTest :: Assertion
maybeDecompressUnitTest =
......@@ -43,10 +44,6 @@ maybeDecompressUnitTest =
runBrokenStream :: IO (Either SomeException ())
runBrokenStream = try . void . evaluate . BSLL.length $ maybeDecompress (BSLL.init compressedZlib <> BSLL.pack "*")
prop_maybeDecompress_plain :: [Word8] -> Property
prop_maybeDecompress_plain ws = property $ maybeDecompress original === original
where original = BSL.pack ws
prop_maybeDecompress_zlib :: [Word8] -> Property
prop_maybeDecompress_zlib ws = property $ maybeDecompress compressedZlib === original
where original = BSL.pack ws
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment