Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use quickCheck tests with Cabal?

What's the current state of test suites in cabal, and, more importantly, where can I keep atop them?

I've done some poking around, and the latest information that I can find implies that I can't trust the documentation, and I haven't been able to find anyone talking about it for the better part of a year. I've heard rumor of a cabal-test-quickcheck library but can't seem to find one on hackage and can find no examples of how to set it up.

What's the standard way to hook up quickCheck tests into a cabal test suite these days?

like image 727
So8res Avatar asked Apr 06 '12 05:04

So8res


1 Answers

Cabal-1.14.0.0 has come out since then and the detailed test suite seems to be available.

The cabal-test-quickcheck package doesn't seem to have been released yet though, maybe you can get similar functionality from test-framework-quickcheck2?

Alternatively, you can ignore the inbuilt test support in Cabal and just use a flag to determine whether or not to build a test executable.

like image 84
ivanm Avatar answered Sep 20 '22 11:09

ivanm