combining HUnit and QuickCheck

I want to run randomized tests and others and I thought it would be a good idea to run QuickCheck tests in the HUnit framework. Eventually if a test fails the program shall fail. I couldn't figure out how to obtain the test result and a meaningful diagnostic message from QuickCheck. The functions I've found (quickCheck, test, runTests) report everything to the standard output. There is also QuickCheck.Batch.run which returns a TestResult. I wonder if there is already a function which decides whether the TestResult is a success or not and a function which turns the TestResult into a error string.

Lemming
I want to run randomized tests and others and I thought it would be a good idea to run QuickCheck tests in the HUnit framework.
I've approached it from the other side, I'd like to do unit tests in QuickCheck. I've hacked up a prototype that saves failing test seeds for the next test run. See http://www.scannedinavian.org/~shae/tdd-qc.tar.gz It's a rough prototype, I would appreciate ideas for improvement or patches. I've also looked at adding static values to QuickCheck for full unit testing. That doesn't appear difficult, but I haven't tried it yet. -- Programming is the Magic Executable Fridge Poetry, | www.ScannedInAvian.com It is machines made of thought, fueled by ideas. | -- Shae Matijs Erisson
participants (2)
-
Lemming
-
Shae Matijs Erisson