When speaking of C++ applications, the term "component testing" applies to the testing of C++ classes. As when working with C functions and Ada functions and procedures, embedded object testing requires the construction of a test harness (consisting of stubs and test drivers), the generation of suitable input data, and the subsequent passing of that data into the methods under test in order to verify the accuracy of the output data.
In addition to the overhead effort that was automated by the component testing feature for C and Ada - such as stub, test driver, and data generation - the component testing feature for C++ adds additional capabilities:
Support for complex data types
Support for private and protected class methods and variables
Support for contract assertion checking - that is, the ability to verify properly obeyed preconditions, postconditions, and data invariants.
Such features are crucial for efficient, proactive debugging. Without them, you wouldn't have enough power at your disposal to catch all the defects in your C++ code.
The following exercise will highlight these additional capabilities.