on master help sign in
Get tests working with now-mandatory QuickCheck 2.7
commitbe120c5a83137ab83b8de7ec2221e1932ad5b1f5 authorBryan O'Sullivan <bos@serpentine.com> dateSun 27 Apr 2014, 22:07 (12 years ago) parentbb0c391
3 files changed+5−4
tests/Tests/Properties.hs+3−2 tests/text-tests.cabal+1−1 text.cabal+1−1
tests/Tests/Properties.hs+3−2
@@ -30,6 +30,7 @@ import Test.Framework (Test, testGroup)
3030import Test.Framework.Providers.QuickCheck2 (testProperty)
3131import Test.QuickCheck hiding ((.&.))
3232import Test.QuickCheck.Monadic
33+import Test.QuickCheck.Property (Property(..))
3334import Tests.QuickCheckUtils
3435import Tests.Utils
3536import Text.Show.Functions ()
@@ -125,9 +126,9 @@ t_utf8_err bad de = do
125126 Leading -> B.append <$> genInvalidUTF8 <*> genUTF8
126127 Trailing -> B.append <$> genUTF8 <*> genInvalidUTF8
127128 genUTF8 = E.encodeUtf8 <$> genUnicode
128− forAll gen $ \bs -> do
129+ forAll gen $ \bs -> MkProperty $ do
129130 onErr <- genDecodeErr de
130− monadicIO $ do
131+ unProperty . monadicIO $ do
131132 l <- run $ let len = T.length (E.decodeUtf8With onErr bs)
132133 in (len `seq` return (Right len)) `Exception.catch`
133134 (\(e::UnicodeException) -> return (Left e))
tests/text-tests.cabal+1−1
@@ -36,7 +36,7 @@ executable text-tests
3636
3737 build-depends:
3838 HUnit >= 1.2,
39− QuickCheck >= 2.4,
39+ QuickCheck >= 2.7,
4040 base == 4.*,
4141 bytestring,
4242 deepseq,
text.cabal+1−1
@@ -161,7 +161,7 @@ test-suite tests
161161
162162 build-depends:
163163 HUnit >= 1.2,
164− QuickCheck >= 2.4,
164+ QuickCheck >= 2.7,
165165 array,
166166 base,
167167 bytestring,