Popularity
4.3
Growing
Activity
0.0
Stable
1
5
1
Monthly Downloads: 13
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
tasty-leancheck alternatives and similar packages
Based on the "tasty" category.
Alternatively, view tasty-leancheck alternatives based on common mentions on social networks and blogs.
-
tasty-hedgehog
Tasty integration for the Hedgehog property testing library -
tasty-expected-failure
Mark test cases as expected-failure -
tasty-rerun
Rerun previous test suite runs to run only failing tests -
tasty-test-reporter
An ingredient for tasty that prints a summary and outputs junit xml that works with jenkins. -
tasty-ant-xml
A tasty ingredient to output test results in XML, using the Ant schema. This XML can be consumed by the Jenkins continuous integration framework. -
tasty-th
Automatically generate tasty test groups from functions in a module using TH -
tasty-jenkins-xml
Render tasty output to XML for Jenkins in addition to other (console) output -
tasty-silver
A fancy test runner for tasty and support for golden tests. -
tasty-mgolden
A different golden testing provider for tasty. -
tasty-auto
Deprecated: Auto discovery for the Tasty test framework, use tasty-discover instead -
tasty-program
Use tasty framework to test whether a program executes correctly
Clean code begins in your IDE with SonarLint
Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.
Promo
www.sonarlint.org
Do you think we are missing an alternative of tasty-leancheck or a related project?
README
tasty-leancheck: LeanCheck support for Tasty
LeanCheck support for the Tasty test framework. Tasty and healthy tests.
Installing
$ cabal install tasty-leancheck
Example
(This example is intentionally similar to Tasty's official example.)
Here's how your test.hs
might look like:
import Test.Tasty
import Test.Tasty.LeanCheck as LC
import Data.List
main :: IO ()
main = defaultMain tests
tests :: TestTree
tests = testGroup "Test properties checked by LeanCheck"
[ LC.testProperty "sort == sort . reverse" $
\list -> sort (list :: [Int]) == sort (reverse list)
, LC.testProperty "Fermat's little theorem" $
\x -> ((x :: Integer)^7 - x) `mod` 7 == 0
-- the following property do not hold
, LC.testProperty "Fermat's last theorem" $
\x y z n ->
(n :: Integer) >= 3 LC.==> x^n + y^n /= (z^n :: Integer)
]
And here is the output for the above program:
$ ./test
Test properties checked by LeanCheck
sort == sort . reverse: OK
+++ OK, passed 200 tests.
Fermat's little theorem: OK
+++ OK, passed 200 tests.
Fermat's last theorem: FAIL
*** Failed! Falsifiable (after 71 tests):
0 0 0 3
1 out of 3 tests failed (0.00s)
Options
The tasty-leancheck provider has only one option, --leancheck-tests
:
$ ./test --leancheck-tests 10
Test properties checked by LeanCheck
sort == sort . reverse: OK
+++ OK, passed 10 tests.
Fermat's little theorem: OK
+++ OK, passed 10 tests.
Fermat's last theorem: OK
+++ OK, passed 10 tests.
All 3 tests passed (0.00s)