
18 Sep
2007
18 Sep
'07
6:49 a.m.
On Mon, 2007-09-17 at 14:37 -0500, John Goerzen wrote:
* It would be really nice if QuickCheck supported I/O and some version of HUnit's TestLabel to generate hierarchical names when failures occur.
I've done this for testing IO (reading and writing files):
prop_serialize (E s) = let [s'] = unsafePerformIO (do writeFasta "/tmp/serialize_test" [s] readFasta "/tmp/serialize_test") in s == s'
I'm not sure if this is kosher, but at least the tests pass :-) I (like everybody else?)'ve written a small driver for the tests, but perhaps I should look at HUnit for a more general framework? -k