aboutsummaryrefslogtreecommitdiff
path: root/devel/hs-testpack/files/patch-src__Test__HUnit__Tools.hs
diff options
context:
space:
mode:
Diffstat (limited to 'devel/hs-testpack/files/patch-src__Test__HUnit__Tools.hs')
-rw-r--r--devel/hs-testpack/files/patch-src__Test__HUnit__Tools.hs26
1 files changed, 26 insertions, 0 deletions
diff --git a/devel/hs-testpack/files/patch-src__Test__HUnit__Tools.hs b/devel/hs-testpack/files/patch-src__Test__HUnit__Tools.hs
new file mode 100644
index 000000000000..3bb1c4fa0204
--- /dev/null
+++ b/devel/hs-testpack/files/patch-src__Test__HUnit__Tools.hs
@@ -0,0 +1,26 @@
+--- ./src/Test/HUnit/Tools.hs.orig 2012-02-28 23:20:32.000000000 +0100
++++ ./src/Test/HUnit/Tools.hs 2012-10-04 00:04:08.000000000 +0200
+@@ -128,7 +128,11 @@
+ > q "Integer -> Int (safe bounds)" prop_integer_to_int_pass]
+ -}
+ qc2hu :: QC.Testable a => Int -> String -> a -> HU.Test
++#if MIN_VERSION_QuickCheck(2,5,0)
++qc2hu maxTest = qccheck (stdArgs {maxSuccess = maxTest, maxDiscardRatio = 1000})
++#else
+ qc2hu maxTest = qccheck (stdArgs {maxSuccess = maxTest, maxDiscard = 20000})
++#endif
+
+ {- | Run verbose tests. Example:
+
+@@ -174,7 +178,11 @@
+ Just (rnd,_) -> return rnd
+ test MkState{ terminal = tm
+ , maxSuccessTests = maxSuccess args
++#if MIN_VERSION_QuickCheck(2,5,0)
++ , maxDiscardedTests = maxDiscardRatio args
++#else
+ , maxDiscardedTests = maxDiscard args
++#endif
+ , computeSize = case replay args of
+ Nothing -> \n d -> (n * maxSize args)
+ `div` maxSuccess args