public inbox for xconq7@sourceware.org
 help / color / mirror / Atom feed
From: Jim Kingdon <kingdon@panix.com>
To: mcdonald@phy.cmich.edu
Cc: xconq7@sources.redhat.com
Subject: Re: Autotesting (was Re: RFC: Increment and Decrement)
Date: Thu, 24 Jun 2004 07:01:00 -0000	[thread overview]
Message-ID: <200406240628.i5O6SGM04277@panix5.panix.com> (raw)
In-Reply-To: <1087997746.13930.115.camel@localhost.localdomain> (message from Eric McDonald on Wed, 23 Jun 2004 07:35:46 -0600)

> I do intend to look more closely at auto-testing at some point. It has
> been on my list to do for some time. (Incidentally, I have used it
> before: to verify the packed boolean tables implementation.)

Oh yes, I remember.  That's why I thought I might con you into writing
more ;-).

> I thought that I would probably have to figure out how to instantiate
> a Lisp stream buffer [. . . etc etc etc and so on]

Ah yes, but unfortunately for your excuse, this part was written years
ago by Stan.  There's a function in lisp.c called
read_form_from_string which has all I needed to write a simple test
(which I have now checked in).

> might have to do a full init on the Xconq engine to make sure that
> various crucial data structures and variables got initialized.... IOW,
> potentially a pain.

I'm not sure it affects the lisp.c code, but in general, yeah, these
kinds of global "crucial data structures and variables" are the bane
of unit testing.  There are basically two solutions: (1) make the code
more modular, so it is easier to just set up the part you are testing,
or (2) as part of the test code, have a bunch of helper methods which
do various kinds of setup.  Most systems I know which are more fully
unit tested do some of each.

As for where autotest.c stands, well, it hasn't really tackled these
issues.  It does a fairly normal xconq setup (using auto.g), and then
it runs the tests in order (without resetting anything in between).
Generally speaking, I had in mind moving towards a situation where
each unit test blows away any state which might confuse it, and then
sets up what it needs to run.  I could elaborate, but for now I'll
just say that (a) to really get this working smoothly won't happen
overnight, but (b) it is usually feasible to do it one step at a time,
starting with those tests, or styles of tests, which are easy to write
now and working up to the tests which are now hard.

  reply	other threads:[~2004-06-24  6:28 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-21  6:50 GDL Notice: Arithmetic Operators / Quasi-Formulae Eric McDonald
2004-06-21  8:11 ` Newest code crashes Tcl/Tk Brian Dunn
2004-06-21 16:22   ` Eric McDonald
2004-06-21 20:13   ` Hans Ronne
2004-06-24  0:04     ` Brian Dunn
2004-06-24  3:36       ` Hans Ronne
2004-06-24  4:21         ` Brian Dunn
2004-06-24  4:50           ` Eric McDonald
2004-06-24  6:28             ` Brian Dunn
2004-06-24 18:34               ` Eric McDonald
2004-06-24  7:15           ` Hans Ronne
2004-06-24  9:28             ` Brian Dunn
2004-06-24  9:41             ` Tcl/Tk update Brian Dunn
2004-06-24 17:08               ` Hans Ronne
2004-06-24 15:01             ` Tck/Tk info Brian Dunn
2004-06-27  6:16               ` Brian Dunn
2004-06-27  9:19                 ` Hans Ronne
2004-06-24 16:59             ` Newest code crashes Tcl/Tk Jim Kingdon
2004-06-24 17:03               ` Hans Ronne
2004-06-24 17:30                 ` Eric McDonald
2004-06-24 18:24                   ` Hans Ronne
2004-06-21 16:25 ` GDL Notice: Arithmetic Operators / Quasi-Formulae Eric McDonald
2004-06-22  3:25 ` Eric McDonald
2004-06-22  6:19   ` Jim Kingdon
2004-06-22  9:50     ` Juergen Ruehle
2004-06-22 14:18       ` RFC: Increment and Decrement (was Re: GDL Notice: Arithmetic Operators / Quasi-Formulae) Eric McDonald
2004-06-22 14:50         ` Jim Kingdon
2004-06-23  6:02           ` Eric McDonald
2004-06-23  6:17             ` Jim Kingdon
2004-06-23 13:40               ` RFC: Increment and Decrement (was Re: GDL Notice: ArithmeticOperators " Erik Jessen
2004-06-23 23:33               ` Autotesting (was Re: RFC: Increment and Decrement) Eric McDonald
2004-06-24  7:01                 ` Jim Kingdon [this message]
2004-06-25  3:35                   ` Eric McDonald
2004-06-22 14:03     ` GDL Notice: Arithmetic Operators / Quasi-Formulae Eric McDonald

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200406240628.i5O6SGM04277@panix5.panix.com \
    --to=kingdon@panix.com \
    --cc=mcdonald@phy.cmich.edu \
    --cc=xconq7@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).