phubuh / phubuh.org wrote:

>Hej hej, fellow Rubyists!
>
>
Hej Hej Mikael,

>
>That said, I want to talk about testing general assertions
>automatically.  By ``general assertions'', I mean assertions that
>assert some property of arbitrary objects.  For example, say we wanted
>to test this function:
><snip lots of good stuff>
>
Nice! Glad to see some work in this area; I use random testing of 
properties often and it's a very powerful technique.

You might wanna check out the now a bit dated AutoTest stuff which seems 
similar to your RickCheck but takes a somewhat different approach using 
Generators that can generate different types of data. This seems a bit 
more flexible than your approach since you can have multiple Generators 
for objects of a certain type. OTOH, it's more verbose; would be 
interesting to merge our approaches and have it integrate nicely with 
Test::Unit (which I think yours might already be doing?). You can check 
out the annoucement in [ruby-talk:10855] and the code is here 
http://www.ce.chalmers.se/~feldt/ruby/extensions/autotest/

Related to this is also paper 2 in my thesis (available at 
http://www.ce.chalmers.se/~feldt/thesis/08_paper2_wise.ps) which evolves 
tests by combining test cells (basically Generators above) into more 
complex test behaviors. I am currently working on extending these ideas.

Regards and sorry for the plug!

/Robert Feldt