diff options
Diffstat (limited to 'dev-haskell/testpack/files/testpack-2.1.2-quickcheck-2.5.patch')
-rw-r--r-- | dev-haskell/testpack/files/testpack-2.1.2-quickcheck-2.5.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/dev-haskell/testpack/files/testpack-2.1.2-quickcheck-2.5.patch b/dev-haskell/testpack/files/testpack-2.1.2-quickcheck-2.5.patch new file mode 100644 index 000000000000..7fdb372be8a5 --- /dev/null +++ b/dev-haskell/testpack/files/testpack-2.1.2-quickcheck-2.5.patch @@ -0,0 +1,31 @@ +--- testpack-2.1.2-orig/src/Test/HUnit/Tools.hs 2012-02-29 09:20:32.000000000 +1100 ++++ testpack-2.1.2/src/Test/HUnit/Tools.hs 2012-07-09 09:03:53.104931180 +1000 +@@ -128,7 +128,13 @@ + > q "Integer -> Int (safe bounds)" prop_integer_to_int_pass] + -} + qc2hu :: QC.Testable a => Int -> String -> a -> HU.Test +-qc2hu maxTest = qccheck (stdArgs {maxSuccess = maxTest, maxDiscard = 20000}) ++qc2hu maxTest = qccheck (stdArgs {maxSuccess = maxTest, ++#if MIN_VERSION_QuickCheck(2,5,0) ++ maxDiscardRatio = if maxTest /= 0 then 20000 `div` maxTest else 10 ++#else ++ maxDiscard = 20000 ++#endif ++ }) + + {- | Run verbose tests. Example: + +@@ -174,7 +180,12 @@ + Just (rnd,_) -> return rnd + test MkState{ terminal = tm + , maxSuccessTests = maxSuccess args +- , maxDiscardedTests = maxDiscard args ++ , maxDiscardedTests = ++#if MIN_VERSION_QuickCheck(2,5,0) ++ maxDiscardRatio args * maxSuccess args ++#else ++ maxDiscard args ++#endif + , computeSize = case replay args of + Nothing -> \n d -> (n * maxSize args) + `div` maxSuccess args |