Question & Answer
Question
Your function under test calls another function. The latter returns a pointer to a character or a NULL pointer. This function has the following prototype: char * returnCharPointer(void); How do you stub the function and in some tests make it return NULL? In other tests you need to return the address of a character. When you write: STUB returnCharPointer() NIL IBM Rational Test RealTime does not return NULL. The result is that the test always fails.
[{"Product":{"code":"SSSHUF","label":"Rational Test RealTime"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Component Testing: C","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"7.0;7.0.0.1;7.0.5;7.0.5.1;7.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.
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21383723