diff --git a/ut_assert/inc/utstubs.h b/ut_assert/inc/utstubs.h index f464d9e4a..7c532ec6f 100644 --- a/ut_assert/inc/utstubs.h +++ b/ut_assert/inc/utstubs.h @@ -180,21 +180,16 @@ void UT_SetDataBuffer(UT_EntryKey_t FuncKey, void *DataBuffer, size_t BufferSize void UT_GetDataBuffer(UT_EntryKey_t FuncKey, void **DataBuffer, size_t *MaxSize, size_t *Position); /** - * Enable or disable the forced failure mode for the given stub function - * - * This triggers a constant failure mode from the stub function, if implemented. - * The stub function will invoke a given failure path as defined by - * the stub implementation. - * - * A count of the number of times the failure mode is invoked will be maintained. + * Set the default return value for the given stub function. + * User needs to use UT_ClearDefaultReturnValue to clear the value. * * \param FuncKey The stub function to add the return code to. - * \param Value Arbitrary failure mode value (may or may not be used by the stub) + * \param Value Arbitrary return value (may or may not be used by the stub) */ void UT_SetDefaultReturnValue(UT_EntryKey_t FuncKey, int32 Value); /** - * Disable the forced failure mode for the given stub function + * Disable the default return for the given stub function * * This undoes the action of UT_SetDefaultReturnValue() * @@ -226,7 +221,7 @@ void UT_SetForceFail(UT_EntryKey_t FuncKey, int32 Value); * * \param FuncKey The stub function entry to clear. * - * @deprecated replaced by UT_ClearDefaultReturnValue + * @deprecated replaced by UT_ClearDefaultReturnValue */ void UT_ClearForceFail(UT_EntryKey_t FuncKey); #endif diff --git a/ut_assert/src/utstubs.c b/ut_assert/src/utstubs.c index ed737129a..a4376b444 100644 --- a/ut_assert/src/utstubs.c +++ b/ut_assert/src/utstubs.c @@ -313,13 +313,13 @@ void UT_SetDefaultReturnValue(UT_EntryKey_t FuncKey, int32 Value) UT_StubTableEntry_t *Rc; /* - * First find an existing force fail entry for the function. + * First find an existing default return value entry for the function. * In case one is already set we do not duplicate (unlike deferred codes) */ Rc = UT_GetStubEntry(FuncKey, UT_ENTRYTYPE_FORCE_FAIL); if (Rc == NULL) { - /* Creating force fail entry - repeat search and grab any unused slot */ + /* Creating default return value entry - repeat search and grab any unused slot */ Rc = UT_GetStubEntry(FuncKey, UT_ENTRYTYPE_UNUSED); }