NEW PAGE

Jag's self-testing

see jag/book/convi/AllTest.java for a tester routine

Ideally we want a a testing mechanism in each directory for each class. tests serve as maintenance tool and as simple examples for new users.

A mechanism walks throught the entire software and invokes all tests. the walk probably needs to be organised so that software that serves as basis to other software is sampled first:

	jam.vector 
	jam.operator
	rsf.vector 
	nmo.operator
that should help debugging. thorough testing: Should interfaces be tested by compiling them? No, only complexed objects where compiling alone is insufficient.

All tests are in an main routine that is without arguments. main routines can be called from other routines as class routines. main routines can be called from makefile as standalone file. All tests return a 0 for passed and a number for not passed. All tests use standard juice.util.Tester exit methods.

It would be nice to have a verbose flag on all of them so that only errors would make an output. Maybe a compromise could be to print only statements of the routine name and if it passed.

All tests have to be meaningful and their output in verbose mode should be self-explainatory.

What could be the java walking mechanism? The make walking mechanism is pretty straightforward, I think: first visit a few crucial directories, then find all directories and walk through them alphabetically.

Interesting: GNU software has a test directory. I don't like that. it is not object oriented.

GNU software creates a makefile from configure. I want that! Should be easy: no system dependency since Java. but regenerate the hierarchy by configure. A single central top directory. lower level directories is empty: a rule finds all programs called


matt@hessen