packages feed

tasty-smallcheck 0.8.0.1 → 0.8.1

raw patch · 3 files changed

+14/−5 lines, 3 files

Files

CHANGELOG.md view
@@ -2,6 +2,12 @@ Changes ======= +Version 0.8.1+-------------++Intercept exceptions thrown by the property, adhering to the new tasty API+contract.+ Version 0.8.0.1 --------------- 
Test/Tasty/SmallCheck.hs view
@@ -14,6 +14,7 @@ import qualified Test.SmallCheck.Drivers as SC import Test.SmallCheck hiding (smallCheck) -- for re-export import Test.SmallCheck.Drivers+import Control.Exception import Data.Typeable import Data.Proxy import Data.IORef@@ -58,7 +59,8 @@           , progressPercent = 0 -- we don't know the total number of tests           } -    scResult <- smallCheckWithHook depth hook prop+    -- small check does not catch exceptions on its own, so lets do it+    scResult <- try $ smallCheckWithHook depth hook prop      (total, bad) <- readIORef counter     let@@ -70,8 +72,9 @@      return $       case scResult of-        Nothing -> testPassed desc-        Just f ->  testFailed $ ppFailure f+        Left e         -> testFailed $ show (e :: SomeException)+        Right Nothing  -> testPassed desc+        Right (Just f) -> testFailed $ ppFailure f  -- Copied from base to stay compatible with GHC 7.4. myAtomicModifyIORef' :: IORef a -> (a -> (a,b)) -> IO b
tasty-smallcheck.cabal view
@@ -1,10 +1,10 @@ Name:                tasty-smallcheck-Version:             0.8.0.1+Version:             0.8.1 Cabal-Version:       >= 1.6 Category:            Testing Synopsis:            SmallCheck support for the Tasty test framework. Description:         SmallCheck support for the Tasty test framework.-License:             BSD3+License:             MIT License-File:        LICENSE Author:              Roman Cheplyaka <roma@ro-che.info> Maintainer:          Roman Cheplyaka <roma@ro-che.info>