packages feed

tasty-quickcheck 0.3 → 0.3.1

raw patch · 2 files changed

+28/−19 lines, 2 files

Files

Test/Tasty/QuickCheck.hs view
@@ -102,21 +102,30 @@     -- TODO yield progress     r <- QC.quickCheckWithResult args prop -    return $ case r of-      QC.Success {} ->-        Result-          { resultSuccessful = True-          , resultDescription = printf "%d tests completed" (QC.numTests r)-          }-      QC.Failure {} ->-        Result-          { resultSuccessful = False-          , resultDescription =-              QC.output r ++-              printf "Use --quickcheck-replay '%d %s' to reproduce." (QC.usedSize r) (show $ QC.usedSeed r)-          }-      _ ->-        Result-          { resultSuccessful = False-          , resultDescription = QC.output r-          }+    return $+      Result+        { resultSuccessful = successful r+        , resultDescription =+            if unexpected r+              then QC.output r ++ reproduceMsg r+              else QC.output r+        }++successful :: QC.Result -> Bool+successful r =+  case r of+    QC.Success {} -> True+    _ -> False++unexpected :: QC.Result -> Bool+unexpected r =+  case r of+    QC.Failure {} -> True+    QC.NoExpectedFailure {} -> True+    _ -> False++reproduceMsg :: QC.Result -> String+reproduceMsg r =+  printf "Use --quickcheck-replay '%d %s' to reproduce."+    (QC.usedSize r)+    (show $ QC.usedSeed r)
tasty-quickcheck.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                tasty-quickcheck-version:             0.3+version:             0.3.1 synopsis:            QuickCheck support for the Tasty test framework. description:         QuickCheck support for the Tasty test framework. license:             MIT