[racket-dev] Testing mode

From: Eli Barzilay (eli at barzilay.org)
Date: Tue Jun 28 09:23:03 EDT 2011

25 minutes ago, Neil Van Dyke wrote:
> Just one example: just like some people might have mode called
> "deploying" or "production", I might have particular modules that
> have a run mode in which there are multiple implementations of the
> same function, and at run time both the simple and the
> fast-and-fancy algorithms are run and their results compared (and
> run modes in which only one of the two algorithms are run).  [...]
> Also, even though I just said that embedded test cases are so
> universal, and there is a convenience factor to being able to test
> unexported stuff from a module, even this mode wants to be more
> complicated sometimes.  For example, sometimes tests are expensive,
> and you want to run a smaller subset of the tests.

Those are exactly my motivation for routing things via a binding,
which means that you can now choose one of any number of "running

It's also true that this is all a convenience thing -- it's not
difficult to do it all via `racket/cmdline', but then you'd need to
write a handful of boilerplate lines, which makes it much less
convenient for a quick experiement kind of thing.

I think that I have an even better suggestion -- but since it's more
general, I'll post it on a new thread.

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the dev mailing list.