The fundamental rule for testing functions requires that every function be tested in an already fully tested and debugged program. How can this be accomplished?
a) Impossible! The main function must have all the functions it calls attached to get it to compile and run properly.
b) The main function is tested with stub functions replacing each` function.
c) Write drivers for the stub functions to test them.
d) Add each non-stub function in turn for testing.
e) Write drivers for the function implementations one at a time to test them independently.
b) The main function is tested with stub functions replacing each` function., d) Add each non-stub function in turn for testing., and e) Write drivers for the function implementations one at a time to test them independently.
a) is unreasonably pessimistic. The stubs in b) should be short enough that their correctness may reasonably assumed, hence c) is unreasonable, if possible. In d) we add just one function at a time, and may need to change other stubs to vary data passed to successive functions. If inconvenient to have a main program to drive the function, a driver that provides typical data to a call is an alternative.
You might also like to view...
Motion paths are grouped into the Basic, Lines & Curves, and Exceptional categories.
Answer the following statement true (T) or false (F)
When a database is open, it is displayed in the Access _____ window.
A. record B. program C. table D. object
If you create a jump line and it just isn’t working, what might be the problem?
What will be an ideal response?
Hot-pluggable devices are external devices that can be connected to your computer without turning off the computer.? ____________________
Answer the following statement true (T) or false (F)