[Haskell-cafe] Type System vs Test Driven Development

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Wed Jan 12 13:16:52 CET 2011


On 12 January 2011 21:16, Serge Le Huitouze <serge.lehuitouze at gmail.com> wrote:
> Evan Laforge <qdunkan at gmail.com> wrote:
>
>> QuickCheck seems to fit well when you have small input and output
>> spaces, but complicated stuff in the middle, but still simple
>> relations between the input and output.  I think that's why data
>> structures are so easy to QuickCheck.  I suppose I should look around
>> for more use of QuickCheck for non-data structures... the examples
>> I've seen have been trivial stuff like 'reverse . reverse = id'.
>
> I second this feeling...
>
> For example, I've never seen (I've not looked hard, though) Quickcheck's
> testing applied on graphs. Generating "interesting" (whatever that means
> for your particular problem) graphs doesn't seem to be a trivial test, even
> if it's a mere data structure...
> Does anyone know of such examples?

I do some graph-based testing in graphviz [1].  It is non-trivial to
generate decent Arbitrary instances due to the recursive definitions
:s

[1]: http://hackage.haskell.org/package/graphviz

-- 
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
IvanMiljenovic.wordpress.com



More information about the Haskell-Cafe mailing list