[commit: packages/filepath] master: #4, make sure the tests fail if there is an error (9db4bd5)

git at git.haskell.org git at git.haskell.org
Thu Mar 19 11:33:33 UTC 2015


Repository : ssh://git@git.haskell.org/filepath

On branch  : master
Link       : http://git.haskell.org/packages/filepath.git/commitdiff/9db4bd5aef95521d021129519c525996fe783579

>---------------------------------------------------------------

commit 9db4bd5aef95521d021129519c525996fe783579
Author: Neil Mitchell <ndmitchell at gmail.com>
Date:   Sun Oct 19 14:01:25 2014 +0100

    #4, make sure the tests fail if there is an error


>---------------------------------------------------------------

9db4bd5aef95521d021129519c525996fe783579
 tests/AutoTest.hs | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/AutoTest.hs b/tests/AutoTest.hs
index 8902869..8526c99 100644
--- a/tests/AutoTest.hs
+++ b/tests/AutoTest.hs
@@ -35,7 +35,11 @@ instance Arbitrary QChar where
 
 
 quickSafe :: Testable a => a -> IO ()
-quickSafe prop = quickCheckWith (stdArgs { chatty = False }) prop
+quickSafe prop = do
+    res <- quickCheckWithResult (stdArgs { chatty = False }) prop
+    case res of
+        Success{} -> return ()
+        _ -> error $ show res
     -- checkit quick prop
 
 -- below is mainly stolen from Test.QuickCheck, modified to crash out on failure



More information about the ghc-commits mailing list