tasty-hspec-1.1.3.2: Hspec support for the Tasty test framework.

Safe Haskell | None
Language | Haskell2010

Test.Tasty.Hspec

Contents

- Test
- Options
- Hspec re-export

Synopsis

- testSpec :: TestName -> Spec -> IO TestTree
- testSpecs :: Spec -> IO [TestTree]
- newtype SmallCheckDepth :: * = SmallCheckDepth Int
- newtype QuickCheckMaxRatio :: * = QuickCheckMaxRatio Int
- newtype QuickCheckMaxSize :: * = QuickCheckMaxSize Int
- newtype QuickCheckReplay :: * = QuickCheckReplay (Maybe (QCGen, Int))
- newtype QuickCheckTests :: * = QuickCheckTests Int
- module Test.Hspec

# Test

testSpec :: TestName -> Spec -> IO TestTree Source #

Create a tasty `TestTree` from an Hspec `Spec`.

testSpecs :: Spec -> IO [TestTree] Source #

Create a list of tasty `TestTree` from a Hspec `Spec` test. This returns the same tests as `testSpec` but doesn't create a tasty test group from them.

# Options

### Re-exported from tasty-smallcheck

newtype SmallCheckDepth :: * #

The "depth" parameter for SmallCheck

Constructors

SmallCheckDepth Int |

Instances

Enum SmallCheckDepth |

Methods

succ :: SmallCheckDepth -> SmallCheckDepth #

pred :: SmallCheckDepth -> SmallCheckDepth #

toEnum :: Int -> SmallCheckDepth #

fromEnum :: SmallCheckDepth -> Int #

enumFrom :: SmallCheckDepth -> [SmallCheckDepth] #

enumFromThen :: SmallCheckDepth -> SmallCheckDepth -> [SmallCheckDepth] #

enumFromTo :: SmallCheckDepth -> SmallCheckDepth -> [SmallCheckDepth] #

enumFromThenTo :: SmallCheckDepth -> SmallCheckDepth -> SmallCheckDepth -> [SmallCheckDepth] #

Eq SmallCheckDepth |
Methods (==) :: SmallCheckDepth -> SmallCheckDepth -> Bool # (/=) :: SmallCheckDepth -> SmallCheckDepth -> Bool #
Integral SmallCheckDepth |

Methods

quot :: SmallCheckDepth -> SmallCheckDepth -> SmallCheckDepth #

rem :: SmallCheckDepth -> SmallCheckDepth -> SmallCheckDepth #

div :: SmallCheckDepth -> SmallCheckDepth -> SmallCheckDepth #

mod :: SmallCheckDepth -> SmallCheckDepth -> SmallCheckDepth #

quotRem :: SmallCheckDepth -> SmallCheckDepth -> (SmallCheckDepth, SmallCheckDepth) #

divMod :: SmallCheckDepth -> SmallCheckDepth -> (SmallCheckDepth, SmallCheckDepth) #

toInteger :: SmallCheckDepth -> Integer #

Num SmallCheckDepth |
Methods (+) :: SmallCheckDepth -> SmallCheckDepth -> SmallCheckDepth # (-) :: SmallCheckDepth -> SmallCheckDepth -> SmallCheckDepth # (*) :: SmallCheckDepth -> SmallCheckDepth -> SmallCheckDepth # negate :: SmallCheckDepth -> SmallCheckDepth # abs :: SmallCheckDepth -> SmallCheckDepth # signum :: SmallCheckDepth -> SmallCheckDepth # fromInteger :: Integer -> SmallCheckDepth #
Ord SmallCheckDepth |

Methods

compare :: SmallCheckDepth -> SmallCheckDepth -> Ordering #

(<) :: SmallCheckDepth -> SmallCheckDepth -> Bool #

(<=) :: SmallCheckDepth -> SmallCheckDepth -> Bool #

(>) :: SmallCheckDepth -> SmallCheckDepth -> Bool #

(>=) :: SmallCheckDepth -> SmallCheckDepth -> Bool #

max :: SmallCheckDepth -> SmallCheckDepth -> SmallCheckDepth #

min :: SmallCheckDepth -> SmallCheckDepth -> SmallCheckDepth #

Real SmallCheckDepth |
Methods toRational :: SmallCheckDepth -> Rational #
IsOption SmallCheckDepth |
Methods defaultValue :: SmallCheckDepth # parseValue :: String -> Maybe SmallCheckDepth # optionName :: Tagged * SmallCheckDepth String # optionHelp :: Tagged * SmallCheckDepth String # optionCLParser :: Parser SmallCheckDepth #

### Re-exported from tasty-quickcheck

newtype QuickCheckMaxRatio :: * #

Maximum number of of discarded tests per successful test before giving up.

Constructors

QuickCheckMaxRatio Int |

Instances

Enum QuickCheckMaxRatio |

Methods

succ :: QuickCheckMaxRatio -> QuickCheckMaxRatio #

pred :: QuickCheckMaxRatio -> QuickCheckMaxRatio #

toEnum :: Int -> QuickCheckMaxRatio #

fromEnum :: QuickCheckMaxRatio -> Int #

enumFrom :: QuickCheckMaxRatio -> [QuickCheckMaxRatio] #

enumFromThen :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> [QuickCheckMaxRatio] #

enumFromTo :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> [QuickCheckMaxRatio] #

enumFromThenTo :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> QuickCheckMaxRatio -> [QuickCheckMaxRatio] #

Eq QuickCheckMaxRatio |
Methods (==) :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> Bool # (/=) :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> Bool #
Integral QuickCheckMaxRatio |

Methods

quot :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> QuickCheckMaxRatio #

rem :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> QuickCheckMaxRatio #

div :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> QuickCheckMaxRatio #

mod :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> QuickCheckMaxRatio #

quotRem :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> (QuickCheckMaxRatio, QuickCheckMaxRatio) #

divMod :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> (QuickCheckMaxRatio, QuickCheckMaxRatio) #

toInteger :: QuickCheckMaxRatio -> Integer #

Num QuickCheckMaxRatio |

Methods

(+) :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> QuickCheckMaxRatio #

(-) :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> QuickCheckMaxRatio #

(*) :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> QuickCheckMaxRatio #

negate :: QuickCheckMaxRatio -> QuickCheckMaxRatio #

abs :: QuickCheckMaxRatio -> QuickCheckMaxRatio #

signum :: QuickCheckMaxRatio -> QuickCheckMaxRatio #

fromInteger :: Integer -> QuickCheckMaxRatio #

Ord QuickCheckMaxRatio |

Methods

compare :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> Ordering #

(<) :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> Bool #

(<=) :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> Bool #

(>) :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> Bool #

(>=) :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> Bool #

max :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> QuickCheckMaxRatio #

min :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> QuickCheckMaxRatio #

Real QuickCheckMaxRatio |
Methods toRational :: QuickCheckMaxRatio -> Rational #
IsOption QuickCheckMaxRatio |
Methods defaultValue :: QuickCheckMaxRatio # parseValue :: String -> Maybe QuickCheckMaxRatio # optionName :: Tagged * QuickCheckMaxRatio String # optionHelp :: Tagged * QuickCheckMaxRatio String # optionCLParser :: Parser QuickCheckMaxRatio #

newtype QuickCheckMaxSize :: * #

Size of the biggest test cases

Constructors

QuickCheckMaxSize Int |

Instances

Enum QuickCheckMaxSize |

Methods

succ :: QuickCheckMaxSize -> QuickCheckMaxSize #

pred :: QuickCheckMaxSize -> QuickCheckMaxSize #

toEnum :: Int -> QuickCheckMaxSize #

fromEnum :: QuickCheckMaxSize -> Int #

enumFrom :: QuickCheckMaxSize -> [QuickCheckMaxSize] #

enumFromThen :: QuickCheckMaxSize -> QuickCheckMaxSize -> [QuickCheckMaxSize] #

enumFromTo :: QuickCheckMaxSize -> QuickCheckMaxSize -> [QuickCheckMaxSize] #

enumFromThenTo :: QuickCheckMaxSize -> QuickCheckMaxSize -> QuickCheckMaxSize -> [QuickCheckMaxSize] #

Eq QuickCheckMaxSize |
Methods (==) :: QuickCheckMaxSize -> QuickCheckMaxSize -> Bool # (/=) :: QuickCheckMaxSize -> QuickCheckMaxSize -> Bool #
Integral QuickCheckMaxSize |

Methods

quot :: QuickCheckMaxSize -> QuickCheckMaxSize -> QuickCheckMaxSize #

rem :: QuickCheckMaxSize -> QuickCheckMaxSize -> QuickCheckMaxSize #

div :: QuickCheckMaxSize -> QuickCheckMaxSize -> QuickCheckMaxSize #

mod :: QuickCheckMaxSize -> QuickCheckMaxSize -> QuickCheckMaxSize #

quotRem :: QuickCheckMaxSize -> QuickCheckMaxSize -> (QuickCheckMaxSize, QuickCheckMaxSize) #

divMod :: QuickCheckMaxSize -> QuickCheckMaxSize -> (QuickCheckMaxSize, QuickCheckMaxSize) #

toInteger :: QuickCheckMaxSize -> Integer #

Num QuickCheckMaxSize |

Methods

(+) :: QuickCheckMaxSize -> QuickCheckMaxSize -> QuickCheckMaxSize #

(-) :: QuickCheckMaxSize -> QuickCheckMaxSize -> QuickCheckMaxSize #

(*) :: QuickCheckMaxSize -> QuickCheckMaxSize -> QuickCheckMaxSize #

negate :: QuickCheckMaxSize -> QuickCheckMaxSize #

abs :: QuickCheckMaxSize -> QuickCheckMaxSize #

signum :: QuickCheckMaxSize -> QuickCheckMaxSize #

