C++test can accommodate a number of strategies for programming test case-specific stub behavior. The most common strategy is to use dynamic stubs configuration (see ). In the rare instances that these approaches are insufficient, you can replace the stub body with your own custom logic implementation an create a stub that is driven by the test case.
The following functions can be used in the stub code to get information about the currently executed test case. This information is superseded by the dynamic stubs configuration functionality and should only be used for legacy stubs and for cases where dynamic stubs configuration functionality is insufficient.
|Returns the name of the currently executed test case.|
|Returns the name of the currently executed test suite.|
|Allows you to query the currently executed test case. It will return true if the specified id equals the name of the currently executed test case. Otherwise, it will return false.|