on master help sign in
update testing dependencies
b11962aAntoine Latter
tests/TestUUID.hs+5−6
@@ -10,7 +10,7 @@ import qualified Data.UUID.V1 as U
10import qualified Data.UUID.V3 as U3
10import qualified Data.UUID.V3 as U3
11import qualified Data.UUID.V5 as U5
11import qualified Data.UUID.V5 as U5
12import Test.HUnit
12import Test.HUnit
13−import Test.QuickCheck
13+import Test.QuickCheck hiding ((.&.))
14import System.IO
14import System.IO
15import System.Random
15import System.Random
16
16
@@ -24,12 +24,11 @@ isValidVersion v u = lenOK && variantOK && versionOK
24
24
25
25
26instance Arbitrary U.UUID where
26instance Arbitrary U.UUID where
27− arbitrary = (fst . random) `fmap` rand
27+ -- the UUID random instance ignores bounds
28− coarbitrary = undefined
28+ arbitrary = choose (U.nil, U.nil)
29
29
30−instance Arbitrary Word8 where
30+-- instance Arbitrary Word8 where
31− arbitrary = (fromIntegral . fst . randomR (0,255::Int)) `fmap` rand
31+-- arbitrary = (fromIntegral . fst . randomR (0,255::Int)) `fmap` rand
32− coarbitrary = undefined
33
32
34
33
35test_null :: Test
34test_null :: Test
uuid.cabal+4−4
@@ -1,6 +1,6 @@
1Name: uuid
1Name: uuid
2Version: 1.2.3
2Version: 1.2.3
3−Copyright: (c) 2008-2011 Antoine Latter
3+Copyright: (c) 2008-2012 Antoine Latter
4Author: Antoine Latter
4Author: Antoine Latter
5Maintainer: aslatter@gmail.com
5Maintainer: aslatter@gmail.com
6License: BSD3
6License: BSD3
@@ -56,8 +56,8 @@ Test-Suite benchmark
56 Main-is: BenchUUID.hs
56 Main-is: BenchUUID.hs
57 Hs-source-dirs: tests
57 Hs-source-dirs: tests
58 Extensions: DeriveDataTypeable, CPP
58 Extensions: DeriveDataTypeable, CPP
59− Build-depends: base == 4.*, uuid, random, criterion >= 0.4 && < 0.6, mersenne-random-pure64,
59+ Build-depends: base == 4.*, uuid, random, criterion >= 0.4 && < 0.7, mersenne-random-pure64,
60− bytestring == 0.9.*, containers == 0.4.*, deepseq == 1.1.*
60+ bytestring == 0.9.*, containers == 0.4.*, deepseq >= 1.1 && < 1.4
61
61
62Test-Suite testuuid
62Test-Suite testuuid
63 Type: exitcode-stdio-1.0
63 Type: exitcode-stdio-1.0
@@ -66,4 +66,4 @@ Test-Suite testuuid
66 Extensions: DeriveDataTypeable
66 Extensions: DeriveDataTypeable
67 Ghc-Options: -Wall -fno-warn-orphans
67 Ghc-Options: -Wall -fno-warn-orphans
68 Build-Depends: random, bytestring, base >=3, base < 5, uuid,
68 Build-Depends: random, bytestring, base >=3, base < 5, uuid,
69− HUnit >=1.2 && < 1.3, QuickCheck >=1.2 && < 1.3
69+ HUnit >=1.2 && < 1.3, QuickCheck >=2.4 && < 2.5