Re: A simple unit test framework
On May 7, 4:23 pm, "Phlip" <phlip...@yahoo.com> wrote:
James Kanze wrote:
A requirement for the function log() is that it return the correct valu=
e,
at 1 LSB, for all positive floating point values. If you write a test
directly according to that, it will take something over 3000 centuries =
to
run, supposing that you can test one value per microsecond (which is
beyond the capabilities of many modern machines).
That is a soak test. TDD doesn't imply that. It implies that for each kno=
wn
branch in the target code there's at least one simple test. Just enough to
fail if you refactored the target code and made it grossly wrong.
In other words, you have to write the code first, to know what
the branches are.
There are many kinds of tests, all more mundane than soaking, which you
shouldn't write first.
Or ever, in such cases:-).
--
James Kanze (Gabi Software) email: james.kanze@gmail.com
Conseils en informatique orient=E9e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S=E9mard, 78210 St.-Cyr-l'=C9cole, France, +33 (0)1 30 23 00 34