packages feed

hspec-meta 1.6.2 → 1.7.0

raw patch · 5 files changed

+15/−6 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

hspec-meta.cabal view
@@ -1,5 +1,5 @@ name:             hspec-meta-version:          1.6.2+version:          1.7.0 license:          MIT license-file:     LICENSE copyright:        (c) 2011-2013 Simon Hengel,
src/Test/Hspec/Config.hs view
@@ -8,6 +8,7 @@  import           Control.Applicative import           Data.List+import           Data.Maybe import           System.IO import           System.Exit import qualified Test.QuickCheck as QC@@ -31,6 +32,7 @@ -- that satisfy the predicate are run. , configFilterPredicate :: Maybe (Path -> Bool) , configQuickCheckArgs  :: QC.Args+, configSmallCheckDepth :: Int , configColorMode       :: ColorMode , configFormatter       :: Formatter , configHtmlOutput      :: Bool@@ -38,7 +40,7 @@ }  defaultConfig :: Config-defaultConfig = Config False False False Nothing QC.stdArgs ColorAuto specdoc False (Left stdout)+defaultConfig = Config False False False Nothing QC.stdArgs 5 ColorAuto specdoc False (Left stdout)  -- | Add a filter predicate to config.  If there is already a filter predicate, -- then combine them with `||`.@@ -62,6 +64,7 @@   , configFastFail        = optionsFastFail opts   , configFilterPredicate = matchFilter `filterOr` rerunFilter   , configQuickCheckArgs  = qcArgs+  , configSmallCheckDepth = fromMaybe (configSmallCheckDepth defaultConfig) (optionsDepth opts)   , configColorMode       = optionsColorMode opts   , configFormatter       = optionsFormatter opts   , configHtmlOutput      = optionsHtmlOutput opts
src/Test/Hspec/Core/Type.hs view
@@ -67,8 +67,9 @@ type Progress = (Int, Int)  data Params = Params {-  paramsQuickCheckArgs :: QC.Args-, paramsReportProgress :: Progress -> IO ()+  paramsQuickCheckArgs  :: QC.Args+, paramsSmallCheckDepth :: Int+, paramsReportProgress  :: Progress -> IO () }  -- | Internal representation of a spec.
src/Test/Hspec/Options.hs view
@@ -25,6 +25,7 @@ , optionsFastFail     :: Bool , optionsMatch        :: [String] , optionsMaxSuccess   :: Maybe Int+, optionsDepth        :: Maybe Int , optionsSeed         :: Maybe Integer , optionsMaxSize      :: Maybe Int , optionsMaxDiscardRatio :: Maybe Int@@ -37,6 +38,9 @@ addMatch :: String -> Options -> Options addMatch s c = c {optionsMatch = s : optionsMatch c} +setDepth :: Int -> Options -> Options+setDepth n c = c {optionsDepth = Just n}+ setMaxSuccess :: Int -> Options -> Options setMaxSuccess n c = c {optionsMaxSuccess = Just n} @@ -53,7 +57,7 @@   deriving (Eq, Show)  defaultOptions :: Options-defaultOptions = Options False False False False [] Nothing Nothing Nothing Nothing ColorAuto specdoc False Nothing+defaultOptions = Options False False False False [] Nothing Nothing Nothing Nothing Nothing ColorAuto specdoc False Nothing  formatters :: [(String, Formatter)] formatters = [@@ -95,6 +99,7 @@   , Option   []  ["no-color"]         (NoArg setNoColor)                  (h "do not colorize the output")   , mkOption "f"  "format"            (Arg "FORMATTER" readFormatter setFormatter) formatHelp   , mkOption "o"  "out"               (Arg "FILE" return setOutputFile)   (h "write output to a file instead of STDOUT")+  , mkOption []   "depth"             (Arg "N" readMaybe setDepth)        (h "maximum depth of generated test values for SmallCheck properties")   , mkOption "a"  "qc-max-success"    (Arg "N" readMaybe setMaxSuccess)   (h "maximum number of successful tests before a QuickCheck property succeeds")   , mkOption ""   "qc-max-size"       (Arg "N" readMaybe setMaxSize)      (h "size to use for the biggest test cases")   , mkOption ""   "qc-max-discard"    (Arg "N" readMaybe setMaxDiscardRatio) (h "maximum number of discarded tests per successful test before giving up")
src/Test/Hspec/Runner/Eval.hs view
@@ -82,7 +82,7 @@     evalExample :: (Params -> IO Result) -> (Progress -> IO ()) -> IO (Either E.SomeException Result)     evalExample e progressHandler       | configDryRun c = return (Right Success)-      | otherwise      = (safeTry . fmap forceResult) (e $ Params (configQuickCheckArgs c) progressHandler)+      | otherwise      = (safeTry . fmap forceResult) (e $ Params (configQuickCheckArgs c) (configSmallCheckDepth c) progressHandler)  replaceMVar :: MVar a -> a -> IO () replaceMVar mvar p = tryTakeMVar mvar >> putMVar mvar p