Test Framework Components

The main components of the Test Framework are:

Test Classes

A target class is a class in your program that you want to test for correct performance. You write a test class, derived from a Test Framework class, that runs the target class and does the evaluation.

ITest is the abstract base class from which all test classes are derived, including the test class that you write and declare to be a friend of your target class. You can derive directly from ITest to perform simple tests. In addition, three kinds of functionality are provided by specialized subclasses derived from ITest:

The test classes work by creating and evaluating an instance of your target class. You do not have to make changes to your target class code to test its behavior.

Runtest macros

The Test Framework defines several macros that you may use to create applications to run your tests: