tasty-grading-system 0.1.0.0 → 0.2.0.0
raw patch · 3 files changed
+10/−65 lines, 3 filesdep −tasty-grading-systemdep −tasty-hunitdep ~aesondep ~basedep ~tastyPVP ok
version bump matches the API change (PVP)
Dependencies removed: tasty-grading-system, tasty-hunit
Dependency ranges changed: aeson, base, tasty, text
API changes (from Hackage documentation)
Files
- src/Test/Tasty/Grade.hs +3/−3
- tasty-grading-system.cabal +7/−24
- test/MyLibTest.hs +0/−38
src/Test/Tasty/Grade.hs view
@@ -194,7 +194,7 @@ (Const summary, tests) <- flip State.runStateT 0 $ Functor.getCompose $ Tasty.getTraversal $ Tasty.foldTestTree- Tasty.trivialFold { Tasty.foldSingle = runTest, Tasty.foldGroup = runGroup }+ Tasty.trivialFold { Tasty.foldSingle = runTest, Tasty.foldGroup = \opts name tests -> runGroup opts name $ mconcat tests} options testTree @@ -202,8 +202,8 @@ createPathDirIfMissing path Aeson.encodeFile path $ Aeson.object- [ "errors".= (getSum . summaryErrors $ summary)- , "failures" .= (getSum . summaryFailures $ summary)+ [ "errors".= getSum (summaryErrors summary)+ , "failures" .= getSum (summaryFailures summary) , "tests" .= tests , "time" .= timeToNs elapsedTime , "results" .= appEndo (jsonRenderer summary) []
tasty-grading-system.cabal view
@@ -1,9 +1,9 @@ cabal-version: 2.4 name: tasty-grading-system-version: 0.1.0.0+version: 0.2.0.0 author: Fendor maintainer: power.walross@gmail.com-category: testing,mit,library+category: testing,bsd3,library license: BSD-3-Clause license-file: LICENSE.md homepage: https://github.com/fendor/tasty-grading-system@@ -19,34 +19,17 @@ exposed-modules: Test.Tasty.Grade ghc-options: -Wall build-depends:- , aeson ^>=1.5.6- , base >=4.13.0 && <4.15.0+ , aeson >=1.5.6 && <2.3+ , base >=4.11.0 && <4.18.0 , containers ^>=0.6.2 , directory ^>=1.3.6 , filepath ^>=1.4.2 , generic-deriving ^>=1.14- , mtl ^>=2.2.2+ , mtl >=2.2 && <2.4 , stm ^>=2.5.0 , tagged ^>=0.8.6- , tasty ^>=1.4.1- , text ^>=1.2.4+ , tasty ^>=1.5+ , text >=1.2.4 && <2.2 hs-source-dirs: src default-language: Haskell2010--test-suite tasty-grading-system-test- default-language: Haskell2010- type: exitcode-stdio-1.0- hs-source-dirs: test- main-is: MyLibTest.hs- ghc-options: -Wall- build-depends:- , aeson- , base- , tasty- , tasty-grading-system- , tasty-hunit--source-repository head- type: git- location: git://github.com/mpickering/hie-bios.git
− test/MyLibTest.hs
@@ -1,38 +0,0 @@-module Main (main) where--import Control.Exception-import Test.Tasty-import Test.Tasty.Grade-import Test.Tasty.HUnit-import Test.Tasty.Ingredients (composeReporters)-import Test.Tasty.Ingredients.ConsoleReporter (consoleTestReporter)--main :: IO ()-main = defaultMainWithIngredients [composeReporters consoleTestReporter jsonRunner] spec--spec :: TestTree-spec =- testGroup- "spec"- [ testGroupPoints 5 0 9 unitTests- ]--unitTests :: TestTree-unitTests =- testGroup- "Unit tests"- [ testCase "List comparison (different length)" $- [1, 2, 3] `compare` [1, 2] @?= GT,- -- the following test does not hold- testCase "List comparison (same length)" $- [1, 2, 3] `compare` [1, 2, 2] @?= LT,- -- the following test does not hold- testCase "throw error" $- error "Test",- -- the following test does not hold- testCase "timeout" $- let f x = f x in f 0,- -- the following test does not hold- testCase "exception" $- throwIO $ Overflow- ]