Hi John,

I also had this problem when adding a QuickCheck 2 provider to
test-framework 
(http://hackage.haskell.org/cgi-bin/hackage-scripts/package/test-framework-quickcheck2).
In the end I had to copy considerable portions of the QuickCheck2 code
into the provider because there seems to be no pure interface at all
:-(. This is especially important for test-framework because it may
use threading to run several tests simultaneously, and you don't
really want output from multiple tests interleaved on the console.

Actually, despite copying a large chunk of QC2 into the provider I
/still/ didn't entirely stop it from writing to the console, so failed
QC2 properties running under test-framework write the arguments to the
properties that demonstrate failure BEFORE the message telling you the
property has failed! Upsetting, but I had to draw the line at copying
code somewhere.

Cheers,
Max

2009/3/11 John Goerzen <[email protected]>:
> Hi,
>
> QuickCheck 1.x had this function:
>
> evaluate :: Testable a => a -> Gen Result
>
> which I used in TestPack to help wrap a QuickCheck test as a HUnit
> test case.  QuickCheck 2.x seems to have no pure evaluate-like
> function at all; all of its functions are in the IO monad and also
> write their result to stdout, according to the docs.  Am I missing
> something?
>
> Thanks,
>
> -- John
> _______________________________________________
> Haskell-Cafe mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to