IMPORTANT: This repository is now hosted on BitBucket.
This stub project demonstrates how to organize code tests and benchmarks in a Haskell project. It shows how to:
- separate tests and benchmarks from the actual code, so that users don't need to install testing and benchmarking libraries
- use cabal to automate testing and benchmarking
- use tasty to create a coherent test suite containing both HUnit and QuickCheck tests
- create QuickCheck tests that run with many different test data sets.
- use criterion to create benchmarks
Execute these commands to compile and run tests:
cabal configure --enable-tests cabal build cabal test
Execute these commands to compile and run benchmarks:
cabal configure --enable-benchmarks cabal build cabal bench
Compiling the library
Execute these commands to install the library without benchmarking and testing code:
cabal configure cabal build cabal install