Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bodigrim/smallcheck
Test your Haskell code by exhaustively checking its properties
https://github.com/bodigrim/smallcheck
property-based-testing property-testing smallcheck testing
Last synced: about 16 hours ago
JSON representation
Test your Haskell code by exhaustively checking its properties
- Host: GitHub
- URL: https://github.com/bodigrim/smallcheck
- Owner: Bodigrim
- License: other
- Created: 2011-11-17T23:36:20.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2023-06-04T22:53:00.000Z (over 1 year ago)
- Last Synced: 2024-12-29T13:16:54.288Z (8 days ago)
- Topics: property-based-testing, property-testing, smallcheck, testing
- Language: Haskell
- Homepage: https://hackage.haskell.org/package/smallcheck
- Size: 298 KB
- Stars: 135
- Watchers: 11
- Forks: 16
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
SmallCheck: a property-based testing library for Haskell
========================================================**As of 2023, this library is largely obsolete: arbitrary test generators
with shrinking such as [`falsify`](https://hackage.haskell.org/package/falsify)
offer much better user experience.**SmallCheck is a testing library that allows to verify properties for all test
cases up to some depth. The test cases are generated automatically by
SmallCheck.Usefulness of such an approach to testing is based on the following observation:
> If a program fails to meet its specification in some cases, it almost always
> fails in some simple case.In many ways SmallCheck is very similar to QuickCheck. It uses the idea of type-based generators for test data, and the way testable properties are expressed is closely based on the QuickCheck approach. Like QuickCheck, SmallCheck tests whether properties hold for finite completely defined values at specific types, and reports counter-examples.
The big difference is that instead of using a sample of randomly generated values, SmallCheck tests properties for all the finitely many values up to some depth, progressively increasing the depth used. For data values, depth means depth of construction. For functional values, it is a measure combining the depth to which arguments may be evaluated and the depth of possible results.
The package is based on the [paper](http://www.cs.york.ac.uk/fp/smallcheck/smallcheck.pdf)
by Colin Runciman, Matthew Naylor and Fredrik Lindblad.