diff options
author | 2012-09-13 13:24:46 +0000 | |
---|---|---|
committer | 2012-09-13 13:24:46 +0000 | |
commit | 4b41cd79c500faedd62010c6a0bcf870d6a1951d (patch) | |
tree | 601601b5c52277107a5bf891c657a726534939ec /dev-haskell/testpack/files | |
parent | Remove older unstable version (diff) | |
download | historical-4b41cd79c500faedd62010c6a0bcf870d6a1951d.tar.gz historical-4b41cd79c500faedd62010c6a0bcf870d6a1951d.tar.bz2 historical-4b41cd79c500faedd62010c6a0bcf870d6a1951d.zip |
Fix testpack 2.1.2 build with quickcheck 2.5
Package-Manager: portage-2.1.11.14/cvs/Linux x86_64
Diffstat (limited to 'dev-haskell/testpack/files')
-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 |