@@ -9,41 +9,34 @@ import Codec.Compression.Zlib.Internal
9
9
import Test.QuickCheck
10
10
11
11
12
- deriving instance Show Format
13
12
instance Arbitrary Format where
14
13
-- GZipOrZlib omitted since it's not symmetric
15
14
arbitrary = elements [gzipFormat, zlibFormat, rawFormat]
16
15
17
16
18
- deriving instance Show Method
19
17
instance Arbitrary Method where
20
18
arbitrary = return deflateMethod
21
19
22
20
23
- deriving instance Show CompressionLevel
24
21
instance Arbitrary CompressionLevel where
25
22
arbitrary = elements $ [defaultCompression, noCompression,
26
23
bestCompression, bestSpeed]
27
24
++ map compressionLevel [1 .. 9 ]
28
25
29
26
30
- deriving instance Eq WindowBits
31
27
deriving instance Ord WindowBits
32
- deriving instance Show WindowBits
33
28
instance Arbitrary WindowBits where
34
29
arbitrary = elements $ defaultWindowBits: map windowBits [8 .. 15 ]
35
30
shrink DefaultWindowBits = []
36
31
shrink (WindowBits n) = defaultWindowBits: map windowBits [n+ 1 .. 15 ]
37
32
38
33
39
- deriving instance Show MemoryLevel
40
34
instance Arbitrary MemoryLevel where
41
35
arbitrary = elements $ [defaultMemoryLevel, minMemoryLevel, maxMemoryLevel]
42
36
++ [memoryLevel n | n <- [1 .. 9 ]]
43
37
44
38
45
39
46
- deriving instance Show CompressionStrategy
47
40
instance Arbitrary CompressionStrategy where
48
41
arbitrary = elements $ [defaultStrategy, filteredStrategy, huffmanOnlyStrategy]
49
42
-- These are disabled by default in the package
0 commit comments