packages feed

test-framework-th-0.1.2: test-framework-th.cabal

name: test-framework-th
version: 0.1.2
cabal-version: -any
build-type: Simple
license: BSD3
maintainer: Oscar Finnsson
build-depends: base >= 4 && < 5, test-framework, language-haskell-extract, haskell-src-exts, haskell98, regex-posix, template-haskell
stability:
homepage: http://github.com/finnsson/test-generator
package-url:
bug-reports:
synopsis: Automagically generate the HUnit- and Quickcheck-bulk-code using Template Haskell.
description:
   @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.
   .
   > module Foo where
   > main = $(defaultMainGenerator)
   >
   > case_Two = 2 @=? 2
   > case_Hi = "hi" @=? "hi"
   > prop_Reverse xs = reverse (reverse xs) == xs
   >  where types = xs :: [Int]
  .
  is the same as
  .
  > module Foo where
  > main = defaultMain [testGroup "Foo" [testProperty "Reverse" prop_Reverse, testCase "Two" case_Two, testCase "Hi" case_Hi]
  >
  > case_Two = 2 @=? 2
  > case_Hi = "hi" @=? "hi"
  > 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).
category: Testing
author: Oscar Finnsson & Emil Nordling
tested-with:
data-files:
data-dir: ""
extra-source-files:
extra-tmp-files:
exposed-modules: Test.Framework.TH 
exposed: True
buildable: True
build-tools:
cpp-options:
cc-options:
ld-options:
pkgconfig-depends:
frameworks:
c-sources:
extensions:
extra-libraries:
extra-lib-dirs:
includes:
install-includes:
include-dirs:
hs-source-dirs: src
other-modules:
ghc-prof-options:
ghc-shared-options:
ghc-options:
hugs-options:
nhc98-options:
jhc-options: