packages feed

tasty-hedgehog 0.1.0.0 → 0.1.0.1

raw patch · 3 files changed

+31/−3 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -1,5 +1,9 @@ # Revision history for tasty-hedgehog +## 0.1.0.1  -- 2017-08-24++* Exposed the various tasty options.+ ## 0.1.0.0  -- 2017-08-24  * First version. Released on an unsuspecting world.
src/Test/Tasty/Hedgehog.hs view
@@ -1,8 +1,25 @@--- |+-- | This package lets you test Hedgehog properties with tasty. -- +-- Typical usage would look like this:+--+-- @ +-- testGroup "tasty-hedgehog tests" [ +--    testProperty "reverse involutive" prop_reverse_involutive+--  , testProperty "sort idempotent"    prop_sort_idempotent+--  ]+-- @ +--  {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Test.Tasty.Hedgehog (     testProperty+  -- * Options you can pass in via tasty+  , HedgehogReplay(..)+  , HedgehogShowReplay(..)+  , HedgehogVerbose(..)+  , HedgehogTestLimit(..)+  , HedgehogDiscardLimit(..)+  , HedgehogShrinkLimit(..)+  , HedgehogShrinkRetries(..)   ) where  import Data.Typeable@@ -19,10 +36,11 @@ data HP = HP T.TestName Property   deriving (Typeable) --- | Create a 'Test' for a Hedgehog property+-- | Create a 'Test' from a Hedgehog property testProperty :: T.TestName -> Property -> T.TestTree testProperty name prop = T.singleTest name (HP name prop) +-- | The replay token to use for replaying a previous test run newtype HedgehogReplay = HedgehogReplay (Maybe (Size, Seed))   deriving (Typeable) @@ -35,6 +53,7 @@   optionName = return "hedgehog-replay"   optionHelp = return "Replay token to use for replaying a previous test run" +-- | If a test case fails, show a replay token for replaying tests newtype HedgehogShowReplay = HedgehogShowReplay Bool   deriving (Typeable) @@ -44,6 +63,7 @@   optionName = return "hedgehog-show-replay"   optionHelp = return "Show a replay token for replaying tests" +-- | Show the generated Hedgehog test cases newtype HedgehogVerbose = HedgehogVerbose Bool   deriving (Typeable) @@ -54,6 +74,7 @@   optionHelp = return "Show the generated Hedgehog test cases"   optionCLParser = flagCLParser Nothing (HedgehogVerbose True) +-- | The number of successful test cases required before Hedgehog will pass a test newtype HedgehogTestLimit = HedgehogTestLimit Int   deriving (Eq, Ord, Show, Num, Enum, Real, Integral, Typeable) @@ -63,6 +84,7 @@   optionName = return "hedgehog-tests"   optionHelp = return "Number of successful test cases required before Hedgehog will pass a test" +-- | The number of discarded cases allowed before Hedgehog will fail a test newtype HedgehogDiscardLimit = HedgehogDiscardLimit Int   deriving (Eq, Ord, Show, Num, Enum, Real, Integral, Typeable) @@ -72,6 +94,7 @@   optionName = return "hedgehog-discards"   optionHelp = return "Number of discarded cases allowed before Hedgehog will fail a test" +-- | The number of shrinks allowed before Hedgehog will fail a test newtype HedgehogShrinkLimit = HedgehogShrinkLimit Int   deriving (Eq, Ord, Show, Num, Enum, Real, Integral, Typeable) @@ -81,6 +104,7 @@   optionName = return "hedgehog-shrinks"   optionHelp = return "Number of shrinks allowed before Hedgehog will fail a test"   +-- | The number of times to re-run a test during shrinking newtype HedgehogShrinkRetries = HedgehogShrinkRetries Int   deriving (Eq, Ord, Show, Num, Enum, Real, Integral, Typeable) 
tasty-hedgehog.cabal view
@@ -1,5 +1,5 @@ name:                tasty-hedgehog-version:             0.1.0.0+version:             0.1.0.1 license:             BSD3 license-file:        LICENSE author:              Dave Laing