test suite

Charles Ehrlich wrote (in the photon map thread):

Wasn't someone working on a test suite? What is the status of this effort?

I have played around with the unit testing framework included
with newer Python versions a while ago, and created a handful of
tests for some of the auxiliary binaries. This approach has the
advantage to be completely platform-independent. Therefore I can
now confidently say that my current Windows binaries for cnt, ev,
genbeads, getinfo, histo, lam, ttyimage, and xform behave
according to their specification.

For that purpose, I wrote several comparison functions trying to
make sense of certain classes of text data (eg. file headers and
scene descriptions). Those comparisons allow for differences in
whitespace, and for rounding errors in floating point tokens.
I found that even small image files can be reasonably compared,
by picking a few arbitrary lines out of the output from ttyimage.

As it looks, the difficulty is not so much in the testing method,
nor in writing the actual tests. Both of those are very easy.
The real challenge will be coming up with good examples and test
cases that really cover the critical borderline cases in each
program to be tested. Help from as many people as possible will
be required to reach a reasonably complete coverage.

I can check the current state into CVS for people to look at it.
Right now it's located in a directory "test" (and subdirectories)
directly under ray, but could be moved elsewhere if someone has a
better idea.

-schorsch

ยทยทยท

--
Georg Mischler -- simulations developer -- schorsch at schorsch com
+schorsch.com+ -- lighting design tools -- http://www.schorsch.com/