Skip to content

Commit

Permalink
Removed Va version of override
Browse files Browse the repository at this point in the history
Took out Va version as a test subject could not be located
May be readded later if there is a need
Left UT_DoSetOverride in the code to add Va back in when needed
  • Loading branch information
asgibson committed Mar 5, 2021
1 parent 81b167c commit 7878ce0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
16 changes: 0 additions & 16 deletions ut_assert/inc/utstubs.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,22 +278,6 @@ void UT_SetHookFunction(UT_EntryKey_t FuncKey, UT_HookFunc_t HookFunc, void *Use
*/
void UT_SetVaHookFunction(UT_EntryKey_t FuncKey, UT_VaHookFunc_t HookFunc, void *UserObj);

/**
* Set a Hook function for a particular call, but override any remaining stub functionality
* for va_list using functions. However, some systems have limited support for va_list, so
* this might not be available on those systems. Tests should use the generic (non-va) hook
* function unless the arguments are truly necessary.
*
* This triggers a callback to a user-defined function when the stub is invoked.
* Upon return to the original stub the OverrideStub will be true and any remaining
* code lines in stub (that are purposefully bypassed by the stub) will not be executed.
*
* \param FuncKey The stub function to add the hook to.
* \param HookFunc User defined hook function. Set NULL to delete/clear an entry.
* \param UserObj Arbitrary user data object to pass to the hook function
*/
void UT_SetVaHookOverrideStubFunction(UT_EntryKey_t FuncKey, UT_VaHookFunc_t HookFunc, void *UserObj);

/**
* Get a count for the number of times a stub was invoked, at its most recent return value
*
Expand Down
7 changes: 0 additions & 7 deletions ut_assert/src/utstubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -637,13 +637,6 @@ void UT_SetVaHookFunction(UT_EntryKey_t FuncKey, UT_VaHookFunc_t HookFunc, void
UT_DoSetHookFunction(FuncKey, Value, UserObj, true);
}

void UT_SetVaHookOverrideStubFunction(UT_EntryKey_t FuncKey, UT_VaHookFunc_t HookFunc, void *UserObj)
{
UT_DoSetOverride(FuncKey);

UT_SetVaHookFunction(FuncKey, HookFunc, UserObj);
}

const void *UT_Hook_GetArgPtr(const UT_StubContext_t *ContextPtr, const char *Name, size_t ExpectedTypeSize)
{
uint32 i;
Expand Down

0 comments on commit 7878ce0

Please sign in to comment.