gnustep-dev
[Top][All Lists]
Advanced

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

Re: regression testsuite for the gui


From: Richard Frith-Macdonald
Subject: Re: regression testsuite for the gui
Date: Mon, 13 Aug 2001 15:07:45 +0100

On Sunday, August 12, 2001, at 06:31 AM, Nicola Pero wrote:

I think we really need a regression testsuite for the gui library now.

We could at least test -

 * basic allocation of objects, copying, etc works

 * coordinate conversion routines (NSView etc);

 * tests for points inside rectangles etc (NSView etc again);

 * tests for getRow:column:forPoint: and the tons of other methods
   for retrieving things from NSMatrix, NSMenu, NSBrowser etc,
   either the selected one or etc (btw, this is quite important as it
   seems we are periodically breaking the same things in NSMatrxi
   and NSBrowser ... things which could be regression-tested
   automatically)

Yep ... all those sound ok to test quite simply.

 * I think if we are clever we can test more complicated stuff, real
   stuff I mean.
   For example, I noticed that deleting using backspace in a
   textfield doesn't really work any longer.  We can catch that
   with an automated test: we create a window with two textfields in
   it.  in the first one, we insert programmatically `nico'.  In
   the second one, we insert programmatically `nicola' and then
   programmatically set the insertion point at the end and
   programmatically delete backwards two characters.  then, we set
   the first responder to be, say, a third text field.  at this point,
   we grab the first textfield as an image, and the second textfield
   as an image, and we compare the two images.  if they are the same,
   the test is passed, otherwise something is wrong.
   Might this work ?  if it does, we could then eg write some
   regression tests for postscript path utilities this way etc

I guess it should work in theory ... but I wonder if pixel rounding
differences might cause the images to differ.  Probably the only way
to find out is try it ...



reply via email to

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