Files and classes under test

Component Testing for C++

Source Files

The Source under test are source files containing the code you want to test. These files must contain either the definition of the classes targeted by the test, or method implementations of those classes.

Note   Source files can be either body files (.C, .cc, .cpp...) or header files (.h), but it is usually recommended to select the body file. Specifying both header and body files as Source under test is unnecessary.

When using a C++ Test Driver Script, the wizard generates:

When using a C++ Contract Check script, the wizard generates:

Note   If a source under test is a header file (a file containing only declarations, typically a .h file), the source file under test is automatically included in the C++ Test Driver script.

Candidate Classes

For source files containing several classes, you may only want to submit a restricted number of classes to testing.

If no classes are selected, the wizard automatically selects all classes that are defined or implemented in the source(s) under test as follow:

Note   Classes can only be selected if you have refreshed the File View before running the Test Generation Wizard.

Related Topics

Additional Files or DirectoriesComponent Testing Wizard