[Haskell-cafe] ANN: leancheck-v0.7.4 with providers for Tasty, Hspec and test-framework

waldmann johannes.waldmann at htwk-leipzig.de
Mon Sep 10 13:09:43 UTC 2018


I do prefer the enumerative approach for test case generation
over the randomized one (quickcheck) because I have use cases
(testing student code) where I want to avoid IO,
and I just want a pure list of (small) counterexamples.

Among the enumerative testing libraries,
the "competition" is between leancheck and smallcheck.
For, me the important differences are

Enumeration of algebraic data types (ADTs), via built-in
serial combinators, e.g.,  cons0 Leaf \/ cons2 Branch

* leancheck enumerate by size (number of nodes in tree)
* smallcheck enumerates by depth (longest path in tree)

I (much!) prefer "by size"
because this delays combinatorial explosion somewhat.

Automated Listable/Serial instances for ADTs

* leancheck uses template-haskell
* smallcheck uses DeriveGeneric

Here I would actually prefer DeriveGeneric.
But this certainly could be added to leancheck?

Oh, and leancheck does not use fancy typeclassery
(smallcheck needs Multiparamtypeclasses and Monads
just to declare a Serial instance)
and it is also easier to get at the list of counterexamples.

- J.W.

More information about the Haskell-Cafe mailing list