[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: testing syntax

On Sat, 19 Mar 2005, Per Bothner wrote:

> Any preferences for or against these changes?
> (1) Move optional test-name to the end of the argument list? [...]

I tend to agree that the status quo is preferable.  Since the test name
will usually appear as a literal string, it's easy to pick out, and having
it first makes it easier to find (and semantically clearer, because the
name is part of the declaration of the test and not part of what's being
tested).  I'd rather have different names for the named and anonymous
procedures than have the test-name at the end...

I have much *more* issue with the statically ambiguous 

   (test-end [name] [count])

which, when appearing with one argument, requires some inspection to
decide what it means.  (This is an implementor's issue, not a user's
issue.  A user can visually distinguish between "Test 3" and 3 pretty
readily :-))

> (2) Move the "expected value" argument *before* the "expression to
> evaluate" argument. [...]

If that's more consistent with standard practice, then fine.  I tend to 
write equality tests the other way in my code (exprs on the left, 
constants on the right), but I can get used to this.

> (3) We need some routines for testing inexact numbers. [...]

Sounds reasonable.  Myself, I don't do enough numerics to have a sense of 
what constitutes a reusable abstraction here.

-- Donovan Kolbly                    (  d.kolbly@xxxxxxxxxxx
				     (  http://www.rscheme.org/~donovan/