packages feed

tasty 0.1.1 → 0.2

raw patch · 4 files changed

+16/−8 lines, 4 filesdep ~basedep ~mtl

Dependency ranges changed: base, mtl

Files

Test/Tasty/CmdLine.hs view
@@ -13,6 +13,7 @@ import qualified Data.Map as Map import Data.Typeable import Control.Arrow+import System.Exit  import Test.Tasty.Core import Test.Tasty.CoreOptions@@ -40,4 +41,5 @@     ( fullDesc <>       header "Mmm... tasty test suite"     )-  runner opts testTree =<< launchTestTree opts testTree+  ok <- execRunner runner opts testTree+  if ok then exitSuccess else exitFailure
Test/Tasty/Run.hs view
@@ -3,6 +3,7 @@   ( Status(..)   , StatusMap   , Runner+  , execRunner   , launchTestTree   ) where @@ -52,9 +53,8 @@ -- and all it needs to do is notifying the user about the progress and -- then displaying the overall results in the end. ----- It is also the runner's responsibility to exit with an appropriate--- exit code.-type Runner = OptionSet -> TestTree -> StatusMap -> IO ()+-- The function's result should indicate whether all the tests passed.+type Runner = OptionSet -> TestTree -> StatusMap -> IO Bool  -- | Start executing a test executeTest@@ -126,3 +126,10 @@   let NumThreads numTheads = lookupOption opts   launchTests numTheads tmap   return $ fmap snd smap++-- | Execute a 'Runner'.+--+-- This is a shortcut which runs 'launchTestTree' behind the scenes.+execRunner :: Runner -> OptionSet -> TestTree -> IO Bool+execRunner runner opts testTree =+  runner opts testTree =<< launchTestTree opts testTree
Test/Tasty/UI.hs view
@@ -13,7 +13,6 @@ import qualified Data.IntMap as IntMap import Data.Maybe import Data.Monoid-import System.Exit import System.IO  #ifdef COLORS@@ -112,11 +111,11 @@   case failures st of     0 -> do       ok $ printf "All %d tests passed\n" (ix st)-      exitSuccess+      return True      fs -> do       fail $ printf "%d out of %d tests failed\n" fs (ix st)-      exitFailure+      return False    where     alignment = computeAlignment opts tree
tasty.cabal view
@@ -2,7 +2,7 @@ --  see http://haskell.org/cabal/users-guide/  name:                tasty-version:             0.1.1+version:             0.2 synopsis:            Modern and extensible testing framework description:         See <http://documentup.com/feuerbach/tasty> license:             MIT