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

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to