Re: A simple unit test framework
On May 7, 10:08 am, anon <a...@no.no> wrote:
James Kanze wrote:
In this case you will not
have to do a coverage, but it is a plus. This way, the code you write
will be minimal and easier to understand and maintain.
And will not necessarily meet requirements, or even be useful.
If you write tests according to the requirements, you can be 100% sure
that statement is correct
A requirement for the function log() is that it return the
correct value, 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).
If the requirements involve thread safety, it may not even be
possible to theoretically guarantee coverage, since a number of
aleas are involved that you cannot control. The same thing is
true about any number of other types of applciations: real time
process control, network management, etc.
James Kanze (GABI Software) email:firstname.lastname@example.org
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