IBM Support

How to stub a function and call it with different parameters mode.

Question & Answer


Question

How to define a STUB twice in order to have the STUB parameters in different mode. Example : First define with _in , and the second one with _no . The problem is that defining more than one DEFINE STUB sections with the same function(s) does not work. For example, with the definition below only the last seems to be recognized: [

DEFINE STUB sum_c
    #int add(int  _in x, int  _in y);
END DEFINE

DEFINE STUB dummi
    #int add(int  _no x, int  _no y);
END DEFINE

STUB sum_c.add 1=>(0,10)10
] And the error message can be the following : TestRT-W-NBVALMUET, [...] Incorrect number of values in stub call: add

[{"Product":{"code":"SSSHUF","label":"Rational Test RealTime"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Component Testing: C","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"2003.06.15;7.0;7.0.0.1;7.0.5","Edition":"","Line of Business":{"code":"LOB77","label":"Automation Platform"}}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

Modified date:
16 June 2018

UID

swg21189551