tasty-silver 3.3.1.1 → 3.3.1.2
raw patch · 3 files changed
+38/−13 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +6/−0
- Test/Tasty/Silver/Interactive.hs +26/−10
- tasty-silver.cabal +6/−3
CHANGELOG.md view
@@ -1,6 +1,12 @@ Changes ======= +Version 3.3.1.2 (10 Sep 2023)+---------------++* Fix compilation with `tasty-1.5`+* Tested with GHC 7.4 - 9.8.0+ Version 3.3.1.1 (8 May 2022) ---------------
Test/Tasty/Silver/Interactive.hs view
@@ -578,7 +578,11 @@ foldTestTree trivialFold { foldSingle = handleSingleTest- , foldGroup = handleGroup+#if MIN_VERSION_tasty(1,5,0)+ , foldGroup = \ opts name -> foldMap (handleGroup opts name)+#else+ , foldGroup = \ opts name -> id (handleGroup opts name)+#endif } opts tree @@ -917,22 +921,34 @@ mempty = MinusInfinity mappend = (<>) ---- | Compute the amount of space needed to align "OK"s and "FAIL"s+-- | Compute the amount of space needed to align "OK"s and "FAIL"s.+-- computeAlignment :: OptionSet -> TestTree -> Int computeAlignment opts =- fromMonoid .- foldTestTree- trivialFold- { foldSingle = \_ name _ level -> Maximum (length name + level)- , foldGroup = \_ _ m -> m . (+ indentSize)- }- opts+ fromMonoid . foldTestTree f opts where+ fromMonoid :: (Int -> Maximum Int) -> Int fromMonoid m = case m 0 of MinusInfinity -> 0 Maximum x -> x++ f :: TreeFold (Int -> Maximum Int)+ f = trivialFold+ { foldSingle = \ _opts name _test level -> addName name level+ , foldGroup = \ _opts _name group level -> addIndent level group+ }++ addName :: TestName -> Int -> Maximum Int+ addName name level = Maximum $ length name + level++#if MIN_VERSION_tasty(1,5,0)+ addIndent :: Int -> [Int -> Maximum Int] -> Maximum Int+ addIndent level = foldMap ($ (level + indentSize))+#else+ addIndent :: Int -> (Int -> Maximum Int) -> Maximum Int+ addIndent level = id ($ (level + indentSize))+#endif -- (Potentially) colorful output ok, warn, failure, infoOk, infoWarn, infoFail :: (?colors :: Bool) => String -> IO ()
tasty-silver.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.14 name: tasty-silver-version: 3.3.1.1+version: 3.3.1.2 synopsis: A fancy test runner, including support for golden tests. description: This package provides a fancy test runner and support for «golden testing».@@ -29,7 +29,10 @@ README.md tested-with:- GHC == 9.2.2+ GHC == 9.8.0+ GHC == 9.6.2+ GHC == 9.4.7+ GHC == 9.2.8 GHC == 9.0.2 GHC == 8.10.7 GHC == 8.8.4@@ -45,7 +48,7 @@ Source-repository head type: git- location: git://github.com/phile314/tasty-silver.git+ location: https://github.com/phile314/tasty-silver.git library Default-language: