Test of a constant defined in a header file
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.
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.
This solution is possible only if you protect the header file. This means you code a #ifdef to avoid a double inclusion.
More support for:
Rational Test RealTime
Component Testing: C
Software version: 7.5, 22.214.171.124, 126.96.36.199, 188.8.131.52, 184.108.40.206, 220.127.116.11, 18.104.22.168, 8.0, 22.214.171.124
Operating system(s): Windows
Reference #: 1611671
Modified date: 16 November 2012