dev-haskell/testpack: drop masked package

Closes: https://bugs.gentoo.org/736248
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
This commit is contained in:
Sergei Trofimovich
2020-09-20 10:04:27 +01:00
parent a2c72597ac
commit 0877762fa7
7 changed files with 0 additions and 223 deletions

View File

@@ -1 +0,0 @@
DIST testpack-2.1.3.0.tar.gz 15466 BLAKE2B 309d3f6681f7e72522ad7411e9d90c4d02b13ccb4dd6d463bc0c5ec298c94ddd4eb25c71feb839e01aec343ab415ac22a03e14714d4fe69716530835eb0f87d8 SHA512 4e9d08a8065c7f2354445e2e81f07d47a7aabead66a4d474728dc3e6bd6244b9d61fa00f8519fd0d10edea54f232e3f7f45ba67d568daccc128bc317597b4ee8

View File

@@ -1,13 +0,0 @@
diff --git a/src/Test/HUnit/Tools.hs b/src/Test/HUnit/Tools.hs
index a24a510..6b8a25e 100644
--- a/src/Test/HUnit/Tools.hs
+++ b/src/Test/HUnit/Tools.hs
@@ -97,3 +97,7 @@ runVerbTestText (HU.PutText put us) t = do
reportFailure = reportProblem "Failure:" "Failure in: "
- reportProblem p0 p1 msg ss us = put line True us
+ reportProblem p0 p1
+#if MIN_VERSION_HUnit(1,3,0)
+ _loc
+#endif
+ msg ss us = put line True us
where line = "### " ++ kind ++ path' ++ '\n' : msg

View File

