Ch. 6.16: Stubs and Drivers Flashcards
1
Q
What are stubs and drivers?
A
Stubs and drivers are very helpful tools for testing and debugging programs that use functions.
2
Q
What is a stub?
A
A stub is a dummy function that is called instead of the actual function it represents. It usually displays a test message acknowledging that it was called, and nothing more.
3
Q
What is a driver?
A
A driver is a program that tests a function by simply calling it. If the function accepts arguments, the driver passes test data. If the function returns a value, the driver displays the return value on the screen.