Testing Classes and Components
This chapter will continue our pursuit of increasing your C++ programming repertoire beyond OOP concepts through exploring means to test the classes and components that comprise our OO programs. We will explore various strategies to help ensure that the code we write will be well-tested and robust.
This chapter shows how to test your OO programs through testing individual classes, as well as testing the various components that work together.
In this chapter, we will cover the following main topics:
- Understanding the canonical class form and creating robust classes
- Creating drivers to test classes
- Testing classes related by inheritance, association, or aggregation
- Testing exception handling mechanisms
By the end of this chapter, you will have various techniques in your programming arsenal to ensure that your code is well-tested before it goes into production. Having the skills to consistently produce robust code will...