packages feed

tasty-hedgehog 1.0.0.0 → 1.0.0.1

raw patch · 4 files changed

+19/−9 lines, 4 filesdep ~basePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base

API changes (from Hackage documentation)

Files

changelog.md view
@@ -1,5 +1,9 @@ # Revision history for tasty-hedgehog +## 1.0.0.1  -- 2019-05-22++* Fixed test result reporting to made plain hedgehog's messages (fixes #30)+ ## 1.0.0.0  -- 2019-05-17  * Removed support for GHC < 8
src/Test/Tasty/Hedgehog.hs view
@@ -123,21 +123,23 @@              -> String              -> Report Result              -> IO String-reportOutput showReplay name report@(Report _ _ _ status) = do-  -- TODO add details for tests run / discarded / shrunk+reportOutput showReplay name report = do   s <- renderResult Nothing (Just (PropertyName name)) report-  pure $ case status of-    Failed fr -> do+  pure $ case reportStatus report of+    Failed fr ->       let         size = failureSize fr         seed = failureSeed fr         replayStr =           if showReplay-          then "\nUse '--hedgehog-replay \"" ++ show size ++ " " ++ show seed ++ "\"' to reproduce."+          then+            "\nUse '--hedgehog-replay \"" +++            show size ++ " " ++ show seed +++            "\"' to reproduce."           else ""-      s ++ replayStr-    GaveUp -> "Gave up"-    OK -> "" -- 'tasty' will print an "OK" for us.+      in+        s ++ replayStr ++ "\n"+    _ -> s  instance T.IsTest HP where   testOptions =
tasty-hedgehog.cabal view
@@ -1,5 +1,5 @@ name:                tasty-hedgehog-version:             1.0.0.0+version:             1.0.0.1 license:             BSD3 license-file:        LICENCE author:              Dave Laing
test/Main.hs view
@@ -1,3 +1,4 @@+{-# language OverloadedStrings #-} module Main where  import Hedgehog@@ -19,6 +20,9 @@ prop_reverse_involutive =   property $ do     xs <- forAll genAlphaList+    classify "empty" $ length xs == 0+    classify "small" $ length xs < 10+    classify "large" $ length xs >= 10     test_involutive reverse xs  badReverse :: [a] -> [a]