summaryrefslogtreecommitdiff
path: root/dev-haskell/testpack
diff options
context:
space:
mode:
authorMichael Mair-Keimberger (asterix) <m.mairkeimberger@gmail.com>2016-07-28 18:57:40 +0200
committerPatrice Clement <monsieurp@gentoo.org>2016-08-03 09:21:54 +0200
commit5424a758dc80f086954f6a231624ab3c0c309c1c (patch)
tree8e7c6033cd68b31a0ec73cb6a9de9d663d3a2b66 /dev-haskell/testpack
parentdecfbea9cbf39738a4a2bdfce6cbb6cec1d96430 (diff)
downloadgentoo-5424a758dc80f086954f6a231624ab3c0c309c1c.tar.gz
gentoo-5424a758dc80f086954f6a231624ab3c0c309c1c.tar.xz
dev-haskell/testpack: remove unused patches
Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
Diffstat (limited to 'dev-haskell/testpack')
-rw-r--r--dev-haskell/testpack/files/testpack-2.1.2-quickcheck-2.5.patch31
-rw-r--r--dev-haskell/testpack/files/testpack-2.1.2.1-quickcheck-2.6.patch45
-rw-r--r--dev-haskell/testpack/files/testpack-2.1.2.1-quickcheck-2.7.patch182
3 files changed, 0 insertions, 258 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
deleted file mode 100644
index 7fdb372be8a..00000000000
--- a/dev-haskell/testpack/files/testpack-2.1.2-quickcheck-2.5.patch
+++ /dev/null
@@ -1,31 +0,0 @@
---- 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
diff --git a/dev-haskell/testpack/files/testpack-2.1.2.1-quickcheck-2.6.patch b/dev-haskell/testpack/files/testpack-2.1.2.1-quickcheck-2.6.patch
deleted file mode 100644
index 4f39ce03e2f..00000000000
--- a/dev-haskell/testpack/files/testpack-2.1.2.1-quickcheck-2.6.patch
+++ /dev/null
@@ -1,45 +0,0 @@
---- testpack-2.1.2.1-orig/testpack.cabal 2013-02-26 02:03:46.000000000 +1100
-+++ testpack-2.1.2.1/testpack.cabal 2013-03-14 12:10:12.741512817 +1100
-@@ -39,7 +39,7 @@
-
- Build-Depends: base >= 3 && < 5,
- mtl, HUnit,
-- QuickCheck >= 2.1.0.3 && < 2.5
-+ QuickCheck >= 2.1.0.3
-
- If flag(splitBase)
- Build-Depends: base >= 3 && < 5, containers, random
---- testpack-2.1.2-quickcheck-2.5/src/Test/HUnit/Tools.hs 2012-07-09 09:03:53.104931180 +1000
-+++ testpack-2.1.2.1/src/Test/HUnit/Tools.hs 2013-03-14 12:51:13.403489351 +1100
-@@ -169,10 +169,15 @@
- -- | Tests a property, using test arguments, produces a test result, and prints the results to 'stdout'.
- localquickCheckWithResult :: Testable prop => Args -> prop -> IO Result
- localquickCheckWithResult args p =
-- do
- #if MIN_VERSION_QuickCheck(2,3,0)
-+#if MIN_VERSION_QuickCheck(2,6,0)
-+ (if chatty args then withStdioTerminal else withNullTerminal) $ \tm -> do
-+#else
-+ do
- tm <- if chatty args then newStdioTerminal else newNullTerminal
-+#endif
- #else
-+ do
- tm <- newTerminal
- #endif
- rnd <- case replay args of
---- testpack-2.1.2.1-orig/src/Test/QuickCheck/Tools.hs 2013-02-26 02:03:46.000000000 +1100
-+++ testpack-2.1.2.1/src/Test/QuickCheck/Tools.hs 2013-03-14 12:46:14.922492197 +1100
-@@ -23,8 +23,12 @@
-
- )
- where
-+#if MIN_VERSION_QuickCheck(2,6,0)
-+import Test.QuickCheck.Property (Result(..), callbacks, expect, interrupted, ok, reason, stamp)
-+#else
- import Test.QuickCheck hiding (Result, reason)
- import Test.QuickCheck.Property
-+#endif
-
- {- | Compare two values. If same, the test passes. If different, the result indicates
- what was expected and what was received as part of the error. -}
diff --git a/dev-haskell/testpack/files/testpack-2.1.2.1-quickcheck-2.7.patch b/dev-haskell/testpack/files/testpack-2.1.2.1-quickcheck-2.7.patch
deleted file mode 100644
index 62271f344c2..00000000000
--- a/dev-haskell/testpack/files/testpack-2.1.2.1-quickcheck-2.7.patch
+++ /dev/null
@@ -1,182 +0,0 @@
---- testpack-2.1.2.1-orig/testpack.cabal 2013-02-26 02:03:46.000000000 +1100
-+++ testpack-2.1.2.1/testpack.cabal 2014-07-03 20:47:34.432871930 +1000
-@@ -39,7 +39,7 @@
-
- Build-Depends: base >= 3 && < 5,
- mtl, HUnit,
-- QuickCheck >= 2.1.0.3 && < 2.5
-+ QuickCheck >= 2.1.0.3 && < 2.8
-
- If flag(splitBase)
- Build-Depends: base >= 3 && < 5, containers, random
---- testpack-2.1.2.1-orig/src/Test/HUnit/Tools.hs 2013-02-26 02:03:46.000000000 +1100
-+++ testpack-2.1.2.1/src/Test/HUnit/Tools.hs 2014-07-03 21:01:50.373614959 +1000
-@@ -25,7 +25,14 @@
- import Test.QuickCheck.Property hiding (Result(reason))
- import qualified Control.Exception
- import qualified Test.HUnit as HU
--import System.Random
-+#if MIN_VERSION_QuickCheck(2,7,0)
-+import Test.QuickCheck.Random (newQCGen, QCGen(..))
-+import System.Random (split)
-+#else
-+import System.Random (newStdGen, StdGen(..), split)
-+#define newStdGen newQCGen
-+#define StdGen QCGen
-+#endif
- import System.IO
- import Text.Printf
-
-@@ -96,7 +103,7 @@
-
- {-
- -- | modified version of the tests function from Test.QuickCheck
--tests :: Args -> Gen Result -> StdGen -> Int -> Int -> [[String]] -> IO ()
-+tests :: Args -> Gen Result -> QCGen -> Int -> Int -> [[String]] -> IO ()
- tests config gen rnd0 ntest nfail stamps
- | ntest == maxSuccess config = return ()
- | nfail == maxDiscard config = assertFailure $ "Arguments exhausted after " ++ show ntest ++ " tests."
-@@ -128,7 +135,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:
-
-@@ -163,18 +176,28 @@
- -- | Tests a property, using test arguments, produces a test result, and prints the results to 'stdout'.
- localquickCheckWithResult :: Testable prop => Args -> prop -> IO Result
- localquickCheckWithResult args p =
-- do
- #if MIN_VERSION_QuickCheck(2,3,0)
-+#if MIN_VERSION_QuickCheck(2,6,0)
-+ (if chatty args then withStdioTerminal else withNullTerminal) $ \tm -> do
-+#else
-+ do
- tm <- if chatty args then newStdioTerminal else newNullTerminal
-+#endif
- #else
-+ do
- tm <- newTerminal
- #endif
- rnd <- case replay args of
-- Nothing -> newStdGen
-+ Nothing -> newQCGen
- 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
-@@ -190,17 +213,23 @@
- #endif
- , numSuccessShrinks = 0
- , numTryShrinks = 0
-+#if MIN_VERSION_QuickCheck(2,7,0)
-+ , numRecentlyDiscardedTests = 0
-+ , numTotTryShrinks = 0
-+ } (unGen (unProperty (property p)))
-+#else
- } (unGen (property p))
-+#endif
- where
- --------------------------------------------------------------------------
- -- main test loop
-- test :: State -> (StdGen -> Int -> Prop) -> IO Result
-+ test :: State -> (QCGen -> Int -> Prop) -> IO Result
- test st f
- | numSuccessTests st >= maxSuccessTests st = doneTesting st f
- | numDiscardedTests st >= maxDiscardedTests st = giveUp st f
- | otherwise = runATest st f
-
-- doneTesting :: State -> (StdGen -> Int -> Prop) -> IO Result
-+ doneTesting :: State -> (QCGen -> Int -> Prop) -> IO Result
- doneTesting st f =
- do
- #if MIN_VERSION_QuickCheck(2,3,0)
-@@ -221,7 +250,7 @@
- #endif
- }
-
-- giveUp :: State -> (StdGen -> Int -> Prop) -> IO Result
-+ giveUp :: State -> (QCGen -> Int -> Prop) -> IO Result
- giveUp st f =
- do
- #if MIN_VERSION_QuickCheck(2,3,0)
-@@ -234,7 +263,7 @@
- #endif
- }
-
-- runATest :: State -> (StdGen -> Int -> Prop) -> IO Result
-+ runATest :: State -> (QCGen -> Int -> Prop) -> IO Result
- runATest st f =
- do
- let size = computeSize st (numSuccessTests st) (numDiscardedTests st)
-@@ -266,7 +295,12 @@
- Just False -> -- failed test
- do
- #if MIN_VERSION_QuickCheck(2,3,0)
-+#if MIN_VERSION_QuickCheck(2,3,0)
-+ (numShrinks, totFailed, lastFailed) <- foundFailure st res ts
-+#else
- numShrinks <- foundFailure st res ts
-+#endif
-+
- theOutput <- terminalOutput (terminal st)
- #else
- foundFailure st res ts
-@@ -288,5 +322,9 @@
- , numShrinks = numShrinks
- , output = theOutput
- #endif
-+#if MIN_VERSION_QuickCheck(2,7,0)
-+ , numShrinkTries = totFailed
-+ , numShrinkFinal = lastFailed
-+#endif
- }
- where (rnd1,rnd2) = split (randomSeed st)
---- testpack-2.1.2.1-orig/src/Test/QuickCheck/Tools.hs 2013-02-26 02:03:46.000000000 +1100
-+++ testpack-2.1.2.1/src/Test/QuickCheck/Tools.hs 2014-07-03 21:01:23.932306995 +1000
-@@ -23,15 +23,27 @@
-
- )
- where
-+#if MIN_VERSION_QuickCheck(2,6,0)
-+import Test.QuickCheck.Property (Result(..), callbacks, expect, theException, ok, reason, stamp)
-+#if MIN_VERSION_QuickCheck(2,7,0)
-+#else
-+import Test.QuickCheck.Property (Result(..), callbacks, expect, interrupted, ok, reason, stamp)
-+#endif
-+#else
- import Test.QuickCheck hiding (Result, reason)
- import Test.QuickCheck.Property
-+#endif
-
- {- | Compare two values. If same, the test passes. If different, the result indicates
- what was expected and what was received as part of the error. -}
- (@=?) :: (Eq a, Show a) => a -> a -> Result
- expected @=? actual =
- MkResult {ok = Just (expected == actual),
-+#if MIN_VERSION_QuickCheck(2,7,0)
-+ expect = True, theException = Nothing,
-+#else
- expect = True, interrupted = False,
-+#endif
- reason = "Result: expected " ++ show expected ++ ", got " ++ show actual,
- stamp = [], callbacks = []}
-