fromInteger :: Integer -> QuickCheckMaxSize #

Ord QuickCheckMaxSize |

Methods

compare :: QuickCheckMaxSize -> QuickCheckMaxSize -> Ordering #

(<) :: QuickCheckMaxSize -> QuickCheckMaxSize -> Bool #

(<=) :: QuickCheckMaxSize -> QuickCheckMaxSize -> Bool #

(>) :: QuickCheckMaxSize -> QuickCheckMaxSize -> Bool #

(>=) :: QuickCheckMaxSize -> QuickCheckMaxSize -> Bool #

max :: QuickCheckMaxSize -> QuickCheckMaxSize -> QuickCheckMaxSize #

min :: QuickCheckMaxSize -> QuickCheckMaxSize -> QuickCheckMaxSize #

Real QuickCheckMaxSize |
Methods toRational :: QuickCheckMaxSize -> Rational #
IsOption QuickCheckMaxSize |
Methods defaultValue :: QuickCheckMaxSize # parseValue :: String -> Maybe QuickCheckMaxSize # optionName :: Tagged * QuickCheckMaxSize String # optionHelp :: Tagged * QuickCheckMaxSize String # optionCLParser :: Parser QuickCheckMaxSize #

newtype QuickCheckReplay :: * #

Replay a previous test using a replay token

Constructors

QuickCheckReplay (Maybe (QCGen, Int)) |

Instances

IsOption QuickCheckReplay |
Methods defaultValue :: QuickCheckReplay # parseValue :: String -> Maybe QuickCheckReplay # optionName :: Tagged * QuickCheckReplay String # optionHelp :: Tagged * QuickCheckReplay String # optionCLParser :: Parser QuickCheckReplay #

newtype QuickCheckTests :: * #

Number of test cases for QuickCheck to generate

Constructors

QuickCheckTests Int |

Instances

Enum QuickCheckTests |

Methods

succ :: QuickCheckTests -> QuickCheckTests #

pred :: QuickCheckTests -> QuickCheckTests #

toEnum :: Int -> QuickCheckTests #

fromEnum :: QuickCheckTests -> Int #

enumFrom :: QuickCheckTests -> [QuickCheckTests] #

enumFromThen :: QuickCheckTests -> QuickCheckTests -> [QuickCheckTests] #

enumFromTo :: QuickCheckTests -> QuickCheckTests -> [QuickCheckTests] #

enumFromThenTo :: QuickCheckTests -> QuickCheckTests -> QuickCheckTests -> [QuickCheckTests] #

Eq QuickCheckTests |
Methods (==) :: QuickCheckTests -> QuickCheckTests -> Bool # (/=) :: QuickCheckTests -> QuickCheckTests -> Bool #
Integral QuickCheckTests |

Methods

quot :: QuickCheckTests -> QuickCheckTests -> QuickCheckTests #

rem :: QuickCheckTests -> QuickCheckTests -> QuickCheckTests #

div :: QuickCheckTests -> QuickCheckTests -> QuickCheckTests #

mod :: QuickCheckTests -> QuickCheckTests -> QuickCheckTests #

quotRem :: QuickCheckTests -> QuickCheckTests -> (QuickCheckTests, QuickCheckTests) #

divMod :: QuickCheckTests -> QuickCheckTests -> (QuickCheckTests, QuickCheckTests) #

toInteger :: QuickCheckTests -> Integer #

Num QuickCheckTests |
Methods (+) :: QuickCheckTests -> QuickCheckTests -> QuickCheckTests # (-) :: QuickCheckTests -> QuickCheckTests -> QuickCheckTests # (*) :: QuickCheckTests -> QuickCheckTests -> QuickCheckTests # negate :: QuickCheckTests -> QuickCheckTests # abs :: QuickCheckTests -> QuickCheckTests # signum :: QuickCheckTests -> QuickCheckTests # fromInteger :: Integer -> QuickCheckTests #
Ord QuickCheckTests |

Methods

compare :: QuickCheckTests -> QuickCheckTests -> Ordering #

(<) :: QuickCheckTests -> QuickCheckTests -> Bool #

(<=) :: QuickCheckTests -> QuickCheckTests -> Bool #

(>) :: QuickCheckTests -> QuickCheckTests -> Bool #

(>=) :: QuickCheckTests -> QuickCheckTests -> Bool #

max :: QuickCheckTests -> QuickCheckTests -> QuickCheckTests #

min :: QuickCheckTests -> QuickCheckTests -> QuickCheckTests #

Real QuickCheckTests |
Methods toRational :: QuickCheckTests -> Rational #
IsOption QuickCheckTests |
Methods defaultValue :: QuickCheckTests # parseValue :: String -> Maybe QuickCheckTests # optionName :: Tagged * QuickCheckTests String # optionHelp :: Tagged * QuickCheckTests String # optionCLParser :: Parser QuickCheckTests #

# Hspec re-export

module Test.Hspec