[racket-dev] RFC: Coding Guidelines

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Thu Aug 19 09:48:35 EDT 2010

On Thu, Aug 19, 2010 at 8:44 AM, Sam Tobin-Hochstadt <samth at ccs.neu.edu> wrote:
> On Tue, Aug 17, 2010 at 3:57 PM, Jay McCarthy <jay.mccarthy at gmail.com> wrote:
>> Please comment.
> I think that this:
> "Your first task when changing old code is to build an adequate test
> suite to ensure you do not introduce new mistakes as you attempt to
> improve it. Thank you for improving the world for future generations!"
> is too demanding.  There are enormous areas of our code that don't
> have a test suite.  How comprehensive a test suite do I need before
> changing slideshow?  Or scribble (which has a test suite for the
> syntax, but not the language)?

You should make a reasonable effort to put in a test case or two for
the specific functionality that you're adding/modifying. If there is
no test suite and you aren't sure how to build one, then ask, see what
responses you get, and go from there.

In the special case that you found a bug and are fixing in, there
should be a way to observe that bug and you should be able to turn
that into a test case. If you cannot, perhaps that points to something
the language is missing. This case, I'd say, is particularly worth
investigating, even in something that has completely no tests.

And, of course, Matthias's earlier caveats apply here too.


Posted on the dev mailing list.