@@ -1,12 +0,0 @@
diff --git a/src/Test/QuickCheck/Instances.hs b/src/Test/QuickCheck/Instances.hs
index 98367b7..f65eb37 100644
--- a/src/Test/QuickCheck/Instances.hs
+++ b/src/Test/QuickCheck/Instances.hs
@@ -30,2 +30,3 @@ import Data.Word
+#if ! MIN_VERSION_QuickCheck(2,8,2)
instance (Arbitrary k, Arbitrary v, Eq k, Ord k) => Arbitrary (Map.Map k v) where
@@ -37,2 +38,3 @@ instance (CoArbitrary k, CoArbitrary v, Eq k, Ord k) => CoArbitrary (Map.Map k v
coarbitrary = coarbitrary . Map.keys
+#endif

View File

@@ -1,139 +0,0 @@
diff --git a/src/Test/HUnit/Tools.hs b/src/Test/HUnit/Tools.hs
index 2b66548..a24a510 100644
--- a/src/Test/HUnit/Tools.hs
+++ b/src/Test/HUnit/Tools.hs
@@ -18,9 +18,9 @@ module Test.HUnit.Tools (assertRaises, mapassertEqual,
where
import Test.QuickCheck as QC
import Test.QuickCheck.Text
-import Test.QuickCheck.Test
+import Test.QuickCheck.Test as TQT
import Test.QuickCheck.Gen
-import Test.QuickCheck.State
+import Test.QuickCheck.State as TQS
import qualified Test.QuickCheck.Property as P
import Test.QuickCheck.Property hiding (Result(reason))
import qualified Control.Exception
@@ -33,6 +33,9 @@ import System.Random (newStdGen, StdGen(..), split)
#define newStdGen newQCGen
#define StdGen QCGen
#endif
+#if MIN_VERSION_QuickCheck(2,8,0)
+import qualified Data.Map as Map
+#endif
import System.IO
import Text.Printf
@@ -205,6 +208,9 @@ localquickCheckWithResult args p =
Just (_,s) -> \_ _ -> s
, numSuccessTests = 0
, numDiscardedTests = 0
+#if MIN_VERSION_QuickCheck(2,8,0)
+ , TQS.labels = Map.empty
+#endif
, collected = []
, expectedFailure = False
, randomSeed = rnd
@@ -236,14 +242,14 @@ localquickCheckWithResult args p =
theOutput <- terminalOutput (terminal st)
#endif
if expectedFailure st then
- return Success{ labels = summary st
+ return Success{ TQT.labels = summary st
#if MIN_VERSION_QuickCheck(2,3,0)
, numTests = numSuccessTests st
, output = theOutput
#endif
}
else
- return NoExpectedFailure{ labels = summary st
+ return NoExpectedFailure{ TQT.labels = summary st
#if MIN_VERSION_QuickCheck(2,3,0)
, numTests = numSuccessTests st
, output = theOutput
@@ -257,7 +263,7 @@ localquickCheckWithResult args p =
theOutput <- terminalOutput (terminal st)
#endif
return GaveUp{ numTests = numSuccessTests st
- , labels = summary st
+ , TQT.labels = summary st
#if MIN_VERSION_QuickCheck(2,3,0)
, output = theOutput
#endif
@@ -306,7 +312,7 @@ localquickCheckWithResult args p =
foundFailure st res ts
#endif
if not (expect res) then
- return Success{ labels = summary st
+ return Success{ TQT.labels = summary st
#if MIN_VERSION_QuickCheck(2,3,0)
, numTests = numSuccessTests st+1
, output = theOutput
@@ -316,7 +322,7 @@ localquickCheckWithResult args p =
return Failure{ usedSeed = randomSeed st -- correct! (this will be split first)
, usedSize = size
, reason = P.reason res
- , labels = summary st
+ , TQT.labels = summary st
#if MIN_VERSION_QuickCheck(2,3,0)
, numTests = numSuccessTests st + 1
, numShrinks = numShrinks
diff --git a/src/Test/QuickCheck/Tools.hs b/src/Test/QuickCheck/Tools.hs
index 712c9bf..506686f 100644
--- a/src/Test/QuickCheck/Tools.hs
+++ b/src/Test/QuickCheck/Tools.hs
@@ -20,34 +20,18 @@ Written by John Goerzen, jgoerzen\@complete.org
module Test.QuickCheck.Tools (-- * Comparisons
(@=?),
(@?=)
-
)
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
+
+import qualified Test.QuickCheck.Property as P
{- | 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
+(@=?) :: (Eq a, Show a) => a -> a -> P.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 = []}
-
+ P.failed { P.ok = Just (expected == actual)
+ , P.reason = "Result: expected " ++ show expected ++ ", got " ++ show actual
+ }
{- | Like '@=?', but with args in a different order. -}
-(@?=) :: (Eq a, Show a) => a -> a -> Result
+(@?=) :: (Eq a, Show a) => a -> a -> P.Result
(@?=) = flip (@=?)
-
diff --git a/testpack.cabal b/testpack.cabal
index 0873b33..dab77d9 100644
--- a/testpack.cabal
+++ b/testpack.cabal
@@ -46,7 +46,7 @@ Library
Build-Depends: base >= 3 && < 5,
mtl, HUnit,
- QuickCheck >= 2.1.0.3 && < 2.8
+ QuickCheck >= 2.1.0.3
If flag(splitBase)
Build-Depends: base >= 3 && < 5, containers, random

View File

@@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>haskell@gentoo.org</email>
<name>Gentoo Haskell</name>
</maintainer>
<longdescription>
Testpack provides utilities for both HUnit and QuickCheck. These include
tools for running QuickCheck properties as HUnit test cases, allowing you to
combine both approaches in a single program. It also includes tools for more
helpful displays of running progress in both HUnit and QuickCheck, additional
generators for other types for QuickCheck, and shortcuts for quickly defining new.
</longdescription>
<upstream>
<remote-id type="github">jgoerzen/testpack</remote-id>
</upstream>
</pkgmetadata>

View File

@@ -1,34 +0,0 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=5
# ebuild generated by hackport 0.4.4.9999
CABAL_FEATURES="lib profile haddock hoogle hscolour"
inherit eutils haskell-cabal
DESCRIPTION="Test Utililty Pack for HUnit and QuickCheck (unmaintained)"
HOMEPAGE="https://github.com/jgoerzen/testpack"
SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"
LICENSE="LGPL-2.1"
SLOT="0/${PV}"
KEYWORDS="~amd64 ~x86"
IUSE=""
RDEPEND="dev-haskell/hunit:=[profile?]
dev-haskell/mtl:=[profile?]
>=dev-haskell/quickcheck-2.1.0.3:2=[profile?]
dev-haskell/random:=[profile?]
>=dev-lang/ghc-7.4.1:=
"
DEPEND="${RDEPEND}
>=dev-haskell/cabal-1.6
"
src_prepare() {
epatch "${FILESDIR}"/${P}-qc28.patch
epatch "${FILESDIR}"/${P}-HUnit-1.3.patch
epatch "${FILESDIR}"/${P}-QC-2.8.2.patch
}

View File

@@ -653,12 +653,6 @@ games-action/openclonk
# Bug #736244.
dev-haskell/regex-tdfa-rc
# Sergei Trofimovich <slyfox@gentoo.org> (2020-08-21)
# Obsolete package without reverse dependencies.
# Does not compile against ghc-8.8. Removal in 30 days.
# Bug #736248.
dev-haskell/testpack
# Kent Fredric <kentnl@gentoo.org> (2020-08-17)
# No reverse dependencies, and gtk2 support is becoming
# obsolete in Gentoo