| Copyright | Thomas Tuegel 2010 |
|---|---|
| License | BSD3 |
| Maintainer | cabal-devel@haskell.org |
| Portability | portable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Distribution.TestSuite
Description
This module defines the detailed test suite interface which makes it possible to expose individual tests to Cabal or other test agents.
Synopsis
- data TestInstance = TestInstance {}
- data OptionDescr = OptionDescr {}
- data OptionType
- = OptionFile { }
- | OptionString { }
- | OptionNumber { }
- | OptionBool
- | OptionEnum [String]
- | OptionSet [String]
- | OptionRngSeed
- data Test
- = Test TestInstance
- | Group {
- groupName :: String
- concurrently :: Bool
- groupTests :: [Test]
- | ExtraOptions [OptionDescr] Test
- type Options = [(String, String)]
- data Progress
- data Result
- testGroup :: String -> [Test] -> Test
Documentation
data TestInstance Source #
Constructors
Fields
- run :: IO Progress
Perform the test.
- name :: String
A name for the test, unique within a test suite.
- tags :: [String]
Users can select groups of tests by their tags.
- options :: [OptionDescr]
Descriptions of the options recognized by this test.
- setOption :: String -> String -> Either String TestInstance
Try to set the named option to the given value. Returns an error message if the option is not supported or the value could not be correctly parsed; otherwise, a
TestInstancewith the option set to the given value is returned.
data OptionDescr Source #
Constructors
Fields
- optionName :: String
- optionDescription :: String
A human-readable description of the option to guide the user setting it.
- optionType :: OptionType
- optionDefault :: Maybe String
Instances
Instances details
Instance details
Defined in Distribution.TestSuite
Methods
readsPrec :: Int -> ReadS OptionDescr #
readList :: ReadS [OptionDescr] #
readPrec :: ReadPrec OptionDescr #
readListPrec :: ReadPrec [OptionDescr] #
Instance details
Defined in Distribution.TestSuite
Methods
showsPrec :: Int -> OptionDescr -> ShowS #
show :: OptionDescr -> String #
showList :: [OptionDescr] -> ShowS #
Instance details
Defined in Distribution.TestSuite
data OptionType Source #
Constructors
Fields
Fields
Fields
Instances
Instances details
Instance details
Defined in Distribution.TestSuite
Methods
readsPrec :: Int -> ReadS OptionType #
readList :: ReadS [OptionType] #
readPrec :: ReadPrec OptionType #
readListPrec :: ReadPrec [OptionType] #
Instance details
Defined in Distribution.TestSuite
Methods
showsPrec :: Int -> OptionType -> ShowS #
show :: OptionType -> String #
showList :: [OptionType] -> ShowS #
Instance details
Defined in Distribution.TestSuite
Constructors
Fields
- groupName :: String
- concurrently :: Bool
If true, then children of this group may be run in parallel. Note that this setting is not inherited by children. In particular, consider a group F with "concurrently = False" that has some children, including a group T with "concurrently = True". The children of group T may be run concurrently with each other, as long as none are run at the same time as any of the direct children of group F.
- groupTests :: [Test]