dev-haskell / test-framework-th

Automagically generate the HUnit and Quickcheck code using Template Haskell

Official package sites : https://github.com/finnsson/test-generator ·

@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).

v0.2.4 :: 0/0.2.4 :: gentoo

Modified
License
BSD
Keywords
amd64 x86
USE flags
doc hscolour profile

General

doc
Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
hscolour
Include coloured haskell sources to generated documentation (dev-haskell/hscolour)
profile
Add support for software performance analysis (will likely vary from ebuild to ebuild)

dev-haskell / cabal : A framework for packaging Haskell software

dev-haskell / haddock : A documentation-generation tool for Haskell libraries

dev-haskell / haskell-src-exts : Manipulating Haskell source: abstract syntax, lexer, parser, and pretty-printer

dev-haskell / hscolour : Colourise Haskell code

dev-haskell / language-haskell-extract : Module to automatically extract functions from the local code

dev-haskell / regex-posix : Replaces/Enhances Text.Regex

dev-haskell / test-framework : Framework for running and organising tests, with HUnit and QuickCheck support

dev-lang / ghc : The Glasgow Haskell Compiler

dev-haskell / haskell-src-exts : Manipulating Haskell source: abstract syntax, lexer, parser, and pretty-printer

dev-haskell / language-haskell-extract : Module to automatically extract functions from the local code

dev-haskell / regex-posix : Replaces/Enhances Text.Regex

dev-haskell / test-framework : Framework for running and organising tests, with HUnit and QuickCheck support

dev-lang / ghc : The Glasgow Haskell Compiler

dev-haskell / dataenc : Data encoding library

dev-haskell / lens : Lenses, Folds and Traversals

dev-haskell / monad-par : A library for parallel programming based on a monad

Robin H. Johnson · gentoo
Drop $Id$ per council decision in bug #611234.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Sergei Trofimovich · gentoo
dev-haskell/test-framework-th: fix DESCRIPTION length
Package-Manager: portage-2.2.28
Sergei Trofimovich · gentoo
dev-haskell/test-framework-th: stable for x86, amd64
Package-Manager: portage-2.2.27
Justin Lecher · gentoo
Use https by default
Signed-off-by: Justin Lecher <jlec@gentoo.org>
Robin H. Johnson · gentoo
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed