From: skaller <sk...@us...> - 2004-12-18 00:17:26
|
On Sat, 2004-12-18 at 00:40, Bardur Arantsson wrote: > I think we may be discussing different things... I'm only > talking about something which ExtLib developers can use > exclusively for testing ExtLib itself, not about making a > test harness available to ExtLib users. No, we're talking about the same thing. > In general, yes, but it doesn't mean that we can't agree > on an *internal* method for testing ExtLib itself. Well, can you could write a specification? Assume a directory containing tests, people can dump tests in it. The tests need names -- what names? it must be possible to specify expected result, the harness must report which test(s) (if any) fail. You can use an 'assert' test (if the code runs at all it passes). The problem with that is that library function are hard to test like that.. How do you test 'string.split'? This is not so easy! Try: assert (x = combine "/" (split x "/")) Which suggests making the split char vary. How do you test ExtSet? You need stuff to put in it, where does it come from? -- 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 |