packages feed

tasty-html 0.4.2.1 → 0.4.2.2

raw patch · 6 files changed

+47/−43 lines, 6 filesdep −filepathdep ~basedep ~blaze-htmldep ~bytestringPVP ok

version bump matches the API change (PVP)

Dependencies removed: filepath

Dependency ranges changed: base, blaze-html, bytestring, containers, generic-deriving, mtl, semigroups, stm, tagged, tasty, tasty-hunit, tasty-quickcheck, tasty-smallcheck, text, transformers

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,4 +1,9 @@-0.4.2.0 - 2023-05-02+0.4.2.2 - 2024-01-01+--------------------++* Support tasty 1.5++0.4.2.1 - 2023-05-02 --------------------  * Remove flaky `pass` test
README.md view
@@ -67,7 +67,7 @@  Here is the output of the above program rendered to HTML: -![screenshot](https://user-images.githubusercontent.com/1714287/232209106-1be5cf5c-983c-46ba-a9cd-062b4786b0d0.png)+![screenshot](https://raw.githubusercontent.com/UnkindPartition/tasty-html/master/screenshot.png)  (Note that whether QuickCheck finds a counterexample to the third property is determined by chance.)
Test/Tasty/Runners/Html.hs view
@@ -163,9 +163,9 @@   Const summary <$ State.modify (+1)  -- | To be used for a 'TestGroup' when folding the final 'TestTree'.-runGroup :: OptionSet -> TestName -> SummaryTraversal -> SummaryTraversal+runGroup :: OptionSet -> TestName -> [SummaryTraversal] -> SummaryTraversal runGroup _opts groupName children = Traversal $ Compose $ do-  Const soFar <- getCompose $ getTraversal children+  Const soFar <- getCompose $ getTraversal $ mconcat children    let successful = summaryFailures soFar == Sum 0   let grouped = testGroupMarkup groupName successful $ treeMarkup $ htmlRenderer soFar
examples/fail.hs view
@@ -1,25 +1,22 @@ module Main where +import Data.List import Test.Tasty import Test.Tasty.HUnit import Test.Tasty.SmallCheck as SC import Test.Tasty.QuickCheck as QC import Test.Tasty.Runners.Html -import Data.List-import Data.Ord-+main :: IO () main = defaultMainWithIngredients (htmlRunner:defaultIngredients) tests  tests :: TestTree tests = testGroup "Tests" [properties, unitTests]  properties :: TestTree-properties = testGroup "Properties" [p, scProps, qcProps]--p = SC.testProperty "Fermat's little theorem" $-      \x -> ((x :: Integer)^7 - x) `mod` 7 == 0+properties = testGroup "Properties" [scProps, qcProps] +scProps :: TestTree scProps = testGroup "SmallCheck"   [ SC.testProperty "sort == sort . reverse" $       \list -> sort (list :: [Int]) == sort (reverse list)@@ -31,6 +28,7 @@         (n :: Integer) >= 3 SC.==> x^n + y^n /= (z^n :: Integer)   ] +qcProps :: TestTree qcProps = testGroup "QuickCheck"   [ QC.testProperty "sort == sort . reverse" $       \list -> sort (list :: [Int]) == sort (reverse list)@@ -42,6 +40,7 @@         (n :: Integer) >= 3 QC.==> x^n + y^n /= (z^n :: Integer)   ] +unitTests :: TestTree unitTests = testGroup "Unit tests"   [ testCase "List comparison (different length)" $       [1, 2, 3] `compare` [1,2] @?= GT
examples/pass.hs view
@@ -1,14 +1,13 @@ module Main where +import Data.List import Test.Tasty import Test.Tasty.HUnit import Test.Tasty.SmallCheck as SC import Test.Tasty.QuickCheck as QC import Test.Tasty.Runners.Html -import Data.List-import Data.Ord-+main :: IO () main = defaultMainWithIngredients (htmlRunner:defaultIngredients) tests  tests :: TestTree@@ -17,7 +16,7 @@ properties :: TestTree properties = testGroup "Properties" [scProps, qcProps] -+scProps :: TestTree scProps = testGroup "SmallCheck"   [ SC.testProperty "sort == sort . reverse" $       \list -> sort (list :: [Int]) == sort (reverse list)@@ -25,6 +24,7 @@       \x -> ((x :: Integer)^7 - x) `mod` 7 == 0   ] +qcProps :: TestTree qcProps = testGroup "QuickCheck"   [ QC.testProperty "sort == sort . reverse" $       \list -> sort (list :: [Int]) == sort (reverse list)@@ -32,6 +32,7 @@       \x -> ((x :: Integer)^7 - x) `mod` 7 == 0   ] +unitTests :: TestTree unitTests = testGroup "Unit tests"   [ testCase "List comparison (different length)" $       [1, 2, 3] `compare` [1,2] @?= GT
tasty-html.cabal view
@@ -1,10 +1,10 @@ name:                tasty-html-version:             0.4.2.1+version:             0.4.2.2 synopsis:            Render tasty output to HTML description:         A tasty ingredient to output test results in HTML5. license:             MIT license-file:        LICENSE-author:              Danny Navarro, Roman Cheplyaka, Chris Catalfo+author:              Danny Navarro, Roman Cheplyaka, Chris Catalfo, Owen Shepherd maintainer:          j@dannyavarro.net, roma@ro-che.info homepage:            http://github.com/feuerbach/tasty-html category:            Testing@@ -24,27 +24,27 @@   default-language: Haskell98   main-is: fail.hs   hs-source-dirs: examples+  ghc-options: -Wall   build-depends:-    base,-    tasty,-    tasty-hunit,-    tasty-smallcheck,-    tasty-quickcheck,-    tasty-html,-    blaze-html+    base >= 4.5 && < 5,+    tasty >= 0.5 && < 2,+    tasty-hunit >= 0.1 && < 1,+    tasty-smallcheck >= 0.1 && < 1,+    tasty-quickcheck >= 0.1 && < 1,+    tasty-html  executable tasty-html-pass   default-language: Haskell98   main-is: pass.hs   hs-source-dirs: examples+  ghc-options: -Wall   build-depends:-    base,-    tasty,-    tasty-hunit,-    tasty-smallcheck,-    tasty-quickcheck,-    tasty-html,-    blaze-html+    base >= 4.5 && < 5,+    tasty >= 0.5 && < 2,+    tasty-hunit >= 0.1 && < 1,+    tasty-smallcheck >= 0.1 && < 1,+    tasty-quickcheck >= 0.1 && < 1,+    tasty-html  library   default-language: Haskell98@@ -52,16 +52,15 @@   other-modules: Paths_tasty_html   build-depends:     base >= 4.5 && < 5,-    bytestring >= 0.10,-    containers >= 0.5.0.0,-    filepath >= 1.3,-    generic-deriving >= 1.6.2,-    mtl >= 2.1.2,-    stm >= 2.4.2,-    semigroups,-    tagged >= 0.7,-    tasty >= 1.4,-    text >= 1.0,-    transformers >= 0.3.0.0,-    blaze-html >= 0.7+    bytestring >= 0.10 && < 1,+    containers >= 0.5.0.0 && < 1,+    generic-deriving >= 1.6.2 && < 2,+    mtl >= 2.1.2 && < 3,+    stm >= 2.4.2 && < 3,+    semigroups >= 0.1 && < 1,+    tagged >= 0.7 && < 1,+    tasty >= 1.5 && < 1.6,+    text >= 1.0 && < 3,+    transformers >= 0.3.0.0 && < 1,+    blaze-html >= 0.7 && < 1   ghc-options: -Wall