diff options
author | Alexander Vershilov <qnikst@gentoo.org> | 2013-08-25 06:33:45 +0000 |
---|---|---|
committer | Alexander Vershilov <qnikst@gentoo.org> | 2013-08-25 06:33:45 +0000 |
commit | 9372613f2a3e5aa9e4fa881e7199db22bac29fb8 (patch) | |
tree | 2267a6083d6ab963706e17f4b55fd389f2aa2ce8 /dev-haskell/test-framework-th | |
parent | dev-haskell/language-haskell-extract: 0.2.4 (diff) | |
download | gentoo-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/ChangeLog | 9 | ||||
-rw-r--r-- | dev-haskell/test-framework-th/metadata.xml | 54 | ||||
-rw-r--r-- | dev-haskell/test-framework-th/test-framework-th-0.2.4.ebuild | 27 |
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. + + > -- file SomeModule.hs + > ( -# LANGUAGE TemplateHaskell #- ) + > module SomeModule where + > import Test.Framework.TH + > import Test.Framework + > import Test.HUnit + > import Test.Framework.Providers.HUnit + > import Test.Framework.Providers.QuickCheck2 + > + > -- observe this line! + > main = $(defaultMainGenerator) + > case_1 = do 1 @=? 1 + > case_2 = do 2 @=? 2 + > prop_reverse xs = reverse (reverse xs) == xs + > where types = xs::[Int] + + is the same as + + > -- file SomeModule.hs + > ( -# LANGUAGE TemplateHaskell #- ) + > module SomeModule where + > import Test.Framework.TH + > import Test.Framework + > import Test.HUnit + > import Test.Framework.Providers.HUnit + > import Test.Framework.Providers.QuickCheck2 + > + > -- observe this line! + > main = + > defaultMain [ + > testGroup "SomeModule" [ testCase "1" case_1, testCase "2" case_2, testProperty "reverse" prop_reverse] + > ] + > + > case_1 = do 1 @=? 1 + > case_2 = do 2 @=? 2 + > prop_reverse xs = reverse (reverse xs) == xs + > 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" |