15

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 ...

Get Deciphering Object-Oriented Programming with C++ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.