[racket] Racket unit testing, was Re: date format conversion

From: Stefan Schmiedl (s at xss.de)
Date: Sun Feb 13 10:45:20 EST 2011

On Sun, 13 Feb 2011 07:27:35 -0600
Robby Findler <robby at eecs.northwestern.edu> wrote:

> On Sun, Feb 13, 2011 at 3:20 AM, Stefan Schmiedl <s at xss.de> wrote:
> >
> > Are there specific reasons or situations when using
> >
> >        (require test-engine/racket-tests)
> >
> > is "superior" to using the test framework provided in
> >
> >        (require rackunit) ?
> No apriori reason, no. The two evolved independently,
> test-engine/racket-tests was originally designed as part of the
> teaching languages and so makes design decisions that are better
> suited there (specifically for showing the results of test case
> failures). rackunit was designed for the full languages and I believe
> it has more features for putting tests together into test suites and
> support for adding your own kind of test cases and extending existing
> ones.
> And there is also a third unit test framework that Eli wrote that
> takes the position that it should be minimal, punting things like test
> suites into Racket itself (by using functions, say). I'm not sure if
> that last one is included in the documentation.

I went and looked around a bit. Is this what you're referring to?

(require tests/eli-tester)

 (< 1 2)
 (+ 1 2) => 3
 (quotient/remainder 10 3) => (values 3 1)
 (car '()) =error> "expects argument of type")

Very compact and avoids the problem of "what comes first" that I usually
have with other frameworks :-)

Thanks for pointing that one out.


Posted on the users mailing list.