[racket-dev] Testing mode

From: Sam Tobin-Hochstadt (samth at ccs.neu.edu)
Date: Tue Jun 28 08:26:28 EDT 2011

On Mon, Jun 27, 2011 at 8:03 PM, Jay McCarthy <jay.mccarthy at gmail.com> wrote:
>
> It also adds "raco test" which runs a file in testing mode. You can
> optionally add the "--all" option so that all dynamically required
> modules are run in testing mode as well. There could also be a testing
> button in DrRacket, but I didn't include that.
>
> I think this is nice and a bare minimum that solves the problem. Any thoughts?

It's not entirely clear to me which use cases you're trying to address
here. Here are a few possibilities:

1. I wrote some tests in my file, but they take a long time to run,
and so I'd like to only run them when needed.  I'm currently in a
situation like this for a redex model, and have an ad-hoc solution.
What you've built seems great for that.

2. I have test code included in my shipping code, and I'd like to
avoid all performance overhead.  This suggests Eli's concern about
residual code.

3. I have test code in some totally other file.  This is how Racket,
Typed Racket, DrRacket, the web server, etc, work.  Here, changing
Rackunit seems like a mistake, since these files don't have a non-test
mode.

Are you just going for 1?  If so, I'm a big fan.  Otherwise, I worry.
-- 
sam th
samth at ccs.neu.edu


Posted on the dev mailing list.