Choosing Test Cases
Years of (painful) experience have shown programmers a variety of common bugs:
- iterating one time too many or one time too few through a loop
("fencepost" errors)
- using
< rather than <= , or vice versa
- forgetting to handle the null/empty/zero case
- assuming that other parts of the program supply valid data
- assuming that library functions like
malloc always succeed
- etc. etc. etc.
Choose test cases to ensure that all such bugs will be exercised.
Requires you to understand the "limit points" of your program.
|