Popularity
9.4
Stable
Activity
5.6
Declining
153
8
26
Monthly Downloads: 91
Programming language: Haskell
License: MIT License
Tags:
Testing
Genvalidity
genvalidity alternatives and similar packages
Based on the "Testing" category.
Alternatively, view genvalidity alternatives based on common mentions on social networks and blogs.
-
hedgehog
Release with confidence, state-of-the-art property testing for Haskell. -
quickcheck-state-machine
Test monadic programs using state machine based models -
smallcheck
Test your Haskell code by exhaustively checking its properties -
curl-runnings
A declarative test framework for quickly and easily writing integration tests against JSON API's. -
ghc-prof-flamegraph
Generates data to be used with flamegraph.pl from .prof files. -
monad-mock
A Haskell package that provides a monad transformer for mocking mtl-style typeclasses -
test-framework
Framework for running and organising QuickCheck test properties and HUnit test cases -
fuzzcheck
A library for testing monadic code in the spirit of QuickCheck -
tasty-hedgehog
Tasty integration for the Hedgehog property testing library -
hspec-expectations-json
Hspec expectations on JSON Values -
should-not-typecheck
A HUnit/hspec assertion to verify that an expression does not typecheck -
quickcheck-arbitrary-adt
Typeclass for generating a list of each instance of a sum type's constructors -
hspec-golden-aeson
Use tests to monitor changes in Aeson serialization -
test-framework-th
Automagically (using Template Haskell) generates the Haskell-code you need when using HUnit -
tasty-rerun
Rerun previous test suite runs to run only failing tests -
markov-chain-usage-model
Computations for Markov chain usage models -
tasty-expected-failure
Mark test cases as expected-failure -
test-framework-sandbox
test-sandbox support for the test-framework package
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 genvalidity or a related project?
README
Validity and validity-based testing
Why?
to make writing correct software cheaper.
- Free generators
- Free shrinking
- Cheap properties
Cheap properties
- Property Combinators:
specify "inverse functions" $ inverseFunctions (+1) (-1)
specify "equivalent functions" $ equivalent ((+ 1) . (- 1)) id
specify "transitivity" $ transitivity ((>) :: Int -> Int -> Bool)
specify "symmetry" $ symmetry ((==) :: Int -> Int -> Bool)
- Test suite combinators:
ordSpec @Int
Ord Int
(<=) :: Int -> Int -> Bool
is reflexive for "even Int"'s
+++ OK, passed 100 tests.
is antisymmetric for "even Int"'s
+++ OK, passed 100 tests.
is transitive for "even Int"'s
+++ OK, passed 100 tests.
is equivalent to (\a b -> compare a b /= GT) for "even Int"'s
+++ OK, passed 100 tests.
(>=) :: Int -> Int -> Bool
is reflexive for "even Int"'s
+++ OK, passed 100 tests.
is antisymmetric for "even Int"'s
+++ OK, passed 100 tests.
is transitive for "even Int"'s
+++ OK, passed 100 tests.
is equivalent to (\a b -> compare a b /= LT) for "even Int"'s
+++ OK, passed 100 tests.
(<) :: Int -> Int -> Bool
is antireflexive for "even Int"'s
+++ OK, passed 100 tests.
is transitive for "even Int"'s
+++ OK, passed 100 tests.
is equivalent to (\a b -> compare a b == LT) for "even Int"'s
+++ OK, passed 100 tests.
(>) :: Int -> Int -> Bool
is antireflexive for "even Int"'s
+++ OK, passed 100 tests.
is transitive for "even Int"'s
+++ OK, passed 100 tests.
is equivalent to (\a b -> compare a b == GT) for "even Int"'s
+++ OK, passed 100 tests.
Free generators
data MyType = MyType
{ myRational :: Rational
, myBool :: Bool
} deriving (Show, Eq, Generic)
instance Validity MyType -- Implementation is derived via Generic
instance GenUnchecked MyType -- Implementation is derived via Generic
instance GenValid MyType -- Default implementation via GenUnchecked and Validity
genValid :: Gen MyType -- Free access to a generator
Free shrinking
shrinkValid :: MyType -> [MyType] -- Free access to a _valid_ shrinking function
Further Documentation
- [Usage example](docs/USAGE_EXAMPLE.md)
- [Fully worked example](docs/FULLY_WORKED_EXAMPLE.md)
- [High-level package overview](docs/PACKAGE_OVERVIEW.md)
Cachix cache
There is a cachix cache for this project.
To use it, use cachix use validity
or add the appropriate details to your nixos configuration.
Sponsor this project
Validity is free and open-source software. Building it takes time, energy and money. Please consider supporting the project at https://cs-syd.eu/support .