tasty-hedgehog 1.0.0.2 → 1.0.1.0
raw patch · 3 files changed
+21/−14 lines, 3 filesdep ~basedep ~hedgehognew-uploaderPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, hedgehog
API changes (from Hackage documentation)
Files
- changelog.md +5/−0
- src/Test/Tasty/Hedgehog.hs +7/−5
- tasty-hedgehog.cabal +9/−9
changelog.md view
@@ -1,5 +1,10 @@ # Revision history for tasty-hedgehog +## 1.0.1.0 -- 2021-01-25++* Automatically enable or disable colour, based on the same criteria+ that hedgehog itself checks.+ ## 1.0.0.2 -- 2020-01-16 * Upgrade to `hedgehog-1.0.2`
src/Test/Tasty/Hedgehog.hs view
@@ -28,7 +28,7 @@ import Test.Tasty.Options import Hedgehog-import Hedgehog.Internal.Config (UseColor(DisableColor))+import Hedgehog.Internal.Config (UseColor, detectColor) import Hedgehog.Internal.Property import Hedgehog.Internal.Runner as H import Hedgehog.Internal.Report@@ -37,7 +37,7 @@ data HP = HP T.TestName Property deriving (Typeable) --- | Create a 'Test' from a Hedgehog property+-- | Create a 'T.TestTree' from a Hedgehog 'Property'. testProperty :: T.TestName -> Property -> T.TestTree testProperty name prop = T.singleTest name (HP name prop) @@ -130,11 +130,12 @@ T.Progress "Shrinking" (ratio (failureShrinks fr) shrinkLimit) reportOutput :: Bool+ -> UseColor -> String -> Report Result -> IO String-reportOutput showReplay name report = do- s <- renderResult DisableColor (Just (PropertyName name)) report+reportOutput showReplay useColor name report = do+ s <- renderResult useColor (Just (PropertyName name)) report pure $ case reportStatus report of Failed fr -> let@@ -162,6 +163,7 @@ ] run opts (HP name (Property pConfig pTest)) yieldProgress = do+ useColor <- detectColor let HedgehogReplay replay = lookupOption opts HedgehogShowReplay showReplay = lookupOption opts@@ -188,5 +190,5 @@ then T.testPassed else T.testFailed - out <- reportOutput showReplay name report+ out <- reportOutput showReplay useColor name report return $ resultFn out
tasty-hedgehog.cabal view
@@ -1,5 +1,5 @@ name: tasty-hedgehog-version: 1.0.0.2+version: 1.0.1.0 license: BSD3 license-file: LICENCE author: Dave Laing@@ -13,7 +13,7 @@ build-type: Simple extra-source-files: changelog.md cabal-version: >=1.10-tested-with: GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.1+tested-with: GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.3, GHC == 8.10.1 source-repository head type: git@@ -21,10 +21,10 @@ library exposed-modules: Test.Tasty.Hedgehog- build-depends: base >= 4.8 && <4.14+ build-depends: base >= 4.8 && <4.15 , tagged >= 0.8 && < 0.9- , tasty >= 0.11 && < 1.3- , hedgehog >= 1.0.2 && < 1.0.3+ , tasty >= 0.11 && < 1.5+ , hedgehog >= 1.0.2 && < 1.0.5 hs-source-dirs: src ghc-options: -Wall default-language: Haskell2010@@ -33,10 +33,10 @@ type: exitcode-stdio-1.0 main-is: Main.hs hs-source-dirs: test- build-depends: base >= 4.8 && <4.14- , tasty >= 0.11 && < 1.3- , tasty-expected-failure >= 0.11 && < 0.12- , hedgehog >= 1.0.2 && < 1.0.3+ build-depends: base >= 4.8 && <4.15+ , tasty >= 0.11 && < 1.5+ , tasty-expected-failure >= 0.11 && < 0.13+ , hedgehog >= 1.0.2 && < 1.0.5 , tasty-hedgehog ghc-options: -Wall default-language: Haskell2010