Code Testing
Wrapper functions can be used to write error checking routines for pre-existing system functions without increasing the length of a code by a large amount by repeating the same error check for each call to the function. All calls to the original function can be replaced with calls to the wrapper, allowing the programmer to forget about error checking once the wrapper is written. A test driver is a kind of wrapper function that exercises a code module, typically calling it repeatedly, with different settings or parameters, in order to rigorously pursue each possible path. It is not deliverable code, but is not throwaway code either, being typically retained for use in regression testing. An interface adaptor is a kind of wrapper function that simplifies, tailors, or amplifies the interface to a code module, with the intent of making it more intelligible or relevant to the user. It may rename parameters, combine parameters, set defaults for parameters, and the like.
Read more about this topic: Wrapper Function
Famous quotes containing the words code and/or testing:
“... the self respect of individuals ought to make them demand of their leaders conformity with an agreed-upon code of ethics and moral conduct.”
—Mary Barnett Gilson (1877?)
“Now I see that going out into the testing ground of men it is the tongue and not the deed that wins the day.”
—Sophocles (497406/5 B.C.)