summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Vershilov <qnikst@gentoo.org>2013-08-25 06:33:45 +0000
committerAlexander Vershilov <qnikst@gentoo.org>2013-08-25 06:33:45 +0000
commit9372613f2a3e5aa9e4fa881e7199db22bac29fb8 (patch)
tree2267a6083d6ab963706e17f4b55fd389f2aa2ce8 /dev-haskell/test-framework-th
parentdev-haskell/language-haskell-extract: 0.2.4 (diff)
downloadgentoo-2-9372613f2a3e5aa9e4fa881e7199db22bac29fb8.tar.gz
gentoo-2-9372613f2a3e5aa9e4fa881e7199db22bac29fb8.tar.bz2
gentoo-2-9372613f2a3e5aa9e4fa881e7199db22bac29fb8.zip
dev-haskell/test-framework-th: 0.2.4
(Portage version: 2.2.1/cvs/Linux x86_64, signed Manifest commit with key 0xEAD50D64D8D3571A!)
Diffstat (limited to 'dev-haskell/test-framework-th')
-rw-r--r--dev-haskell/test-framework-th/ChangeLog9
-rw-r--r--dev-haskell/test-framework-th/metadata.xml54
-rw-r--r--dev-haskell/test-framework-th/test-framework-th-0.2.4.ebuild27
3 files changed, 90 insertions, 0 deletions
diff --git a/dev-haskell/test-framework-th/ChangeLog b/dev-haskell/test-framework-th/ChangeLog
new file mode 100644
index 000000000000..e777004dcccd
--- /dev/null
+++ b/dev-haskell/test-framework-th/ChangeLog
@@ -0,0 +1,9 @@
+# ChangeLog for dev-haskell/test-framework-th
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-haskell/test-framework-th/ChangeLog,v 1.1 2013/08/25 06:33:45 qnikst Exp $
+
+*test-framework-th-0.2.4 (25 Aug 2013)
+
+ 25 Aug 2013; Alexander Vershilov <qnikst@gentoo.org> +metadata.xml,
+ +test-framework-th-0.2.4.ebuild:
+ dev-haskell/test-framework-th: 0.2.4
diff --git a/dev-haskell/test-framework-th/metadata.xml b/dev-haskell/test-framework-th/metadata.xml
new file mode 100644
index 000000000000..a0dcdee4a393
--- /dev/null
+++ b/dev-haskell/test-framework-th/metadata.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>haskell</herd>
+ <maintainer>
+ <email>haskell@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+ @test-framework-th@ contains two interesting functions: @defaultMainGenerator@ and @testGroupGenerator@.
+
+ @defaultMainGenerator@ will extract all functions beginning with case_ or prop_ in the module and put them in a testGroup.
+
+ &gt; -- file SomeModule.hs
+ &gt; ( -# LANGUAGE TemplateHaskell #- )
+ &gt; module SomeModule where
+ &gt; import Test.Framework.TH
+ &gt; import Test.Framework
+ &gt; import Test.HUnit
+ &gt; import Test.Framework.Providers.HUnit
+ &gt; import Test.Framework.Providers.QuickCheck2
+ &gt;
+ &gt; -- observe this line!
+ &gt; main = $(defaultMainGenerator)
+ &gt; case_1 = do 1 @=? 1
+ &gt; case_2 = do 2 @=? 2
+ &gt; prop_reverse xs = reverse (reverse xs) == xs
+ &gt; where types = xs::[Int]
+
+ is the same as
+
+ &gt; -- file SomeModule.hs
+ &gt; ( -# LANGUAGE TemplateHaskell #- )
+ &gt; module SomeModule where
+ &gt; import Test.Framework.TH
+ &gt; import Test.Framework
+ &gt; import Test.HUnit
+ &gt; import Test.Framework.Providers.HUnit
+ &gt; import Test.Framework.Providers.QuickCheck2
+ &gt;
+ &gt; -- observe this line!
+ &gt; main =
+ &gt; defaultMain [
+ &gt; testGroup &quot;SomeModule&quot; [ testCase &quot;1&quot; case_1, testCase &quot;2&quot; case_2, testProperty &quot;reverse&quot; prop_reverse]
+ &gt; ]
+ &gt;
+ &gt; case_1 = do 1 @=? 1
+ &gt; case_2 = do 2 @=? 2
+ &gt; prop_reverse xs = reverse (reverse xs) == xs
+ &gt; where types = xs::[Int]
+
+ @testGroupGenerator@ is like @defaultMainGenerator@ but without @defaultMain@. It is useful if you need a function for the testgroup
+ (e.g. if you want to be able to call the testgroup from another module).
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-haskell/test-framework-th/test-framework-th-0.2.4.ebuild b/dev-haskell/test-framework-th/test-framework-th-0.2.4.ebuild
new file mode 100644
index 000000000000..066126e95f0b
--- /dev/null
+++ b/dev-haskell/test-framework-th/test-framework-th-0.2.4.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-haskell/test-framework-th/test-framework-th-0.2.4.ebuild,v 1.1 2013/08/25 06:33:45 qnikst Exp $
+
+EAPI=5
+
+# ebuild generated by hackport 0.3.1.9999
+
+CABAL_FEATURES="lib profile haddock hoogle hscolour"
+inherit haskell-cabal
+
+DESCRIPTION="Automagically generate the HUnit- and Quickcheck-bulk-code using Template Haskell."
+HOMEPAGE="http://github.com/finnsson/test-generator"
+SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-haskell/haskell-src-exts:=[profile?]
+ >=dev-haskell/language-haskell-extract-0.2:=[profile?]
+ dev-haskell/regex-posix:=[profile?]
+ dev-haskell/test-framework:=[profile?]
+ >=dev-lang/ghc-6.10.4:="
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.6"