on master help sign in
Merge from 1.0 branch
bb45d37Bryan O'Sullivan
Data/Text/Internal/Encoding/Utf8.hs+4
@@ -33,6 +33,10 @@ module Data.Text.Internal.Encoding.Utf8
33 , validate4
33 , validate4
34 ) where
34 ) where
35
35
36+#if defined(TEST_SUITE)
37+# undef ASSERTS
38+#endif
39+
36#if defined(ASSERTS)
40#if defined(ASSERTS)
37import Control.Exception (assert)
41import Control.Exception (assert)
38#endif
42#endif
tests/Tests/QuickCheckUtils.hs+6
@@ -63,6 +63,12 @@ instance Arbitrary I16 where
63instance Arbitrary B.ByteString where
63instance Arbitrary B.ByteString where
64 arbitrary = B.pack `fmap` arbitrary
64 arbitrary = B.pack `fmap` arbitrary
65
65
66+#if !MIN_VERSION_base(4,4,0)
67+instance Random Word8 where
68+ randomR = integralRandomR
69+ random = randomR (minBound,maxBound)
70+#endif
71+
66genUnicode :: IsString a => Gen a
72genUnicode :: IsString a => Gen a
67genUnicode = fmap fromString string where
73genUnicode = fmap fromString string where
68 string = sized $ \n ->
74 string = sized $ \n ->
tests/text-tests.cabal+2
@@ -30,6 +30,7 @@ executable text-tests
30 -fhpc
30 -fhpc
31
31
32 cpp-options:
32 cpp-options:
33+ -DTEST_SUITE
33 -DASSERTS
34 -DASSERTS
34 -DHAVE_DEEPSEQ
35 -DHAVE_DEEPSEQ
35
36
@@ -113,6 +114,7 @@ library
113 -fhpc
114 -fhpc
114
115
115 cpp-options:
116 cpp-options:
117+ -DTEST_SUITE
116 -DHAVE_DEEPSEQ
118 -DHAVE_DEEPSEQ
117 -DASSERTS
119 -DASSERTS
118 -DINTEGER_GMP
120 -DINTEGER_GMP