Next: , Up: Unit testing


8.2.1 Designing unit tests

Please keep in mind the following considerations when designing unit tests for the functions of a library module:

For any given function we would like to define positive, negative and stressing unit tests:

Many functions are simple enough to only require a single positive test running the function (no parameters). It is important to have this unit test since the execution may fail even for such simple functions.

While designing the unit tests you may find that the API contain errors or that it may be improved in any way. That is fine and it is quite welcomed. You can propose any change of the API in this list.