summaryrefslogtreecommitdiff
path: root/dev-haskell/test-framework-th
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-haskell/test-framework-th
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-haskell/test-framework-th')
-rw-r--r--dev-haskell/test-framework-th/Manifest3
-rw-r--r--dev-haskell/test-framework-th/metadata.xml57
-rw-r--r--dev-haskell/test-framework-th/test-framework-th-0.2.4.ebuild26
3 files changed, 86 insertions, 0 deletions
diff --git a/dev-haskell/test-framework-th/Manifest b/dev-haskell/test-framework-th/Manifest
new file mode 100644
index 000000000000..db4ed864d2bb
--- /dev/null
+++ b/dev-haskell/test-framework-th/Manifest
@@ -0,0 +1,3 @@
+DIST test-framework-th-0.2.4.tar.gz 2977 BLAKE2B f43f3f964eecfba401db1fb574ab9ef4bf9b575251a60f196ddd451c23f8c29ea44f90d441eae2f5d923d053061a247820fc0a399e59e1eb088ba31abf38ef44 SHA512 0e8b6898eb7bf481bafb0c9ff9caa615dbf768e538e26b15ab899c5c9a1ad6bd6ed76ef93cf9a823706046d41f49fbb0cbe660bf846e59a608a0e5d21e89686b
+EBUILD test-framework-th-0.2.4.ebuild 766 BLAKE2B 9bdeee5d706ddf3e2d4cfe3bf3135597f4c254d6901c71188901cbe530884e25cd31ea1cb7628267fb1d2ef3b9adc41d513b0555e2f613eec3800b57ab4d733a SHA512 dd5a70871127719b19d232dcea41a8d6247373a55e4f0eaf096304735083daa9150098dc63cd7f8dad6a55e922817b9f9bafab3081e056927742e912cd123325
+MISC metadata.xml 1980 BLAKE2B 5048d5716f585e4b30b73713b513fb44dac589fa4a9b13a96b659159e412c074d3877d201319a72798119f633b49389d9e1643afc3c9935f5970e685625e464f SHA512 6fa19ea53be7c7dc114c6bdc70b41cd0ebf60c7a25f36cd2035ef7225c1da11e5de7d08eaf1bf41df7d305db5be5f3a26aea089a6a117481fd361ed3d0a2701c
diff --git a/dev-haskell/test-framework-th/metadata.xml b/dev-haskell/test-framework-th/metadata.xml
new file mode 100644
index 000000000000..a8fce2d224aa
--- /dev/null
+++ b/dev-haskell/test-framework-th/metadata.xml
@@ -0,0 +1,57 @@
+<?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>
+ @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 "SomeModule" [ testCase "1" case_1, testCase "2" case_2, testProperty "reverse" 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>
+ <upstream>
+ <remote-id type="github">finnsson/test-generator</remote-id>
+ </upstream>
+</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..f6ca21ec7769
--- /dev/null
+++ b/dev-haskell/test-framework-th/test-framework-th-0.2.4.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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 code using Template Haskell"
+HOMEPAGE="https://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"