[racket-dev] Racktest was: OMG the thread that will never die about testing

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Sun Feb 20 21:52:37 EST 2011

On Sun, Feb 20, 2011 at 8:40 PM, Robby Findler
<robby at eecs.northwestern.edu> wrote:
> On Sun, Feb 20, 2011 at 7:56 PM, Ryan Culpepper <ryanc at ccs.neu.edu> wrote:
>> On 02/20/2011 06:43 PM, Robby Findler wrote:
>>>
>>> One thing I would also like to be able to do, based on this
>>> discussion, is make a rackunit/base library that has very minimal
>>> dependencies and provides a minimal testing infrastructure. I'd be
>>> happy with something like check-equal? only at the top-level, ish.
>>>
>>> Is that something that your changes would affect?
>>
>> You can already do that:
>>
>>  #lang racket
>>  (require rackunit)
>>  (test-equal? "fruit equivalence" 'apple 'orange)
>>  (check-equal? 'apple 'orange)
>>  (for ([fruit '(orange pear)])
>>    (check-equal? fruit 'orange))
>>
>> How minimal do you need the dependencies to be?
>
> Yes, I know. I have fixed bugs in that code. :)
>
> No contracts is the obvious one for now. But I know Matthew also has
> plans to redo some of the top-level only test suites in
> collects/tests/racket and if this were available, he might use it
> (altho I don't know that he would).
>
> Something minimal could depend really only on equal?, io, some simple
> macros, and functions I think, so it seems possible to depend only on
> #%kernel, but probably that's too much work.
>
> How difficult would just racket/base be?

Oh, and let me add that it seems painful to try to refactor the
existing rackunit library to depend on less, but it seemed like it
might be doable to reimplement just a small fragment of it in a way
that (hopefully) could interoperate with the rest.

(In addition to check-equal? it would be nice to have some way to get
a summary of the tests that were run if that's not asking for too
much. It only needs to work when all tests pass, too, if that helps.)

Robby



Posted on the dev mailing list.