1 |
commit: 5424a758dc80f086954f6a231624ab3c0c309c1c |
2 |
Author: Michael Mair-Keimberger (asterix) <m.mairkeimberger <AT> gmail <DOT> com> |
3 |
AuthorDate: Thu Jul 28 16:57:40 2016 +0000 |
4 |
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 3 07:21:54 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5424a758 |
7 |
|
8 |
dev-haskell/testpack: remove unused patches |
9 |
|
10 |
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org> |
11 |
|
12 |
.../files/testpack-2.1.2-quickcheck-2.5.patch | 31 ---- |
13 |
.../files/testpack-2.1.2.1-quickcheck-2.6.patch | 45 ----- |
14 |
.../files/testpack-2.1.2.1-quickcheck-2.7.patch | 182 --------------------- |
15 |
3 files changed, 258 deletions(-) |
16 |
|
17 |
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 |
18 |
deleted file mode 100644 |
19 |
index 7fdb372..0000000 |
20 |
--- a/dev-haskell/testpack/files/testpack-2.1.2-quickcheck-2.5.patch |
21 |
+++ /dev/null |
22 |
@@ -1,31 +0,0 @@ |
23 |
---- testpack-2.1.2-orig/src/Test/HUnit/Tools.hs 2012-02-29 09:20:32.000000000 +1100 |
24 |
-+++ testpack-2.1.2/src/Test/HUnit/Tools.hs 2012-07-09 09:03:53.104931180 +1000 |
25 |
-@@ -128,7 +128,13 @@ |
26 |
- > q "Integer -> Int (safe bounds)" prop_integer_to_int_pass] |
27 |
- -} |
28 |
- qc2hu :: QC.Testable a => Int -> String -> a -> HU.Test |
29 |
--qc2hu maxTest = qccheck (stdArgs {maxSuccess = maxTest, maxDiscard = 20000}) |
30 |
-+qc2hu maxTest = qccheck (stdArgs {maxSuccess = maxTest, |
31 |
-+#if MIN_VERSION_QuickCheck(2,5,0) |
32 |
-+ maxDiscardRatio = if maxTest /= 0 then 20000 `div` maxTest else 10 |
33 |
-+#else |
34 |
-+ maxDiscard = 20000 |
35 |
-+#endif |
36 |
-+ }) |
37 |
- |
38 |
- {- | Run verbose tests. Example: |
39 |
- |
40 |
-@@ -174,7 +180,12 @@ |
41 |
- Just (rnd,_) -> return rnd |
42 |
- test MkState{ terminal = tm |
43 |
- , maxSuccessTests = maxSuccess args |
44 |
-- , maxDiscardedTests = maxDiscard args |
45 |
-+ , maxDiscardedTests = |
46 |
-+#if MIN_VERSION_QuickCheck(2,5,0) |
47 |
-+ maxDiscardRatio args * maxSuccess args |
48 |
-+#else |
49 |
-+ maxDiscard args |
50 |
-+#endif |
51 |
- , computeSize = case replay args of |
52 |
- Nothing -> \n d -> (n * maxSize args) |
53 |
- `div` maxSuccess args |
54 |
|
55 |
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 |
56 |
deleted file mode 100644 |
57 |
index 4f39ce0..0000000 |
58 |
--- a/dev-haskell/testpack/files/testpack-2.1.2.1-quickcheck-2.6.patch |
59 |
+++ /dev/null |
60 |
@@ -1,45 +0,0 @@ |
61 |
---- testpack-2.1.2.1-orig/testpack.cabal 2013-02-26 02:03:46.000000000 +1100 |
62 |
-+++ testpack-2.1.2.1/testpack.cabal 2013-03-14 12:10:12.741512817 +1100 |
63 |
-@@ -39,7 +39,7 @@ |
64 |
- |
65 |
- Build-Depends: base >= 3 && < 5, |
66 |
- mtl, HUnit, |
67 |
-- QuickCheck >= 2.1.0.3 && < 2.5 |
68 |
-+ QuickCheck >= 2.1.0.3 |
69 |
- |
70 |
- If flag(splitBase) |
71 |
- Build-Depends: base >= 3 && < 5, containers, random |
72 |
---- testpack-2.1.2-quickcheck-2.5/src/Test/HUnit/Tools.hs 2012-07-09 09:03:53.104931180 +1000 |
73 |
-+++ testpack-2.1.2.1/src/Test/HUnit/Tools.hs 2013-03-14 12:51:13.403489351 +1100 |
74 |
-@@ -169,10 +169,15 @@ |
75 |
- -- | Tests a property, using test arguments, produces a test result, and prints the results to 'stdout'. |
76 |
- localquickCheckWithResult :: Testable prop => Args -> prop -> IO Result |
77 |
- localquickCheckWithResult args p = |
78 |
-- do |
79 |
- #if MIN_VERSION_QuickCheck(2,3,0) |
80 |
-+#if MIN_VERSION_QuickCheck(2,6,0) |
81 |
-+ (if chatty args then withStdioTerminal else withNullTerminal) $ \tm -> do |
82 |
-+#else |
83 |
-+ do |
84 |
- tm <- if chatty args then newStdioTerminal else newNullTerminal |
85 |
-+#endif |
86 |
- #else |
87 |
-+ do |
88 |
- tm <- newTerminal |
89 |
- #endif |
90 |
- rnd <- case replay args of |
91 |
---- testpack-2.1.2.1-orig/src/Test/QuickCheck/Tools.hs 2013-02-26 02:03:46.000000000 +1100 |
92 |
-+++ testpack-2.1.2.1/src/Test/QuickCheck/Tools.hs 2013-03-14 12:46:14.922492197 +1100 |
93 |
-@@ -23,8 +23,12 @@ |
94 |
- |
95 |
- ) |
96 |
- where |
97 |
-+#if MIN_VERSION_QuickCheck(2,6,0) |
98 |
-+import Test.QuickCheck.Property (Result(..), callbacks, expect, interrupted, ok, reason, stamp) |
99 |
-+#else |
100 |
- import Test.QuickCheck hiding (Result, reason) |
101 |
- import Test.QuickCheck.Property |
102 |
-+#endif |
103 |
- |
104 |
- {- | Compare two values. If same, the test passes. If different, the result indicates |
105 |
- what was expected and what was received as part of the error. -} |
106 |
|
107 |
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 |
108 |
deleted file mode 100644 |
109 |
index 62271f3..0000000 |
110 |
--- a/dev-haskell/testpack/files/testpack-2.1.2.1-quickcheck-2.7.patch |
111 |
+++ /dev/null |
112 |
@@ -1,182 +0,0 @@ |
113 |
---- testpack-2.1.2.1-orig/testpack.cabal 2013-02-26 02:03:46.000000000 +1100 |
114 |
-+++ testpack-2.1.2.1/testpack.cabal 2014-07-03 20:47:34.432871930 +1000 |
115 |
-@@ -39,7 +39,7 @@ |
116 |
- |
117 |
- Build-Depends: base >= 3 && < 5, |
118 |
- mtl, HUnit, |
119 |
-- QuickCheck >= 2.1.0.3 && < 2.5 |
120 |
-+ QuickCheck >= 2.1.0.3 && < 2.8 |
121 |
- |
122 |
- If flag(splitBase) |
123 |
- Build-Depends: base >= 3 && < 5, containers, random |
124 |
---- testpack-2.1.2.1-orig/src/Test/HUnit/Tools.hs 2013-02-26 02:03:46.000000000 +1100 |
125 |
-+++ testpack-2.1.2.1/src/Test/HUnit/Tools.hs 2014-07-03 21:01:50.373614959 +1000 |
126 |
-@@ -25,7 +25,14 @@ |
127 |
- import Test.QuickCheck.Property hiding (Result(reason)) |
128 |
- import qualified Control.Exception |
129 |
- import qualified Test.HUnit as HU |
130 |
--import System.Random |
131 |
-+#if MIN_VERSION_QuickCheck(2,7,0) |
132 |
-+import Test.QuickCheck.Random (newQCGen, QCGen(..)) |
133 |
-+import System.Random (split) |
134 |
-+#else |
135 |
-+import System.Random (newStdGen, StdGen(..), split) |
136 |
-+#define newStdGen newQCGen |
137 |
-+#define StdGen QCGen |
138 |
-+#endif |
139 |
- import System.IO |
140 |
- import Text.Printf |
141 |
- |
142 |
-@@ -96,7 +103,7 @@ |
143 |
- |
144 |
- {- |
145 |
- -- | modified version of the tests function from Test.QuickCheck |
146 |
--tests :: Args -> Gen Result -> StdGen -> Int -> Int -> [[String]] -> IO () |
147 |
-+tests :: Args -> Gen Result -> QCGen -> Int -> Int -> [[String]] -> IO () |
148 |
- tests config gen rnd0 ntest nfail stamps |
149 |
- | ntest == maxSuccess config = return () |
150 |
- | nfail == maxDiscard config = assertFailure $ "Arguments exhausted after " ++ show ntest ++ " tests." |
151 |
-@@ -128,7 +135,13 @@ |
152 |
- > q "Integer -> Int (safe bounds)" prop_integer_to_int_pass] |
153 |
- -} |
154 |
- qc2hu :: QC.Testable a => Int -> String -> a -> HU.Test |
155 |
--qc2hu maxTest = qccheck (stdArgs {maxSuccess = maxTest, maxDiscard = 20000}) |
156 |
-+qc2hu maxTest = qccheck (stdArgs {maxSuccess = maxTest, |
157 |
-+#if MIN_VERSION_QuickCheck(2,5,0) |
158 |
-+ maxDiscardRatio = if maxTest /= 0 then 20000 `div` maxTest else 10 |
159 |
-+#else |
160 |
-+ maxDiscard = 20000 |
161 |
-+#endif |
162 |
-+ }) |
163 |
- |
164 |
- {- | Run verbose tests. Example: |
165 |
- |
166 |
-@@ -163,18 +176,28 @@ |
167 |
- -- | Tests a property, using test arguments, produces a test result, and prints the results to 'stdout'. |
168 |
- localquickCheckWithResult :: Testable prop => Args -> prop -> IO Result |
169 |
- localquickCheckWithResult args p = |
170 |
-- do |
171 |
- #if MIN_VERSION_QuickCheck(2,3,0) |
172 |
-+#if MIN_VERSION_QuickCheck(2,6,0) |
173 |
-+ (if chatty args then withStdioTerminal else withNullTerminal) $ \tm -> do |
174 |
-+#else |
175 |
-+ do |
176 |
- tm <- if chatty args then newStdioTerminal else newNullTerminal |
177 |
-+#endif |
178 |
- #else |
179 |
-+ do |
180 |
- tm <- newTerminal |
181 |
- #endif |
182 |
- rnd <- case replay args of |
183 |
-- Nothing -> newStdGen |
184 |
-+ Nothing -> newQCGen |
185 |
- Just (rnd,_) -> return rnd |
186 |
- test MkState{ terminal = tm |
187 |
- , maxSuccessTests = maxSuccess args |
188 |
-- , maxDiscardedTests = maxDiscard args |
189 |
-+ , maxDiscardedTests = |
190 |
-+#if MIN_VERSION_QuickCheck(2,5,0) |
191 |
-+ maxDiscardRatio args * maxSuccess args |
192 |
-+#else |
193 |
-+ maxDiscard args |
194 |
-+#endif |
195 |
- , computeSize = case replay args of |
196 |
- Nothing -> \n d -> (n * maxSize args) |
197 |
- `div` maxSuccess args |
198 |
-@@ -190,17 +213,23 @@ |
199 |
- #endif |
200 |
- , numSuccessShrinks = 0 |
201 |
- , numTryShrinks = 0 |
202 |
-+#if MIN_VERSION_QuickCheck(2,7,0) |
203 |
-+ , numRecentlyDiscardedTests = 0 |
204 |
-+ , numTotTryShrinks = 0 |
205 |
-+ } (unGen (unProperty (property p))) |
206 |
-+#else |
207 |
- } (unGen (property p)) |
208 |
-+#endif |
209 |
- where |
210 |
- -------------------------------------------------------------------------- |
211 |
- -- main test loop |
212 |
-- test :: State -> (StdGen -> Int -> Prop) -> IO Result |
213 |
-+ test :: State -> (QCGen -> Int -> Prop) -> IO Result |
214 |
- test st f |
215 |
- | numSuccessTests st >= maxSuccessTests st = doneTesting st f |
216 |
- | numDiscardedTests st >= maxDiscardedTests st = giveUp st f |
217 |
- | otherwise = runATest st f |
218 |
- |
219 |
-- doneTesting :: State -> (StdGen -> Int -> Prop) -> IO Result |
220 |
-+ doneTesting :: State -> (QCGen -> Int -> Prop) -> IO Result |
221 |
- doneTesting st f = |
222 |
- do |
223 |
- #if MIN_VERSION_QuickCheck(2,3,0) |
224 |
-@@ -221,7 +250,7 @@ |
225 |
- #endif |
226 |
- } |
227 |
- |
228 |
-- giveUp :: State -> (StdGen -> Int -> Prop) -> IO Result |
229 |
-+ giveUp :: State -> (QCGen -> Int -> Prop) -> IO Result |
230 |
- giveUp st f = |
231 |
- do |
232 |
- #if MIN_VERSION_QuickCheck(2,3,0) |
233 |
-@@ -234,7 +263,7 @@ |
234 |
- #endif |
235 |
- } |
236 |
- |
237 |
-- runATest :: State -> (StdGen -> Int -> Prop) -> IO Result |
238 |
-+ runATest :: State -> (QCGen -> Int -> Prop) -> IO Result |
239 |
- runATest st f = |
240 |
- do |
241 |
- let size = computeSize st (numSuccessTests st) (numDiscardedTests st) |
242 |
-@@ -266,7 +295,12 @@ |
243 |
- Just False -> -- failed test |
244 |
- do |
245 |
- #if MIN_VERSION_QuickCheck(2,3,0) |
246 |
-+#if MIN_VERSION_QuickCheck(2,3,0) |
247 |
-+ (numShrinks, totFailed, lastFailed) <- foundFailure st res ts |
248 |
-+#else |
249 |
- numShrinks <- foundFailure st res ts |
250 |
-+#endif |
251 |
-+ |
252 |
- theOutput <- terminalOutput (terminal st) |
253 |
- #else |
254 |
- foundFailure st res ts |
255 |
-@@ -288,5 +322,9 @@ |
256 |
- , numShrinks = numShrinks |
257 |
- , output = theOutput |
258 |
- #endif |
259 |
-+#if MIN_VERSION_QuickCheck(2,7,0) |
260 |
-+ , numShrinkTries = totFailed |
261 |
-+ , numShrinkFinal = lastFailed |
262 |
-+#endif |
263 |
- } |
264 |
- where (rnd1,rnd2) = split (randomSeed st) |
265 |
---- testpack-2.1.2.1-orig/src/Test/QuickCheck/Tools.hs 2013-02-26 02:03:46.000000000 +1100 |
266 |
-+++ testpack-2.1.2.1/src/Test/QuickCheck/Tools.hs 2014-07-03 21:01:23.932306995 +1000 |
267 |
-@@ -23,15 +23,27 @@ |
268 |
- |
269 |
- ) |
270 |
- where |
271 |
-+#if MIN_VERSION_QuickCheck(2,6,0) |
272 |
-+import Test.QuickCheck.Property (Result(..), callbacks, expect, theException, ok, reason, stamp) |
273 |
-+#if MIN_VERSION_QuickCheck(2,7,0) |
274 |
-+#else |
275 |
-+import Test.QuickCheck.Property (Result(..), callbacks, expect, interrupted, ok, reason, stamp) |
276 |
-+#endif |
277 |
-+#else |
278 |
- import Test.QuickCheck hiding (Result, reason) |
279 |
- import Test.QuickCheck.Property |
280 |
-+#endif |
281 |
- |
282 |
- {- | Compare two values. If same, the test passes. If different, the result indicates |
283 |
- what was expected and what was received as part of the error. -} |
284 |
- (@=?) :: (Eq a, Show a) => a -> a -> Result |
285 |
- expected @=? actual = |
286 |
- MkResult {ok = Just (expected == actual), |
287 |
-+#if MIN_VERSION_QuickCheck(2,7,0) |
288 |
-+ expect = True, theException = Nothing, |
289 |
-+#else |
290 |
- expect = True, interrupted = False, |
291 |
-+#endif |
292 |
- reason = "Result: expected " ++ show expected ++ ", got " ++ show actual, |
293 |
- stamp = [], callbacks = []} |
294 |
- |