This is the mail archive of the xconq7@sources.redhat.com mailing list for the Xconq project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Autotesting (was Re: RFC: Increment and Decrement)


On Wed, 2004-06-23 at 00:02, Jim Kingdon wrote:
> > As it turns out, my concern was somewhat justified, after I made the
> > horrific discovery this evening that I had broken negative number
> > tokenization a few days ago. I have now fixed this, _but it shows that
> > even the simplest hacks can produce big bugs.
> 
> That's what you get for not writing any tests :-).

Yeah, yeah. ;-)

Actually, I thought I had tested the negative number stuff, but it must
have never gotten past the intention stage.

> Unlike many parts of xconq, writing autotest-style tests for GDL
> parsing is really easy.

I had considered this, but I wasn't sure how much work would be
involved. I thought that I would probably have to figure out how to
instantiate a Lisp stream buffer (which probably isn't all that
involved, but it was one more thing to worry about), tell it to read
from a specific game module, and then look up the initialized data. I
also thought that I might not be able to just test the aspects of GDL I
was interested in, but 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.

Considering all that, I thought it would be easier to simply do testing
within an existing game module (wreckreation.g).

> I suppose if I feel like writing some xconq tests, I could start with
> these, rather than proceeding directly to the nastier, harder to test
> things like "make sure the AI knows how to use a transport".

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.)

Eric


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]