falsify

Property-based testing with internal integrated shrinking

LTS Haskell 22.30:0.2.0@rev:3
Stackage Nightly 2024-07-24:0.2.0@rev:3
Latest on Hackage:0.2.0@rev:3

See all snapshots falsify appears in

BSD-3-Clause licensed by Edsko de Vries
Maintained by [email protected]
This version can be pinned in stack with:falsify-0.2.0@sha256:af9f6a978aeb74811ea198b09c2a097e56e2e938be50fcc7e4080b27fbd9ed72,5451

This library provides property based testing with support for internal integrated shrinking: integrated in the sense of Hedgehog, meaning that there is no need to write a separate shrinker and generator; and internal in the sense of Hypothesis, meaning that this works well even across monadic bind. However, the actual techniques that power falsify are quite different from both of these two libraries.

Most users will probably want to use the integration with tasty, and use Test.Tasty.Falsify as their main entrypoint into the library. The Test.Falsify.Interactive module can be used to experiment with the library in ghci.

Changes

Revision history for falsify

0.2.0 – 2023-11-08

  • Avoid use of Expr in at (#48)
  • Add oneof (#54; Simon Kohlmeyer)
  • Generalize Range, so that it can be used for types like Char (#51). As a consequence, Gen.integral and Gen.enum are now deprecated, and superseded by Gen.inRange.
  • Add GenDefault class and DerivingVia helpers to derive generators (Eric Conlon; #61, #64).

0.1.1 – 2023-04-07

  • Better verbose mode for test failures
  • New predicates: split and pairwise.
  • Shrink towards the second half of the range in withOrigin

0.1.0 – 2023-04-05

  • First release