Home > User Support > CoverageMaster winAMS FAQ

CoverageMaster winAMS FAQ

Stub Functions

002_03: How to create a stub function for a function called by a function pointer?

Question:

I want to test a function that includes a function called by a function pointer. How can I create a stub function for such a function?

Answer:

A global stub function of the subfunction called by function pointer can be created from the Stub Settings list by selecting the subfunction indicated in the test data (function address or symbol) given to the function pointer. Functions set to be replaced by a stub function will be replaced even when called by a function pointer.

However, it is not possible to create a local stub function for a function called by a function pointer. The function must be called explicitly to create a local stub function.

 

Related Technical Tips Search

Other technical tips in GAIO's web site can be searched for using the links below.

Search key word link: Function Pointer
Technical Tips Google Search


Information Links