[racket-dev] Testing mode

From: Eli Barzilay (eli at barzilay.org)
Date: Mon Jun 27 20:20:10 EDT 2011

15 minutes ago, Jay McCarthy wrote:
> We've talked before about having a testing mode so that tests could
> be written inline, but not run when the module is normally run. I've
> attached a patch that adds a simple way of doing this.
> racket/test gives you
> - with-testing
> - with-deploying

Why add more bindings?  Why not just use definitions instead,

  (define (test) (...run test code...))


This way there is no need to add more hacks when you need different
kinds of testing (`with-gui-tests') or completely different run modes

> I think this is nice and a bare minimum that solves the problem. Any
> thoughts?

(There was also an issue of how to avoid having test code in the
compiled form.)

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

Posted on the dev mailing list.