[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 07:30:11 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021126

Sam Steingold wrote:

1. The tests do not carry a note of _what_ they test.
   Paul said that he creates the tests by reading CLHS.
   This every test should carry a note at to what section it tests.

Generally (not universally) the tests are grouped by page in the
CLHS.  These tests, for example, are testing the DEFSTRUCT page.

There are something like 6500 tests now.  Since few or very few of them
fail on good implementations, it's a lot easier on me if I can just
document on demand when tests fail.  Send me a list of tests you
want explained and I'll add the comments.

As it happens, this test case (or, the macro form that expands to
it) was partially documented already in structures-02.lsp.  I can
see this may have been hard to find; the test name is generated
on the fly and grepping for it in the test sources won't find it.

;;; If the :conc-name option is given no argument or
;;; a nil argument, the accessor names are the same as
;;; slot names.  Note that this is different from prepending
;;; an empty string, since that may get you a name in
;;; a different package.

2. Reproducibility: I am told that STRUCT-TEST-33/5 fails. I do

[]> do-test 'STRUCT-TEST-35/7)
Test STRUCT-TEST-35/7 failed
Form: (LET ((#:X1799 (MAKE-STRUCT-TEST-35)))
  (LET ((#:T1800 '#:G1796)) (SETF (STRUCT-TEST-PACKAGE::A35 #:X1799) #:T1800)
   (EQLT (STRUCT-TEST-PACKAGE::A35 #:X1799) #:T1800))
  (LET ((#:T1800 '#:G1797)) (SETF (STRUCT-TEST-PACKAGE::B35 #:X1799) #:T1800)
   (EQLT (STRUCT-TEST-PACKAGE::B35 #:X1799) #:T1800))
Expected value: T

   this is not helpful: I am not told what has happened, what is being
   tested, why T was expected and what function was not defined.
   When I try to evaluate the form, I have to strip the `#:' by hand.
   Please avoid gensyms!

I'll see about getting rid of the gensyms here.

As Christophe noted, this has to be printed with *print-circle* bound to t
to be reread properly.

You can also get the form being evaluated here by entering

   (second (get-test 'struct-test-35/7))

(when you are in the CL-TEST package) and just eval that.

These structure tests are being produced by the macro
DEFSTRUCT-WITH-TESTS defined in structure-00.lsp.

Be warned that some tests are testing what happens on forms with shared
structure (for example, some of the COMPILE tests) so printing without
*print-circle* and rereading will inevitably screw up there.  At least one
of the structure tests involves slot names that are uninterned, and its
tests will also break if you do that.


reply via email to

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