IBM Support

Test of a constant defined in a header file

Technote (FAQ)


How can you test a constant using IBM Rational Test RealTime?


You need to test a constant, when a header has a constant that points to a memory address.



All source code and/or binaries attached to this document are referred to here as "the Program". IBM is not providing program services of any kind for the Program. IBM is providing the Program on an "AS IS" basis without warranty of any kind. IBM WILL NOT BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS), EVEN IF IBM, OR ITS RESELLER, HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

The header.h file contains the following line.

#define MEMORY_ADDRESS=0x80a800


1. Add -D (define) to the new value Within the project setting Preprocessor flags.


2. Add a t the beginning of the Test Script (.ptu) the following's lines.

##include "header.h"
##include "header.h"


This solution is possible only if you protect the header file. This means you code a #ifdef to avoid a double inclusion.

Document information

More support for: Rational Test RealTime
Component Testing: C

Software version: 7.5,,,,,,, 8.0,

Operating system(s): Windows

Reference #: 1611671

Modified date: 16 November 2012