Technote (FAQ)
Question
How can you test a constant using IBM Rational Test RealTime?
Cause
You need to test a constant, when a header has a constant that points to a memory address.
EXAMPLE
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.
|
Answer
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.
|
REMARK
This solution is possible only if you protect the header file. This means you code a #ifdef to avoid a double inclusion.
Rate this page:
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.