From: skaller <sk...@us...> - 2004-08-08 01:37:39
|
On Sun, 2004-08-08 at 06:36, Brian Hurt wrote: > There are (at least) two levels of unit testing we want to consider: > external unit testing, which gaurentees the library implements the > interface correctly, and can (and probably should be) kept external to the > library. Second is internal unit testing, which does need to be in the > same file, so it can see all the abstract types and hidden functions to > test them. Actually, I'd be happy with something far less rigid, at least at the start: we just need a way to collect and run contributed tests. Ad hoc testing isn't going to guarrantee anything, but its better than nothing, IMHO. There is a LOT more work building and running tests than actually writing library functions: we should concentrate on the latter. However currently, there aren't even cursory tests that demonstrate one function from some module can actually be linked into a program and runs. > > > Testing also raises issues of how to build > > > a test harness to run the tests and report the results. > > > > > > > Well, that's already provided by OUnit. > > > > I think he meant "how do we write a makefile to run the tests and report > the results". Yes, I meant how do we write a *program* to do that .. note I didn't say 'makefile'. I'm generally not in favour of makefiles, shell script, or Unix tools. They don't work on all platforms, including many Unix platforms. I personally prefer script in some high level language such as Perl or Python, I suppose Ocaml is an option too: although dynamic typing and loading seems weaker, at least Ocaml is sure to be installed :) -- John Skaller, mailto:sk...@us... voice: 061-2-9660-0850, snail: PO BOX 401 Glebe NSW 2037 Australia Checkout the Felix programming language http://felix.sf.net |