dev-db/postgresql: Merge "use /bin/sh (...) for postgres user"
[gentoo.git] / dev-haskell / testpack / files / testpack-2.1.2-quickcheck-2.5.patch
1 --- testpack-2.1.2-orig/src/Test/HUnit/Tools.hs 2012-02-29 09:20:32.000000000 +1100
2 +++ testpack-2.1.2/src/Test/HUnit/Tools.hs      2012-07-09 09:03:53.104931180 +1000
3 @@ -128,7 +128,13 @@
4  >        q "Integer -> Int (safe bounds)" prop_integer_to_int_pass]
5  -}
6  qc2hu :: QC.Testable a => Int -> String -> a -> HU.Test
7 -qc2hu maxTest = qccheck (stdArgs {maxSuccess = maxTest, maxDiscard = 20000})
8 +qc2hu maxTest = qccheck (stdArgs {maxSuccess = maxTest,
9 +#if MIN_VERSION_QuickCheck(2,5,0)
10 +                                  maxDiscardRatio = if maxTest /= 0 then 20000 `div` maxTest else 10
11 +#else
12 +                                  maxDiscard = 20000
13 +#endif
14 +                                 })
15  
16  {- | Run verbose tests.  Example:
17  
18 @@ -174,7 +180,12 @@
19                Just (rnd,_) -> return rnd
20       test MkState{ terminal          = tm
21                   , maxSuccessTests   = maxSuccess args
22 -                 , maxDiscardedTests = maxDiscard args
23 +                 , maxDiscardedTests =
24 +#if MIN_VERSION_QuickCheck(2,5,0)
25 +                                       maxDiscardRatio args * maxSuccess args
26 +#else
27 +                                       maxDiscard args
28 +#endif
29                   , computeSize       = case replay args of
30                                           Nothing    -> \n d -> (n * maxSize args)
31                                                           `div` maxSuccess args