on master help sign in
Merge from 1.0 branch

--HG-- rename : Data/Text/Encoding/Utf8.hs => Data/Text/Internal/Encoding/Utf8.hs

commitbb45d3767d0fae54dc2920e840641d0eb7c4406b authorBryan O'Sullivan <bos@serpentine.com> dateMon 30 Dec 2013, 15:56 (13 years ago) parentbebb3406e377a5
3 files changed+12
Data/Text/Internal/Encoding/Utf8.hs+4 tests/Tests/QuickCheckUtils.hs+6 tests/text-tests.cabal+2
Data/Text/Internal/Encoding/Utf8.hs+4
@@ -33,6 +33,10 @@ module Data.Text.Internal.Encoding.Utf8
3333 , validate4
3434 ) where
3535
36+#if defined(TEST_SUITE)
37+# undef ASSERTS
38+#endif
39+
3640#if defined(ASSERTS)
3741import Control.Exception (assert)
3842#endif
tests/Tests/QuickCheckUtils.hs+6
@@ -63,6 +63,12 @@ instance Arbitrary I16 where
6363instance Arbitrary B.ByteString where
6464 arbitrary = B.pack `fmap` arbitrary
6565
66+#if !MIN_VERSION_base(4,4,0)
67+instance Random Word8 where
68+ randomR = integralRandomR
69+ random = randomR (minBound,maxBound)
70+#endif
71+
6672genUnicode :: IsString a => Gen a
6773genUnicode = fmap fromString string where
6874 string = sized $ \n ->
tests/text-tests.cabal+2
@@ -30,6 +30,7 @@ executable text-tests
3030 -fhpc
3131
3232 cpp-options:
33+ -DTEST_SUITE
3334 -DASSERTS
3435 -DHAVE_DEEPSEQ
3536
@@ -113,6 +114,7 @@ library
113114 -fhpc
114115
115116 cpp-options:
117+ -DTEST_SUITE
116118 -DHAVE_DEEPSEQ
117119 -DASSERTS
118120 -DINTEGER_GMP