testing-feat: Functional Enumeration of Algebraic Types

[ bsd3, library, testing ] [ Propose Tags ] [ Report a vulnerability ]

Feat (Functional Enumeration of Algebraic Types) provides enumerations as functions from natural numbers to values (similar to toEnum but for any algebraic data type). This can be used for SmallCheck-style systematic testing, QuickCheck style random testing, and hybrids of the two.

The enumerators are defined in a very boilerplate manner and there is a Template Haskell script for deriving the class instance for most types. Test.Feat contain a subset of the other modules that should be sufficient for most test usage. There are some small and large example in the tar ball.

The generators are provided by the size-based package. This means other libraries that implement the Sized class can use the same generator definitions. One such is the lazy-search package, that uses laziness to search for values and test properties. This is typically a lot faster than Feat for properties that have preconditions (logical implication), but can not be used for random selection of values.

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1, 0.2, 0.3, 0.3.0.1, 0.4, 0.4.0.1, 0.4.0.2, 0.4.0.3, 1.0.0.0, 1.0.1.0, 1.1.0.0, 1.1.1.0, 1.1.1.1
Change log CHANGELOG.md
Dependencies base (>=4.11 && <5), QuickCheck (>2 && <3), size-based (<0.2), testing-type-modifiers (<0.2) [details]
Tested with ghc ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.4 || ==9.4.1
License BSD-3-Clause
Copyright Jonas Duregård
Author Jonas Duregård
Maintainer byorgey@gmail.com
Category Testing
Home page https://github.com/size-based/testing-feat
Source repo head: git clone https://github.com/size-based/testing-feat
Uploaded by BrentYorgey at 2022-08-15T18:08:02Z
Distributions LTSHaskell:1.1.1.1, NixOS:1.1.1.1, Stackage:1.1.1.1
Reverse Dependencies 4 direct, 33 indirect [details]
Downloads 20027 total (70 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2022-08-15 [all 1 reports]