-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | Automatic tasty test case discovery using TH
--   
--   Generate tasty TestTrees automatically with TemplateHaskell. See the
--   README for example usage.
@package tasty-th
@version 0.1.7

-- | This module provides TemplateHaskell functions to automatically
--   generate tasty TestTrees from specially named functions. See the
--   README of the package for examples.
--   
--   Important: due to to the GHC staging restriction, you must put any
--   uses of these functions at the end of the file, or you may get errors
--   due to missing definitions.
module Test.Tasty.TH

-- | This function generates a TestTree from functions in the
--   current module. The test tree is named after the current module.
--   
--   The following definitions are collected by testGroupGenerator:
--   
--   
--   
- a test_something definition in the current module creates a
--   sub-testGroup with the name "something"
--   
- a prop_something definition in the current module is added as a
--   QuickCheck property named "something"
--   
- a case_something definition leads to a HUnit-Assertion test with
--   the name "something"
--   
--   
--   Example usage:
--   
--   
--   prop_example :: Int -> Int -> Bool
--   prop_example a b = a + b == b + a
--   
--   tests :: TestTree
--   tests = $(testGroupGenerator)
--   
testGroupGenerator :: ExpQ

-- | Convenience function that directly generates an IO action that
--   may be used as the main function. It's just a wrapper that applies
--   defaultMain to the TestTree generated by
--   testGroupGenerator.
--   
--   Example usage:
--   
--   
--   -- properties, test cases, ....
--   
--   main :: IO ()
--   main = $(defaultMainGenerator)
--   
defaultMainGenerator :: ExpQ

-- | Like testGroupGenerator, but generates a test group only
--   including the specified function names. The function names still need
--   to follow the pattern of starting with one of prop_,
--   case_ or test_.
testGroupGeneratorFor :: String -> [String] -> ExpQ

-- | Like defaultMainGenerator, but only includes the specific
--   function names in the test group. The function names still need to
--   follow the pattern of starting with one of prop_,
--   case_ or test_.
defaultMainGeneratorFor :: String -> [String] -> ExpQ

-- | Retrieves all function names from the given file that would be
--   discovered by testGroupGenerator.
extractTestFunctions :: FilePath -> IO [String]

-- | Extract the name of the current module.
locationModule :: ExpQ
