[Top][All Lists]

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

Re: [Gcl-devel] ansi-test

From: Paul F. Dietz
Subject: Re: [Gcl-devel] ansi-test
Date: Tue, 17 Dec 2002 19:59:15 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021126

Sam Steingold wrote:

at the very least you might replace ALPHANUMERICP.5.BODY (&c) with

(loop :for i :from 0 :below char-code-limit
  :for x = (code-char i)
  :unless (or (not (characterp x))
              (if (or (digit-char-p x) (alpha-char-p x))
                  (alphanumericp x)
                  (not (alphanumericp x))))
  :collect (list x :digit (digit-char-p x) :alpha (alpha-char-p x)
                 :alphanumericp (alphanumericp x)))

this at least makes it obvious what is being tested!

This revised test is bad because char-code-limit could be very large.
I limited the test to (min 65536 char-code-limit) to prevent it
from running too long (you might increase that bound, but consider
what happens if char-code-limit is, say, 2^64.)

I should add that it was never a design criterion of mine that
a person using the test suite should not have to inspect the source
of the tests.  Test failures should be rare enough that optimizing
the test outputs for understandability in the case of failure is
usually a waste of time.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]