1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-01-18 04:58:51 +02:00

Remove unused type parameter from FUNCTION_TEST_RETURN().

This parameter was always useless but commit 7333b630 removed all references to it so remove the parameter at all call sites as well.

The original intention was probably to allow logging of TEST return values but that never happened.
This commit is contained in:
David Steele 2019-01-28 15:06:28 +02:00
parent 7333b6302f
commit 8b2a344cfe
79 changed files with 416 additions and 427 deletions

View File

@ -86,7 +86,7 @@
</release-item>
<release-item>
<p>Rename FUNCTION_DEBUG_* and consolidate ASSERT_* macros for consistency.</p>
<p>Function log macro improvements. Rename FUNCTION_DEBUG_* and consolidate ASSERT_* macros for consistency. Improve <code>CONST</code> type macro handling. Move <code>MACRO_TO_STR()</code> to <file>common/debug.h</file>. Remove unused type parameter from <code>FUNCTION_TEST_RETURN()</code>.</p>
</release-item>
<release-item>
@ -141,14 +141,6 @@
<p>Rename <code>common/io/handle</code> module to <code>common/io/handleWrite</code>.</p>
</release-item>
<release-item>
<p>Improve <code>CONST</code> type macro handling.</p>
</release-item>
<release-item>
<p>Move <code>MACRO_TO_STR()</code> to <file>common/debug.h</file>.</p>
</release-item>
<release-item>
<p>Add <code>const VariantList *</code> debug type.</p>
</release-item>

View File

@ -18,7 +18,7 @@ lockStopFileName(const String *stanza)
String *result = strNewFmt("%s/%s.stop", strPtr(cfgOptionStr(cfgOptLockPath)), stanza != NULL ? strPtr(stanza) : "all");
FUNCTION_TEST_RETURN(STRING, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************

View File

@ -399,7 +399,7 @@ stanzaInfoList(const String *stanza, StringList *stanzaList)
varLstAdd(result, stanzaInfo);
}
FUNCTION_TEST_RETURN(VARIANT_LIST, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************

View File

@ -292,7 +292,7 @@ test macros are compiled out.
FUNCTION_TEST_BEGIN(); \
FUNCTION_TEST_END();
#define FUNCTION_TEST_RETURN(typeMacroPrefix, result) \
#define FUNCTION_TEST_RETURN(result) \
do \
{ \
if (stackTraceTest()) \
@ -315,7 +315,7 @@ test macros are compiled out.
#define FUNCTION_TEST_PARAM_PTR(typeName, param)
#define FUNCTION_TEST_END()
#define FUNCTION_TEST_VOID()
#define FUNCTION_TEST_RETURN(typeMacroPrefix, result) \
#define FUNCTION_TEST_RETURN(result) \
return result
#define FUNCTION_TEST_RETURN_VOID()
#endif

View File

@ -54,7 +54,7 @@ encodeToStrSize(EncodeType encodeType, size_t sourceSize)
else
ENCODE_TYPE_INVALID_ERROR(encodeType);
FUNCTION_TEST_RETURN(SIZE, destinationSize);
FUNCTION_TEST_RETURN(destinationSize);
}
/***********************************************************************************************************************************
@ -95,7 +95,7 @@ decodeToBinSize(EncodeType encodeType, const char *source)
else
ENCODE_TYPE_INVALID_ERROR(encodeType);
FUNCTION_TEST_RETURN(SIZE, destinationSize);
FUNCTION_TEST_RETURN(destinationSize);
}
/***********************************************************************************************************************************
@ -121,7 +121,7 @@ decodeToBinValid(EncodeType encodeType, const char *source)
}
TRY_END();
FUNCTION_TEST_RETURN(BOOL, valid);
FUNCTION_TEST_RETURN(valid);
}
/***********************************************************************************************************************************

View File

@ -88,7 +88,7 @@ encodeToStrSizeBase64(size_t sourceSize)
encodeGroupTotal++;
// Four characters are needed to encode each group
FUNCTION_TEST_RETURN(SIZE, encodeGroupTotal * 4);
FUNCTION_TEST_RETURN(encodeGroupTotal * 4);
}
/***********************************************************************************************************************************
@ -179,7 +179,7 @@ decodeToBinSizeBase64(const char *source)
destinationSize--;
}
FUNCTION_TEST_RETURN(SIZE, destinationSize);
FUNCTION_TEST_RETURN(destinationSize);
}
/***********************************************************************************************************************************

View File

@ -300,7 +300,7 @@ execIoRead(const Exec *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(IO_READ, this->ioReadExec);
FUNCTION_TEST_RETURN(this->ioReadExec);
}
/***********************************************************************************************************************************
@ -315,7 +315,7 @@ execIoWrite(const Exec *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(IO_WRITE, this->ioWriteExec);
FUNCTION_TEST_RETURN(this->ioWriteExec);
}
/***********************************************************************************************************************************
@ -330,7 +330,7 @@ execMemContext(const Exec *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(MEM_CONTEXT, this->memContext);
FUNCTION_TEST_RETURN(this->memContext);
}
/***********************************************************************************************************************************

View File

@ -53,7 +53,7 @@ exitSignalName(int signalType)
THROW(AssertError, "no name for signal none");
}
FUNCTION_TEST_RETURN(STRINGZ, name);
FUNCTION_TEST_RETURN(name);
}
/***********************************************************************************************************************************

View File

@ -71,7 +71,7 @@ iniGetInternal(const Ini *this, const String *section, const String *key)
}
MEM_CONTEXT_TEMP_END();
FUNCTION_TEST_RETURN(VARIANT, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -97,7 +97,7 @@ iniGet(const Ini *this, const String *section, const String *key)
if (result == NULL)
THROW_FMT(FormatError, "section '%s', key '%s' does not exist", strPtr(section), strPtr(key));
FUNCTION_TEST_RETURN(VARIANT, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -124,7 +124,7 @@ iniGetDefault(const Ini *this, const String *section, const String *key, Variant
if (result == NULL)
result = defaultValue;
FUNCTION_TEST_RETURN(VARIANT, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -159,7 +159,7 @@ iniSectionKeyList(const Ini *this, const String *section)
}
MEM_CONTEXT_TEMP_END();
FUNCTION_TEST_RETURN(STRING_LIST, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -185,7 +185,7 @@ iniSectionList(const Ini *this)
}
MEM_CONTEXT_TEMP_END();
FUNCTION_TEST_RETURN(STRING_LIST, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************

View File

@ -97,7 +97,7 @@ ioBufferReadMove(IoBufferRead *this, MemContext *parentNew)
if (this != NULL)
memContextMove(this->memContext, parentNew);
FUNCTION_TEST_RETURN(IO_BUFFER_READ, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -127,7 +127,7 @@ ioBufferReadIo(const IoBufferRead *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(IO_READ, this->io);
FUNCTION_TEST_RETURN(this->io);
}
/***********************************************************************************************************************************

View File

@ -78,7 +78,7 @@ ioBufferWriteMove(IoBufferWrite *this, MemContext *parentNew)
if (this != NULL)
memContextMove(this->memContext, parentNew);
FUNCTION_TEST_RETURN(IO_BUFFER_WRITE, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -93,7 +93,7 @@ ioBufferWriteIo(const IoBufferWrite *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(IO_WRITE, this->io);
FUNCTION_TEST_RETURN(this->io);
}
/***********************************************************************************************************************************

View File

@ -108,7 +108,7 @@ ioBufferInputSame(const IoBuffer *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(BOOL, this->inputSame);
FUNCTION_TEST_RETURN(this->inputSame);
}
/***********************************************************************************************************************************
@ -123,7 +123,7 @@ ioBufferFilter(const IoBuffer *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(IO_FILTER, this->filter);
FUNCTION_TEST_RETURN(this->filter);
}
/***********************************************************************************************************************************

View File

@ -107,7 +107,7 @@ ioFilterMove(IoFilter *this, MemContext *parentNew)
if (this != NULL)
memContextMove(this->memContext, parentNew);
FUNCTION_TEST_RETURN(IO_FILTER, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -124,7 +124,7 @@ ioFilterDone(const IoFilter *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(BOOL, this->interface.done != NULL ? this->interface.done(this->driver) : !ioFilterInputSame(this));
FUNCTION_TEST_RETURN(this->interface.done != NULL ? this->interface.done(this->driver) : !ioFilterInputSame(this));
}
/***********************************************************************************************************************************
@ -141,7 +141,7 @@ ioFilterInputSame(const IoFilter *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(BOOL, this->interface.inputSame != NULL ? this->interface.inputSame(this->driver) : false);
FUNCTION_TEST_RETURN(this->interface.inputSame != NULL ? this->interface.inputSame(this->driver) : false);
}
/***********************************************************************************************************************************
@ -158,7 +158,7 @@ ioFilterOutput(const IoFilter *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(BOOL, this->interface.inOut != NULL);
FUNCTION_TEST_RETURN(this->interface.inOut != NULL);
}
/***********************************************************************************************************************************
@ -173,7 +173,7 @@ ioFilterResult(const IoFilter *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(VARIANT, this->interface.result ? this->interface.result(this->driver) : NULL);
FUNCTION_TEST_RETURN(this->interface.result ? this->interface.result(this->driver) : NULL);
}
/***********************************************************************************************************************************
@ -190,5 +190,5 @@ ioFilterType(const IoFilter *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(STRING, this->type);
FUNCTION_TEST_RETURN(this->type);
}

View File

@ -110,7 +110,7 @@ ioFilterGroupGet(IoFilterGroup *this, unsigned int filterIdx)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(IO_FILTER_DATA, (IoFilterData *)lstGet(this->filterList, filterIdx));
FUNCTION_TEST_RETURN((IoFilterData *)lstGet(this->filterList, filterIdx));
}
/***********************************************************************************************************************************
@ -368,7 +368,7 @@ ioFilterGroupDone(const IoFilterGroup *this)
ASSERT(this != NULL);
ASSERT(this->opened && !this->closed);
FUNCTION_TEST_RETURN(BOOL, this->done);
FUNCTION_TEST_RETURN(this->done);
}
/***********************************************************************************************************************************
@ -386,7 +386,7 @@ ioFilterGroupInputSame(const IoFilterGroup *this)
ASSERT(this != NULL);
ASSERT(this->opened && !this->closed);
FUNCTION_TEST_RETURN(BOOL, this->inputSame);
FUNCTION_TEST_RETURN(this->inputSame);
}
/***********************************************************************************************************************************

View File

@ -82,7 +82,7 @@ ioSizeFilter(const IoSize *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(IO_FILTER, this->filter);
FUNCTION_TEST_RETURN(this->filter);
}
/***********************************************************************************************************************************

View File

@ -127,7 +127,7 @@ ioHandleReadMove(IoHandleRead *this, MemContext *parentNew)
if (this != NULL)
memContextMove(this->memContext, parentNew);
FUNCTION_TEST_RETURN(IO_HANDLE_READ, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -157,7 +157,7 @@ ioHandleReadIo(const IoHandleRead *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(IO_READ, this->io);
FUNCTION_TEST_RETURN(this->io);
}
/***********************************************************************************************************************************

View File

@ -81,7 +81,7 @@ ioHandleWriteMove(IoHandleWrite *this, MemContext *parentNew)
if (this != NULL)
memContextMove(this->memContext, parentNew);
FUNCTION_TEST_RETURN(IO_HANDLE_WRITE, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -96,7 +96,7 @@ ioHandleWriteIo(const IoHandleWrite *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(IO_WRITE, this->io);
FUNCTION_TEST_RETURN(this->io);
}
/***********************************************************************************************************************************

View File

@ -432,7 +432,7 @@ httpClientIoRead(const HttpClient *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(IO_READ, this->ioRead);
FUNCTION_TEST_RETURN(this->ioRead);
}
/***********************************************************************************************************************************
@ -447,7 +447,7 @@ httpClientResponseCode(const HttpClient *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(UINT, this->responseCode);
FUNCTION_TEST_RETURN(this->responseCode);
}
/***********************************************************************************************************************************
@ -462,7 +462,7 @@ httpClientReponseHeader(const HttpClient *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(HTTP_HEADER, this->responseHeader);
FUNCTION_TEST_RETURN(this->responseHeader);
}
/***********************************************************************************************************************************
@ -477,7 +477,7 @@ httpClientResponseMessage(const HttpClient *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(STRING, this->responseMessage);
FUNCTION_TEST_RETURN(this->responseMessage);
}
/***********************************************************************************************************************************

View File

@ -41,5 +41,5 @@ httpUriEncode(const String *uri, bool path)
}
}
FUNCTION_TEST_RETURN(STRING, result);
FUNCTION_TEST_RETURN(result);
}

View File

@ -37,7 +37,7 @@ httpHeaderNew(const StringList *redactList)
}
MEM_CONTEXT_NEW_END();
FUNCTION_TEST_RETURN(HTTP_HEADER, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -69,7 +69,7 @@ httpHeaderAdd(HttpHeader *this, const String *key, const String *value)
}
MEM_CONTEXT_END();
FUNCTION_TEST_RETURN(HTTP_HEADER, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -94,7 +94,7 @@ httpHeaderGet(const HttpHeader *this, const String *key)
}
MEM_CONTEXT_END();
FUNCTION_TEST_RETURN(STRING, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -109,7 +109,7 @@ httpHeaderList(const HttpHeader *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(STRING_LIST, strLstSort(strLstNewVarLst(kvKeyList(this->kv)), sortOrderAsc));
FUNCTION_TEST_RETURN(strLstSort(strLstNewVarLst(kvKeyList(this->kv)), sortOrderAsc));
}
/***********************************************************************************************************************************
@ -128,7 +128,7 @@ httpHeaderMove(HttpHeader *this, MemContext *parentNew)
if (this != NULL)
memContextMove(this->memContext, parentNew);
FUNCTION_TEST_RETURN(HTTP_HEADER, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -154,7 +154,7 @@ httpHeaderPut(HttpHeader *this, const String *key, const String *value)
}
MEM_CONTEXT_END();
FUNCTION_TEST_RETURN(HTTP_HEADER, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -171,7 +171,7 @@ httpHeaderRedact(const HttpHeader *this, const String *key)
ASSERT(this != NULL);
ASSERT(key != NULL);
FUNCTION_TEST_RETURN(BOOL, this->redactList != NULL && strLstExists(this->redactList, key));
FUNCTION_TEST_RETURN(this->redactList != NULL && strLstExists(this->redactList, key));
}
/***********************************************************************************************************************************

View File

@ -35,7 +35,7 @@ httpQueryNew(void)
}
MEM_CONTEXT_NEW_END();
FUNCTION_TEST_RETURN(HTTP_QUERY, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -67,7 +67,7 @@ httpQueryAdd(HttpQuery *this, const String *key, const String *value)
}
MEM_CONTEXT_END();
FUNCTION_TEST_RETURN(HTTP_QUERY, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -92,7 +92,7 @@ httpQueryGet(const HttpQuery *this, const String *key)
}
MEM_CONTEXT_END();
FUNCTION_TEST_RETURN(STRING, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -107,7 +107,7 @@ httpQueryList(const HttpQuery *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(STRING_LIST, strLstSort(strLstNewVarLst(kvKeyList(this->kv)), sortOrderAsc));
FUNCTION_TEST_RETURN(strLstSort(strLstNewVarLst(kvKeyList(this->kv)), sortOrderAsc));
}
/***********************************************************************************************************************************
@ -126,7 +126,7 @@ httpQueryMove(HttpQuery *this, MemContext *parentNew)
if (this != NULL)
memContextMove(this->memContext, parentNew);
FUNCTION_TEST_RETURN(HTTP_QUERY, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -152,7 +152,7 @@ httpQueryPut(HttpQuery *this, const String *key, const String *value)
}
MEM_CONTEXT_END();
FUNCTION_TEST_RETURN(HTTP_QUERY, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -191,7 +191,7 @@ httpQueryRender(const HttpQuery *this)
}
}
FUNCTION_TEST_RETURN(STRING, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************

View File

@ -23,7 +23,7 @@ size_t
ioBufferSize(void)
{
FUNCTION_TEST_VOID();
FUNCTION_TEST_RETURN(SIZE, bufferSize);
FUNCTION_TEST_RETURN(bufferSize);
}
void
@ -70,5 +70,5 @@ ioReadBuf(IoRead *read)
}
MEM_CONTEXT_TEMP_END();
FUNCTION_TEST_RETURN(BUFFER, result);
FUNCTION_TEST_RETURN(result);
}

View File

@ -336,7 +336,7 @@ ioReadFilterGroup(const IoRead *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(IO_FILTER_GROUP, this->filterGroup);
FUNCTION_TEST_RETURN(this->filterGroup);
}
void

View File

@ -131,7 +131,7 @@ asn1ToStr(ASN1_STRING *nameAsn1)
THROW(CryptoError, "TLS certificate name entry is missing");
FUNCTION_TEST_RETURN(
STRING, strNewN(
strNewN(
#if OPENSSL_VERSION_NUMBER < 0x10100000L
(const char *)ASN1_STRING_data(nameAsn1),
#else
@ -565,7 +565,7 @@ tlsClientIoRead(const TlsClient *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(IO_READ, this->read);
FUNCTION_TEST_RETURN(this->read);
}
/***********************************************************************************************************************************
@ -580,7 +580,7 @@ tlsClientIoWrite(const TlsClient *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(IO_WRITE, this->write);
FUNCTION_TEST_RETURN(this->write);
}
/***********************************************************************************************************************************

View File

@ -229,7 +229,7 @@ ioWriteFilterGroup(const IoWrite *this)
ASSERT(this != NULL);
ASSERT(this->opened && this->closed);
FUNCTION_TEST_RETURN(IO_FILTER_GROUP, this->filterGroup);
FUNCTION_TEST_RETURN(this->filterGroup);
}
void

View File

@ -83,7 +83,7 @@ logLevelEnum(const char *logLevel)
if (result == LOG_LEVEL_TOTAL)
THROW_FMT(AssertError, "log level '%s' not found", logLevel);
FUNCTION_TEST_RETURN(ENUM, result);
FUNCTION_TEST_RETURN(result);
}
const char *
@ -95,7 +95,7 @@ logLevelStr(LogLevel logLevel)
ASSERT(logLevel <= LOG_LEVEL_MAX);
FUNCTION_TEST_RETURN(STRINGZ, logLevelList[logLevel]);
FUNCTION_TEST_RETURN(logLevelList[logLevel]);
}
/***********************************************************************************************************************************
@ -163,7 +163,7 @@ logFileSet(const char *logFile)
logFileBanner = false;
}
FUNCTION_TEST_RETURN(BOOL, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -180,7 +180,7 @@ logWillFile(LogLevel logLevel)
ASSERT_LOG_LEVEL(logLevel);
FUNCTION_TEST_RETURN(ENUM, logLevel <= logLevelFile && logHandleFile != -1);
FUNCTION_TEST_RETURN(logLevel <= logLevelFile && logHandleFile != -1);
}
static bool
@ -192,7 +192,7 @@ logWillStdErr(LogLevel logLevel)
ASSERT_LOG_LEVEL(logLevel);
FUNCTION_TEST_RETURN(ENUM, logLevel <= logLevelStdErr);
FUNCTION_TEST_RETURN(logLevel <= logLevelStdErr);
}
static bool
@ -204,7 +204,7 @@ logWillStdOut(LogLevel logLevel)
ASSERT_LOG_LEVEL(logLevel);
FUNCTION_TEST_RETURN(ENUM, logLevel <= logLevelStdOut);
FUNCTION_TEST_RETURN(logLevel <= logLevelStdOut);
}
bool
@ -216,7 +216,7 @@ logWill(LogLevel logLevel)
ASSERT_LOG_LEVEL(logLevel);
FUNCTION_TEST_RETURN(BOOL, logWillStdOut(logLevel) || logWillStdErr(logLevel) || logWillFile(logLevel));
FUNCTION_TEST_RETURN(logWillStdOut(logLevel) || logWillStdErr(logLevel) || logWillFile(logLevel));
}
/***********************************************************************************************************************************
@ -236,7 +236,7 @@ logRange(LogLevel logLevel, LogLevel logRangeMin, LogLevel logRangeMax)
ASSERT_LOG_LEVEL(logRangeMax);
ASSERT(logRangeMin <= logRangeMax);
FUNCTION_TEST_RETURN(BOOL, logLevel >= logRangeMin && logLevel <= logRangeMax);
FUNCTION_TEST_RETURN(logLevel >= logRangeMin && logLevel <= logRangeMax);
}
/***********************************************************************************************************************************

View File

@ -81,7 +81,7 @@ memAllocInternal(size_t size, bool zero)
memset(buffer, 0, size);
// Return the buffer
FUNCTION_TEST_RETURN(VOIDP, buffer);
FUNCTION_TEST_RETURN(buffer);
}
/***********************************************************************************************************************************
@ -111,7 +111,7 @@ memReAllocInternal(void *bufferOld, size_t sizeOld, size_t sizeNew, bool zeroNew
memset((unsigned char *)bufferNew + sizeOld, 0, sizeNew - sizeOld);
// Return the buffer
FUNCTION_TEST_RETURN(VOIDP, bufferNew);
FUNCTION_TEST_RETURN(bufferNew);
}
/***********************************************************************************************************************************
@ -184,7 +184,7 @@ memContextNewIndex(MemContext *memContext, bool allowFree)
}
}
FUNCTION_TEST_RETURN(UINT, contextIdx);
FUNCTION_TEST_RETURN(contextIdx);
}
/***********************************************************************************************************************************
@ -227,7 +227,7 @@ memContextNew(const char *name)
this->contextParent = memContextCurrent();
// Return context
FUNCTION_TEST_RETURN(MEM_CONTEXT, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -342,7 +342,7 @@ memContextAlloc(size_t size, bool zero)
memContextCurrent()->allocList[allocIdx].buffer = memAllocInternal(size, zero);
// Return buffer
FUNCTION_TEST_RETURN(VOIDP, memContextCurrent()->allocList[allocIdx].buffer);
FUNCTION_TEST_RETURN(memContextCurrent()->allocList[allocIdx].buffer);
}
/***********************************************************************************************************************************
@ -368,7 +368,7 @@ memFind(const void *buffer)
if (allocIdx == memContextCurrent()->allocListSize)
THROW(AssertError, "unable to find allocation");
FUNCTION_TEST_RETURN(UINT, allocIdx);
FUNCTION_TEST_RETURN(allocIdx);
}
/***********************************************************************************************************************************
@ -381,7 +381,7 @@ memNew(size_t size)
FUNCTION_TEST_PARAM(SIZE, size);
FUNCTION_TEST_END();
FUNCTION_TEST_RETURN(VOIDP, memContextAlloc(size, true));
FUNCTION_TEST_RETURN(memContextAlloc(size, true));
}
/***********************************************************************************************************************************
@ -404,7 +404,7 @@ memGrowRaw(const void *buffer, size_t size)
alloc->buffer = memReAllocInternal(alloc->buffer, alloc->size, size, false);
alloc->size = (unsigned int)size;
FUNCTION_TEST_RETURN(VOIDP, alloc->buffer);
FUNCTION_TEST_RETURN(alloc->buffer);
}
/***********************************************************************************************************************************
@ -417,7 +417,7 @@ memNewRaw(size_t size)
FUNCTION_TEST_PARAM(SIZE, size);
FUNCTION_TEST_END();
FUNCTION_TEST_RETURN(VOIDP, memContextAlloc(size, false));
FUNCTION_TEST_RETURN(memContextAlloc(size, false));
}
/***********************************************************************************************************************************
@ -509,7 +509,7 @@ memContextSwitch(MemContext *this)
MemContext *memContextOld = memContextCurrent();
contextCurrent = this;
FUNCTION_TEST_RETURN(MEM_CONTEXT, memContextOld);
FUNCTION_TEST_RETURN(memContextOld);
}
/***********************************************************************************************************************************
@ -519,7 +519,7 @@ MemContext *
memContextTop(void)
{
FUNCTION_TEST_VOID();
FUNCTION_TEST_RETURN(MEM_CONTEXT, &contextTop);
FUNCTION_TEST_RETURN(&contextTop);
}
/***********************************************************************************************************************************
@ -529,7 +529,7 @@ MemContext *
memContextCurrent(void)
{
FUNCTION_TEST_VOID();
FUNCTION_TEST_RETURN(MEM_CONTEXT, contextCurrent);
FUNCTION_TEST_RETURN(contextCurrent);
}
/***********************************************************************************************************************************
@ -548,7 +548,7 @@ memContextName(MemContext *this)
if (this->state != memContextStateActive)
THROW(AssertError, "cannot get name for inactive context");
FUNCTION_TEST_RETURN(STRINGZ, this->name);
FUNCTION_TEST_RETURN(this->name);
}
/***********************************************************************************************************************************

View File

@ -67,7 +67,7 @@ regExpNew(const String *expression)
}
MEM_CONTEXT_NEW_END();
FUNCTION_TEST_RETURN(REGEXP, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -91,7 +91,7 @@ regExpMatch(RegExp *this, const String *string)
if (result != 0 && result != REG_NOMATCH) // {uncoverable - no error condition known}
regExpError(result); // {+uncoverable}
FUNCTION_TEST_RETURN(BOOL, result == 0);
FUNCTION_TEST_RETURN(result == 0);
}
/***********************************************************************************************************************************
@ -142,7 +142,7 @@ regExpMatchOne(const String *expression, const String *string)
}
TRY_END();
FUNCTION_TEST_RETURN(BOOL, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -183,5 +183,5 @@ regExpPrefix(const String *expression)
result = strSubN(expression, 1, expressionIdx - 1);
}
FUNCTION_TEST_RETURN(STRING, result);
FUNCTION_TEST_RETURN(result);
}

View File

@ -23,7 +23,7 @@ timeMSec(void)
struct timeval currentTime;
gettimeofday(&currentTime, NULL);
FUNCTION_TEST_RETURN(UINT64, ((TimeMSec)currentTime.tv_sec * MSEC_PER_SEC) + (TimeMSec)currentTime.tv_usec / MSEC_PER_USEC);
FUNCTION_TEST_RETURN(((TimeMSec)currentTime.tv_sec * MSEC_PER_SEC) + (TimeMSec)currentTime.tv_usec / MSEC_PER_USEC);
}
/***********************************************************************************************************************************

View File

@ -46,7 +46,7 @@ bufNew(size_t size)
}
MEM_CONTEXT_NEW_END();
FUNCTION_TEST_RETURN(BUFFER, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -67,7 +67,7 @@ bufNewC(size_t size, const void *buffer)
memcpy(this->buffer, buffer, this->size);
this->used = this->size;
FUNCTION_TEST_RETURN(BUFFER, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -87,7 +87,7 @@ bufNewStr(const String *string)
memcpy(this->buffer, strPtr(string), bufSize(this));
this->used = bufSize(this);
FUNCTION_TEST_RETURN(BUFFER, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -107,7 +107,7 @@ bufNewZ(const char *string)
memcpy(this->buffer, string, bufSize(this));
this->used = bufSize(this);
FUNCTION_TEST_RETURN(BUFFER, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -126,7 +126,7 @@ bufCat(Buffer *this, const Buffer *cat)
if (cat != NULL)
bufCatC(this, cat->buffer, 0, cat->used);
FUNCTION_TEST_RETURN(BUFFER, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -157,7 +157,7 @@ bufCatC(Buffer *this, const unsigned char *cat, size_t catOffset, size_t catSize
this->used += catSize;
}
FUNCTION_TEST_RETURN(BUFFER, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -183,7 +183,7 @@ bufCatSub(Buffer *this, const Buffer *cat, size_t catOffset, size_t catSize)
bufCatC(this, cat->buffer, catOffset, catSize);
}
FUNCTION_TEST_RETURN(BUFFER, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -205,7 +205,7 @@ bufEq(const Buffer *this, const Buffer *compare)
if (this->used == compare->used)
result = memcmp(this->buffer, compare->buffer, compare->used) == 0;
FUNCTION_TEST_RETURN(BOOL, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -225,7 +225,7 @@ bufHex(const Buffer *this)
for (unsigned int bufferIdx = 0; bufferIdx < bufSize(this); bufferIdx++)
strCatFmt(result, "%02x", this->buffer[bufferIdx]);
FUNCTION_TEST_RETURN(STRING, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -244,7 +244,7 @@ bufMove(Buffer *this, MemContext *parentNew)
if (this != NULL)
memContextMove(this->memContext, parentNew);
FUNCTION_TEST_RETURN(BUFFER, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -300,7 +300,7 @@ bufResize(Buffer *this, size_t size)
this->limit = this->size;
}
FUNCTION_TEST_RETURN(BUFFER, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -315,7 +315,7 @@ bufFull(const Buffer *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(BOOL, this->used == bufSize(this));
FUNCTION_TEST_RETURN(this->used == bufSize(this));
}
/***********************************************************************************************************************************
@ -364,7 +364,7 @@ bufPtr(const Buffer *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(UCHARP, this->buffer);
FUNCTION_TEST_RETURN(this->buffer);
}
/***********************************************************************************************************************************
@ -379,7 +379,7 @@ bufRemains(const Buffer *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(SIZE, bufSize(this) - this->used);
FUNCTION_TEST_RETURN(bufSize(this) - this->used);
}
/***********************************************************************************************************************************
@ -394,7 +394,7 @@ bufRemainsPtr(const Buffer *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(UCHARP, this->buffer + this->used);
FUNCTION_TEST_RETURN(this->buffer + this->used);
}
/***********************************************************************************************************************************
@ -409,7 +409,7 @@ bufSize(const Buffer *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(SIZE, this->limitSet ? this->limit : this->size);
FUNCTION_TEST_RETURN(this->limitSet ? this->limit : this->size);
}
/***********************************************************************************************************************************
@ -427,7 +427,7 @@ bufUsed(const Buffer *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(SIZE, this->used);
FUNCTION_TEST_RETURN(this->used);
}
void

View File

@ -59,7 +59,7 @@ cvtZToInt64Internal(const char *value, const char *type, int base)
// Validate the result
cvtZToIntValid(errno, base, value, endPtr, type);
FUNCTION_TEST_RETURN(INT64, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -84,7 +84,7 @@ cvtZToUInt64Internal(const char *value, const char *type, int base)
// Validate the result
cvtZToIntValid(errno, base, value, endPtr, type);
FUNCTION_TEST_RETURN(UINT64, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -106,7 +106,7 @@ cvtBoolToZ(bool value, char *buffer, size_t bufferSize)
if (result >= bufferSize)
THROW(AssertError, "buffer overflow");
FUNCTION_TEST_RETURN(SIZE, result);
FUNCTION_TEST_RETURN(result);
}
// Since booleans only have two possible values we can return a const with the value. This is useful when a boolean needs to be
@ -136,7 +136,7 @@ cvtCharToZ(char value, char *buffer, size_t bufferSize)
if (result >= bufferSize)
THROW(AssertError, "buffer overflow");
FUNCTION_TEST_RETURN(SIZE, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -182,7 +182,7 @@ cvtDoubleToZ(double value, char *buffer, size_t bufferSize)
end[1] = 0;
// Return string length
FUNCTION_TEST_RETURN(SIZE, (size_t)(end - buffer + 1));
FUNCTION_TEST_RETURN((size_t)(end - buffer + 1));
}
double
@ -200,7 +200,7 @@ cvtZToDouble(const char *value)
if (result == 0 && strcmp(value, "0") != 0)
THROW_FMT(FormatError, "unable to convert string '%s' to double", value);
FUNCTION_TEST_RETURN(DOUBLE, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -222,7 +222,7 @@ cvtIntToZ(int value, char *buffer, size_t bufferSize)
if (result >= bufferSize)
THROW(AssertError, "buffer overflow");
FUNCTION_TEST_RETURN(SIZE, result);
FUNCTION_TEST_RETURN(result);
}
int
@ -239,7 +239,7 @@ cvtZToIntBase(const char *value, int base)
if (result > INT_MAX || result < INT_MIN)
THROW_FMT(FormatError, "unable to convert base %d string '%s' to int", base, value);
FUNCTION_TEST_RETURN(INT, (int)result);
FUNCTION_TEST_RETURN((int)result);
}
int
@ -251,7 +251,7 @@ cvtZToInt(const char *value)
ASSERT(value != NULL);
FUNCTION_TEST_RETURN(INT, cvtZToIntBase(value, 10));
FUNCTION_TEST_RETURN(cvtZToIntBase(value, 10));
}
/***********************************************************************************************************************************
@ -273,7 +273,7 @@ cvtInt64ToZ(int64_t value, char *buffer, size_t bufferSize)
if (result >= bufferSize)
THROW(AssertError, "buffer overflow");
FUNCTION_TEST_RETURN(SIZE, result);
FUNCTION_TEST_RETURN(result);
}
int64_t
@ -285,7 +285,7 @@ cvtZToInt64Base(const char *value, int base)
ASSERT(value != NULL);
FUNCTION_TEST_RETURN(INT64, cvtZToInt64Internal(value, "int64", base));
FUNCTION_TEST_RETURN(cvtZToInt64Internal(value, "int64", base));
}
int64_t
@ -297,7 +297,7 @@ cvtZToInt64(const char *value)
ASSERT(value != NULL);
FUNCTION_TEST_RETURN(INT64, cvtZToInt64Base(value, 10));
FUNCTION_TEST_RETURN(cvtZToInt64Base(value, 10));
}
/***********************************************************************************************************************************
@ -319,7 +319,7 @@ cvtModeToZ(mode_t value, char *buffer, size_t bufferSize)
if (result >= bufferSize)
THROW(AssertError, "buffer overflow");
FUNCTION_TEST_RETURN(SIZE, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -341,7 +341,7 @@ cvtSizeToZ(size_t value, char *buffer, size_t bufferSize)
if (result >= bufferSize)
THROW(AssertError, "buffer overflow");
FUNCTION_TEST_RETURN(SIZE, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -363,7 +363,7 @@ cvtUIntToZ(unsigned int value, char *buffer, size_t bufferSize)
if (result >= bufferSize)
THROW(AssertError, "buffer overflow");
FUNCTION_TEST_RETURN(SIZE, result);
FUNCTION_TEST_RETURN(result);
}
unsigned int
@ -381,7 +381,7 @@ cvtZToUIntBase(const char *value, int base)
if (*value == '-' || result > UINT_MAX)
THROW_FMT(FormatError, "unable to convert base %d string '%s' to unsigned int", base, value);
FUNCTION_TEST_RETURN(UINT, (unsigned int)result);
FUNCTION_TEST_RETURN((unsigned int)result);
}
unsigned int
@ -393,7 +393,7 @@ cvtZToUInt(const char *value)
ASSERT(value != NULL);
FUNCTION_TEST_RETURN(UINT, cvtZToUIntBase(value, 10));
FUNCTION_TEST_RETURN(cvtZToUIntBase(value, 10));
}
/***********************************************************************************************************************************
@ -415,7 +415,7 @@ cvtUInt64ToZ(uint64_t value, char *buffer, size_t bufferSize)
if (result >= bufferSize)
THROW(AssertError, "buffer overflow");
FUNCTION_TEST_RETURN(SIZE, result);
FUNCTION_TEST_RETURN(result);
}
uint64_t
@ -433,7 +433,7 @@ cvtZToUInt64Base(const char *value, int base)
if (*value == '-')
THROW_FMT(FormatError, "unable to convert base %d string '%s' to uint64", base, value);
FUNCTION_TEST_RETURN(UINT64, result);
FUNCTION_TEST_RETURN(result);
}
uint64_t
@ -445,5 +445,5 @@ cvtZToUInt64(const char *value)
ASSERT(value != NULL);
FUNCTION_TEST_RETURN(UINT64, cvtZToUInt64Base(value, 10));
FUNCTION_TEST_RETURN(cvtZToUInt64Base(value, 10));
}

View File

@ -91,7 +91,7 @@ jsonString(const char *jsonC, unsigned int *jsonPos)
}
MEM_CONTEXT_TEMP_END();
FUNCTION_TEST_RETURN(VARIANT, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -125,7 +125,7 @@ jsonNumeric(const char *jsonC, size_t strSize, unsigned int *jsonPos, unsigned i
}
MEM_CONTEXT_TEMP_END();
FUNCTION_TEST_RETURN(VARIANT, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -498,7 +498,7 @@ kvToJsonInternal(const KeyValue *kv, String *indentSpace, String *indentDepth)
}
MEM_CONTEXT_TEMP_END();
FUNCTION_TEST_RETURN(STRING, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************

View File

@ -55,7 +55,7 @@ kvNew(void)
}
MEM_CONTEXT_NEW_END();
FUNCTION_TEST_RETURN(KEY_VALUE, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -88,7 +88,7 @@ kvDup(const KeyValue *source)
this->keyList = varLstDup(source->keyList);
FUNCTION_TEST_RETURN(KEY_VALUE, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -120,7 +120,7 @@ kvGetIdx(const KeyValue *this, const Variant *key)
}
}
FUNCTION_TEST_RETURN(UINT, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -135,7 +135,7 @@ kvKeyList(const KeyValue *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(VARIANT_LIST, this->keyList);
FUNCTION_TEST_RETURN(this->keyList);
}
/***********************************************************************************************************************************
@ -207,7 +207,7 @@ kvPut(KeyValue *this, const Variant *key, const Variant *value)
}
MEM_CONTEXT_END();
FUNCTION_TEST_RETURN(KEY_VALUE, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -255,7 +255,7 @@ kvAdd(KeyValue *this, const Variant *key, const Variant *value)
}
MEM_CONTEXT_END();
FUNCTION_TEST_RETURN(KEY_VALUE, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -286,7 +286,7 @@ kvPutKv(KeyValue *this, const Variant *key)
}
MEM_CONTEXT_END();
FUNCTION_TEST_RETURN(KEY_VALUE, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -311,7 +311,7 @@ kvGet(const KeyValue *this, const Variant *key)
if (listIdx != KEY_NOT_FOUND)
result = ((KeyValuePair *)lstGet(this->list, listIdx))->value;
FUNCTION_TEST_RETURN(VARIANT, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -339,7 +339,7 @@ kvGetList(const KeyValue *this, const Variant *key)
else
result = varLstAdd(varLstNew(), varDup(value));
FUNCTION_TEST_RETURN(VARIANT_LIST, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -358,7 +358,7 @@ kvMove(KeyValue *this, MemContext *parentNew)
if (this != NULL)
memContextMove(this->memContext, parentNew);
FUNCTION_TEST_RETURN(KEY_VALUE, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************

View File

@ -40,7 +40,7 @@ lstNew(size_t itemSize)
}
MEM_CONTEXT_NEW_END();
FUNCTION_TEST_RETURN(LIST, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -59,7 +59,7 @@ lstAdd(List *this, const void *item)
lstInsert(this, lstSize(this), item);
FUNCTION_TEST_RETURN(LIST, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -80,7 +80,7 @@ lstGet(const List *this, unsigned int listIdx)
THROW_FMT(AssertError, "cannot get index %u from list with %u value(s)", listIdx, this->listSize);
// Return pointer to list item
FUNCTION_TEST_RETURN(VOIDP, this->list + (listIdx * this->itemSize));
FUNCTION_TEST_RETURN(this->list + (listIdx * this->itemSize));
}
/***********************************************************************************************************************************
@ -131,7 +131,7 @@ lstInsert(List *this, unsigned int listIdx, const void *item)
memcpy(this->list + (listIdx * this->itemSize), item, this->itemSize);
this->listSize++;
FUNCTION_TEST_RETURN(LIST, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -146,7 +146,7 @@ lstMemContext(const List *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(MEM_CONTEXT, this->memContext);
FUNCTION_TEST_RETURN(this->memContext);
}
/***********************************************************************************************************************************
@ -165,7 +165,7 @@ lstMove(List *this, MemContext *parentNew)
if (this != NULL)
memContextMove(this->memContext, parentNew);
FUNCTION_TEST_RETURN(LIST, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -180,7 +180,7 @@ lstSize(const List *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(UINT, this->listSize);
FUNCTION_TEST_RETURN(this->listSize);
}
/***********************************************************************************************************************************
@ -199,7 +199,7 @@ lstSort(List *this, int (*comparator)(const void *, const void*))
qsort(this->list, this->listSize, this->itemSize, comparator);
FUNCTION_TEST_RETURN(LIST, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************

View File

@ -73,7 +73,7 @@ strNew(const char *string)
this->common.buffer = memNewRaw(this->common.size + 1);
strcpy(this->common.buffer, string);
FUNCTION_TEST_RETURN(STRING, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -104,7 +104,7 @@ strNewBuf(const Buffer *buffer)
memcpy(this->common.buffer, (char *)bufPtr(buffer), this->common.size);
this->common.buffer[this->common.size] = 0;
FUNCTION_TEST_RETURN(STRING, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -139,7 +139,7 @@ strNewFmt(const char *format, ...)
vsnprintf(this->common.buffer, this->common.size + 1, format, argumentList);
va_end(argumentList);
FUNCTION_TEST_RETURN(STRING, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -171,7 +171,7 @@ strNewN(const char *string, size_t size)
this->common.buffer[this->common.size] = 0;
// Return buffer
FUNCTION_TEST_RETURN(STRING, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -191,7 +191,7 @@ strBase(const String *this)
while (end > this->common.buffer && *(end - 1) != '/')
end--;
FUNCTION_TEST_RETURN(STRING, strNew(end));
FUNCTION_TEST_RETURN(strNew(end));
}
/***********************************************************************************************************************************
@ -208,7 +208,7 @@ strBeginsWith(const String *this, const String *beginsWith)
ASSERT(this != NULL);
ASSERT(beginsWith != NULL);
FUNCTION_TEST_RETURN(BOOL, strBeginsWithZ(this, strPtr(beginsWith)));
FUNCTION_TEST_RETURN(strBeginsWithZ(this, strPtr(beginsWith)));
}
bool
@ -228,7 +228,7 @@ strBeginsWithZ(const String *this, const char *beginsWith)
if (this->common.size >= beginsWithSize)
result = strncmp(strPtr(this), beginsWith, beginsWithSize) == 0;
FUNCTION_TEST_RETURN(BOOL, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -285,7 +285,7 @@ strCat(String *this, const char *cat)
this->common.size += (unsigned int)sizeGrow;
this->common.extra -= (unsigned int)sizeGrow;
FUNCTION_TEST_RETURN(STRING, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -310,7 +310,7 @@ strCatChr(String *this, char cat)
this->common.buffer[this->common.size] = 0;
this->common.extra--;
FUNCTION_TEST_RETURN(STRING, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -344,7 +344,7 @@ strCatFmt(String *this, const char *format, ...)
this->common.size += (unsigned int)sizeGrow;
this->common.extra -= (unsigned int)sizeGrow;
FUNCTION_TEST_RETURN(STRING, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -361,7 +361,7 @@ strCmp(const String *this, const String *compare)
ASSERT(this != NULL);
ASSERT(compare != NULL);
FUNCTION_TEST_RETURN(INT, strcmp(strPtr(this), strPtr(compare)));
FUNCTION_TEST_RETURN(strcmp(strPtr(this), strPtr(compare)));
}
int
@ -375,7 +375,7 @@ strCmpZ(const String *this, const char *compare)
ASSERT(this != NULL);
ASSERT(compare != NULL);
FUNCTION_TEST_RETURN(INT, strcmp(strPtr(this), compare));
FUNCTION_TEST_RETURN(strcmp(strPtr(this), compare));
}
/***********************************************************************************************************************************
@ -393,7 +393,7 @@ strDup(const String *this)
if (this != NULL)
result = strNew(strPtr(this));
FUNCTION_TEST_RETURN(STRING, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -406,7 +406,7 @@ strEmpty(const String *this)
FUNCTION_TEST_PARAM(STRING, this);
FUNCTION_TEST_END();
FUNCTION_TEST_RETURN(BOOL, strSize(this) == 0);
FUNCTION_TEST_RETURN(strSize(this) == 0);
}
/***********************************************************************************************************************************
@ -423,7 +423,7 @@ strEndsWith(const String *this, const String *endsWith)
ASSERT(this != NULL);
ASSERT(endsWith != NULL);
FUNCTION_TEST_RETURN(BOOL, strEndsWithZ(this, strPtr(endsWith)));
FUNCTION_TEST_RETURN(strEndsWithZ(this, strPtr(endsWith)));
}
bool
@ -443,7 +443,7 @@ strEndsWithZ(const String *this, const char *endsWith)
if (this->common.size >= endsWithSize)
result = strcmp(strPtr(this) + (this->common.size - endsWithSize), endsWith) == 0;
FUNCTION_TEST_RETURN(BOOL, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -468,7 +468,7 @@ strEq(const String *this, const String *compare)
if (this->common.size == compare->common.size)
result = strcmp(strPtr(this), strPtr(compare)) == 0;
FUNCTION_TEST_RETURN(BOOL, result);
FUNCTION_TEST_RETURN(result);
}
bool
@ -482,7 +482,7 @@ strEqZ(const String *this, const char *compare)
ASSERT(this != NULL);
ASSERT(compare != NULL);
FUNCTION_TEST_RETURN(BOOL, strcmp(strPtr(this), compare) == 0);
FUNCTION_TEST_RETURN(strcmp(strPtr(this), compare) == 0);
}
/***********************************************************************************************************************************
@ -500,7 +500,7 @@ strFirstUpper(String *this)
if (this->common.size > 0)
this->common.buffer[0] = (char)toupper(this->common.buffer[0]);
FUNCTION_TEST_RETURN(STRING, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -518,7 +518,7 @@ strFirstLower(String *this)
if (this->common.size > 0)
this->common.buffer[0] = (char)tolower(this->common.buffer[0]);
FUNCTION_TEST_RETURN(STRING, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -537,7 +537,7 @@ strUpper(String *this)
for (unsigned int idx = 0; idx <= this->common.size; idx++)
this->common.buffer[idx] = (char)toupper(this->common.buffer[idx]);
FUNCTION_TEST_RETURN(STRING, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -556,7 +556,7 @@ strLower(String *this)
for (unsigned int idx = 0; idx <= this->common.size; idx++)
this->common.buffer[idx] = (char)tolower(this->common.buffer[idx]);
FUNCTION_TEST_RETURN(STRING, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -577,7 +577,6 @@ strPath(const String *this)
end--;
FUNCTION_TEST_RETURN(
STRING,
strNewN(
this->common.buffer,
end - this->common.buffer <= 1 ? (size_t)(end - this->common.buffer) : (size_t)(end - this->common.buffer - 1)));
@ -598,7 +597,7 @@ strPtr(const String *this)
if (this != NULL)
result = this->common.buffer;
FUNCTION_TEST_RETURN(CHARP, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -615,7 +614,7 @@ strQuote(const String *this, const String *quote)
ASSERT(this != NULL);
ASSERT(quote != NULL);
FUNCTION_TEST_RETURN(STRING, strQuoteZ(this, strPtr(quote)));
FUNCTION_TEST_RETURN(strQuoteZ(this, strPtr(quote)));
}
String *
@ -629,7 +628,7 @@ strQuoteZ(const String *this, const char *quote)
ASSERT(this != NULL);
ASSERT(quote != NULL);
FUNCTION_TEST_RETURN(STRING, strNewFmt("%s%s%s", quote, strPtr(this), quote));
FUNCTION_TEST_RETURN(strNewFmt("%s%s%s", quote, strPtr(this), quote));
}
/***********************************************************************************************************************************
@ -652,7 +651,7 @@ strReplaceChr(String *this, char find, char replace)
this->common.buffer[stringIdx] = replace;
}
FUNCTION_TEST_RETURN(STRING, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -669,7 +668,7 @@ strSub(const String *this, size_t start)
ASSERT(this != NULL);
ASSERT(start < this->common.size);
FUNCTION_TEST_RETURN(STRING, strSubN(this, start, this->common.size - start));
FUNCTION_TEST_RETURN(strSubN(this, start, this->common.size - start));
}
/***********************************************************************************************************************************
@ -688,7 +687,7 @@ strSubN(const String *this, size_t start, size_t size)
ASSERT(start < this->common.size);
ASSERT(start + size <= this->common.size);
FUNCTION_TEST_RETURN(STRING, strNewN(this->common.buffer + start, size));
FUNCTION_TEST_RETURN(strNewN(this->common.buffer + start, size));
}
/***********************************************************************************************************************************
@ -703,7 +702,7 @@ strSize(const String *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(SIZE, this->common.size);
FUNCTION_TEST_RETURN(this->common.size);
}
/***********************************************************************************************************************************
@ -755,7 +754,7 @@ strTrim(String *this)
}
}
FUNCTION_TEST_RETURN(STRING, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -781,7 +780,7 @@ strChr(const String *this, char chr)
result = (int)(ptr - this->common.buffer);
}
FUNCTION_TEST_RETURN(INT, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -812,7 +811,7 @@ strTrunc(String *this, int idx)
MEM_CONTEXT_END();
}
FUNCTION_TEST_RETURN(STRING, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -884,7 +883,7 @@ strSizeFormat(const uint64_t size)
result = strNewFmt("%" PRIu64 "GB", size / (1024 * 1024 * 1024));
}
FUNCTION_TEST_RETURN(STRING, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************

View File

@ -18,7 +18,7 @@ StringList *
strLstNew(void)
{
FUNCTION_TEST_VOID();
FUNCTION_TEST_RETURN(STRING_LIST, (StringList *)lstNew(sizeof(String *)));
FUNCTION_TEST_RETURN((StringList *)lstNew(sizeof(String *)));
}
/***********************************************************************************************************************************
@ -34,7 +34,7 @@ strLstAddInternal(StringList *this, String *string)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(STRING_LIST, (StringList *)lstAdd((List *)this, &string));
FUNCTION_TEST_RETURN((StringList *)lstAdd((List *)this, &string));
}
/***********************************************************************************************************************************
@ -51,7 +51,7 @@ strLstInsertInternal(StringList *this, unsigned int listIdx, String *string)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(STRING_LIST, (StringList *)lstInsert((List *)this, listIdx, &string));
FUNCTION_TEST_RETURN((StringList *)lstInsert((List *)this, listIdx, &string));
}
/***********************************************************************************************************************************
@ -68,7 +68,7 @@ strLstNewSplit(const String *string, const String *delimiter)
ASSERT(string != NULL);
ASSERT(delimiter != NULL);
FUNCTION_TEST_RETURN(STRING_LIST, strLstNewSplitZ(string, strPtr(delimiter)));
FUNCTION_TEST_RETURN(strLstNewSplitZ(string, strPtr(delimiter)));
}
StringList *
@ -112,7 +112,7 @@ strLstNewSplitZ(const String *string, const char *delimiter)
}
MEM_CONTEXT_END();
FUNCTION_TEST_RETURN(STRING_LIST, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -133,7 +133,7 @@ strLstNewSplitSize(const String *string, const String *delimiter, size_t size)
ASSERT(string != NULL);
ASSERT(delimiter != NULL);
FUNCTION_TEST_RETURN(STRING_LIST, strLstNewSplitSizeZ(string, strPtr(delimiter), size));
FUNCTION_TEST_RETURN(strLstNewSplitSizeZ(string, strPtr(delimiter), size));
}
StringList *
@ -196,7 +196,7 @@ strLstNewSplitSizeZ(const String *string, const char *delimiter, size_t size)
}
MEM_CONTEXT_END();
FUNCTION_TEST_RETURN(STRING_LIST, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -222,7 +222,7 @@ strLstNewVarLst(const VariantList *sourceList)
}
MEM_CONTEXT_END();
FUNCTION_TEST_RETURN(STRING_LIST, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -248,7 +248,7 @@ strLstDup(const StringList *sourceList)
}
MEM_CONTEXT_END();
FUNCTION_TEST_RETURN(STRING_LIST, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -275,7 +275,7 @@ strLstExists(const StringList *this, const String *string)
}
}
FUNCTION_TEST_RETURN(BOOL, result);
FUNCTION_TEST_RETURN(result);
}
bool
@ -299,7 +299,7 @@ strLstExistsZ(const StringList *this, const char *cstring)
}
}
FUNCTION_TEST_RETURN(BOOL, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -323,7 +323,7 @@ strLstAdd(StringList *this, const String *string)
}
MEM_CONTEXT_END();
FUNCTION_TEST_RETURN(STRING_LIST, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -347,7 +347,7 @@ strLstAddZ(StringList *this, const char *string)
}
MEM_CONTEXT_END();
FUNCTION_TEST_RETURN(STRING_LIST, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -363,7 +363,7 @@ strLstGet(const StringList *this, unsigned int listIdx)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(STRING, *(String **)lstGet((List *)this, listIdx));
FUNCTION_TEST_RETURN(*(String **)lstGet((List *)this, listIdx));
}
@ -389,7 +389,7 @@ strLstInsert(StringList *this, unsigned int listIdx, const String *string)
}
MEM_CONTEXT_END();
FUNCTION_TEST_RETURN(STRING_LIST, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -414,7 +414,7 @@ strLstInsertZ(StringList *this, unsigned int listIdx, const char *string)
}
MEM_CONTEXT_END();
FUNCTION_TEST_RETURN(STRING_LIST, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -431,7 +431,7 @@ strLstJoin(const StringList *this, const char *separator)
ASSERT(this != NULL);
ASSERT(separator != NULL);
FUNCTION_TEST_RETURN(STRING, strLstJoinQuote(this, separator, ""));
FUNCTION_TEST_RETURN(strLstJoinQuote(this, separator, ""));
}
/***********************************************************************************************************************************
@ -463,7 +463,7 @@ strLstJoinQuote(const StringList *this, const char *separator, const char *quote
strCatFmt(join, "%s%s%s", quote, strPtr(strLstGet(this, listIdx)), quote);
}
FUNCTION_TEST_RETURN(STRING, join);
FUNCTION_TEST_RETURN(join);
}
/***********************************************************************************************************************************
@ -481,7 +481,7 @@ strLstMove(StringList *this, MemContext *parentNew)
lstMove((List *)this, parentNew);
FUNCTION_TEST_RETURN(STRING_LIST, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -509,7 +509,7 @@ strLstPtr(const StringList *this)
list[strLstSize(this)] = NULL;
FUNCTION_TEST_RETURN(CHARPP, list);
FUNCTION_TEST_RETURN(list);
}
/***********************************************************************************************************************************
@ -524,7 +524,7 @@ strLstSize(const StringList *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(UINT, lstSize((List *)this));
FUNCTION_TEST_RETURN(lstSize((List *)this));
}
/***********************************************************************************************************************************
@ -541,7 +541,7 @@ sortAscComparator(const void *item1, const void *item2)
ASSERT(item1 != NULL);
ASSERT(item2 != NULL);
FUNCTION_TEST_RETURN(INT, strCmp(*(String **)item1, *(String **)item2));
FUNCTION_TEST_RETURN(strCmp(*(String **)item1, *(String **)item2));
}
static int
@ -555,7 +555,7 @@ sortDescComparator(const void *item1, const void *item2)
ASSERT(item1 != NULL);
ASSERT(item2 != NULL);
FUNCTION_TEST_RETURN(INT, strCmp(*(String **)item2, *(String **)item1));
FUNCTION_TEST_RETURN(strCmp(*(String **)item2, *(String **)item1));
}
StringList *
@ -583,7 +583,7 @@ strLstSort(StringList *this, SortOrder sortOrder)
}
}
FUNCTION_TEST_RETURN(STRING_LIST, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************

View File

@ -61,7 +61,7 @@ varNewInternal(VariantType type, void *data, size_t dataSize)
// Copy data
memcpy((unsigned char *)this + sizeof(Variant), data, dataSize);
FUNCTION_TEST_RETURN(VARIANT, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -76,7 +76,7 @@ varData(const Variant *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(VOIDP, (void *)((unsigned char *)this + sizeof(Variant)));
FUNCTION_TEST_RETURN((void *)((unsigned char *)this + sizeof(Variant)));
}
/***********************************************************************************************************************************
@ -146,7 +146,7 @@ varDup(const Variant *this)
}
}
FUNCTION_TEST_RETURN(VARIANT, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -216,7 +216,7 @@ varEq(const Variant *this1, const Variant *this2)
else
result = this1 == NULL && this2 == NULL;
FUNCTION_TEST_RETURN(BOOL, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -231,7 +231,7 @@ varType(const Variant *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(ENUM, this->type);
FUNCTION_TEST_RETURN(this->type);
}
/***********************************************************************************************************************************
@ -244,7 +244,7 @@ varNewBool(bool data)
FUNCTION_TEST_PARAM(BOOL, data);
FUNCTION_TEST_END();
FUNCTION_TEST_RETURN(VARIANT, varNewInternal(varTypeBool, (void *)&data, sizeof(data)));
FUNCTION_TEST_RETURN(varNewInternal(varTypeBool, (void *)&data, sizeof(data)));
}
/***********************************************************************************************************************************
@ -261,7 +261,7 @@ varBool(const Variant *this)
ASSERT(this->type == varTypeBool);
FUNCTION_TEST_RETURN(BOOL, *((bool *)varData(this)));
FUNCTION_TEST_RETURN(*((bool *)varData(this)));
}
/***********************************************************************************************************************************
@ -327,7 +327,7 @@ varBoolForce(const Variant *this)
THROW_FMT(AssertError, "unable to force %s to %s", variantTypeName[this->type], variantTypeName[varTypeBool]);
}
FUNCTION_TEST_RETURN(BOOL, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -340,7 +340,7 @@ varNewDbl(double data)
FUNCTION_TEST_PARAM(DOUBLE, data);
FUNCTION_TEST_END();
FUNCTION_TEST_RETURN(VARIANT, varNewInternal(varTypeDouble, (unsigned char *)&data, sizeof(data)));
FUNCTION_TEST_RETURN(varNewInternal(varTypeDouble, (unsigned char *)&data, sizeof(data)));
}
/***********************************************************************************************************************************
@ -357,7 +357,7 @@ varDbl(const Variant *this)
ASSERT(this->type == varTypeDouble);
FUNCTION_TEST_RETURN(DOUBLE, *((double *)varData(this)));
FUNCTION_TEST_RETURN(*((double *)varData(this)));
}
/***********************************************************************************************************************************
@ -416,7 +416,7 @@ varDblForce(const Variant *this)
THROW_FMT(AssertError, "unable to force %s to %s", variantTypeName[this->type], variantTypeName[varTypeDouble]);
}
FUNCTION_TEST_RETURN(DOUBLE, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -429,7 +429,7 @@ varNewInt(int data)
FUNCTION_TEST_PARAM(INT, data);
FUNCTION_TEST_END();
FUNCTION_TEST_RETURN(VARIANT, varNewInternal(varTypeInt, (void *)&data, sizeof(data)));
FUNCTION_TEST_RETURN(varNewInternal(varTypeInt, (void *)&data, sizeof(data)));
}
/***********************************************************************************************************************************
@ -446,7 +446,7 @@ varInt(const Variant *this)
ASSERT(this->type == varTypeInt);
FUNCTION_TEST_RETURN(INT, *((int *)varData(this)));
FUNCTION_TEST_RETURN(*((int *)varData(this)));
}
/***********************************************************************************************************************************
@ -515,7 +515,7 @@ varIntForce(const Variant *this)
THROW_FMT(AssertError, "unable to force %s to %s", variantTypeName[this->type], variantTypeName[varTypeInt]);
}
FUNCTION_TEST_RETURN(INT, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -528,7 +528,7 @@ varNewInt64(int64_t data)
FUNCTION_TEST_PARAM(INT64, data);
FUNCTION_TEST_END();
FUNCTION_TEST_RETURN(VARIANT, varNewInternal(varTypeInt64, (void *)&data, sizeof(data)));
FUNCTION_TEST_RETURN(varNewInternal(varTypeInt64, (void *)&data, sizeof(data)));
}
/***********************************************************************************************************************************
@ -545,7 +545,7 @@ varInt64(const Variant *this)
ASSERT(this->type == varTypeInt64);
FUNCTION_TEST_RETURN(INT64, *((int64_t *)varData(this)));
FUNCTION_TEST_RETURN(*((int64_t *)varData(this)));
}
/***********************************************************************************************************************************
@ -609,7 +609,7 @@ varInt64Force(const Variant *this)
THROW_FMT(AssertError, "unable to force %s to %s", variantTypeName[this->type], variantTypeName[varTypeInt64]);
}
FUNCTION_TEST_RETURN(INT64, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -622,7 +622,7 @@ varNewUInt64(uint64_t data)
FUNCTION_TEST_PARAM(UINT64, data);
FUNCTION_TEST_END();
FUNCTION_TEST_RETURN(VARIANT, varNewInternal(varTypeUInt64, (void *)&data, sizeof(data)));
FUNCTION_TEST_RETURN(varNewInternal(varTypeUInt64, (void *)&data, sizeof(data)));
}
/***********************************************************************************************************************************
@ -639,7 +639,7 @@ varUInt64(const Variant *this)
ASSERT(this->type == varTypeUInt64);
FUNCTION_TEST_RETURN(UINT64, *((uint64_t *)varData(this)));
FUNCTION_TEST_RETURN(*((uint64_t *)varData(this)));
}
/***********************************************************************************************************************************
@ -714,7 +714,7 @@ varUInt64Force(const Variant *this)
THROW_FMT(AssertError, "unable to force %s to %s", variantTypeName[this->type], variantTypeName[varTypeUInt64]);
}
FUNCTION_TEST_RETURN(UINT64, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -728,7 +728,7 @@ varNewKv(void)
// Create a new kv for the variant
KeyValue *data = kvNew();
FUNCTION_TEST_RETURN(VARIANT, varNewInternal(varTypeKeyValue, (void *)&data, sizeof(data)));
FUNCTION_TEST_RETURN(varNewInternal(varTypeKeyValue, (void *)&data, sizeof(data)));
}
/***********************************************************************************************************************************
@ -749,7 +749,7 @@ varKv(const Variant *this)
result = *((KeyValue **)varData(this));
}
FUNCTION_TEST_RETURN(KEY_VALUE, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -765,7 +765,7 @@ varNewStr(const String *data)
// Create a copy of the string for the variant
String *dataCopy = strDup(data);
FUNCTION_TEST_RETURN(VARIANT, varNewInternal(varTypeString, (void *)&dataCopy, sizeof(dataCopy)));
FUNCTION_TEST_RETURN(varNewInternal(varTypeString, (void *)&dataCopy, sizeof(dataCopy)));
}
/***********************************************************************************************************************************
@ -784,7 +784,7 @@ varNewStrZ(const char *data)
if (data != NULL)
dataCopy = strNew(data);
FUNCTION_TEST_RETURN(VARIANT, varNewInternal(varTypeString, (void *)&dataCopy, sizeof(dataCopy)));
FUNCTION_TEST_RETURN(varNewInternal(varTypeString, (void *)&dataCopy, sizeof(dataCopy)));
}
/***********************************************************************************************************************************
@ -805,7 +805,7 @@ varStr(const Variant *this)
result = *((String **)varData(this));
}
FUNCTION_TEST_RETURN(STRING, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -879,7 +879,7 @@ varStrForce(const Variant *this)
THROW_FMT(FormatError, "unable to force %s to %s", variantTypeName[this->type], variantTypeName[varTypeString]);
}
FUNCTION_TEST_RETURN(STRING, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -897,7 +897,7 @@ varNewVarLst(const VariantList *data)
// Copy variant list for the variant
VariantList *dataCopy = varLstDup(data);
FUNCTION_TEST_RETURN(VARIANT, varNewInternal(varTypeVariantList, (void *)&dataCopy, sizeof(dataCopy)));
FUNCTION_TEST_RETURN(varNewInternal(varTypeVariantList, (void *)&dataCopy, sizeof(dataCopy)));
}
/***********************************************************************************************************************************
@ -918,7 +918,7 @@ varVarLst(const Variant *this)
result = *((VariantList **)varData(this));
}
FUNCTION_TEST_RETURN(VARIANT_LIST, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************

View File

@ -17,7 +17,7 @@ VariantList *
varLstNew(void)
{
FUNCTION_TEST_VOID();
FUNCTION_TEST_RETURN(VARIANT_LIST, (VariantList *)lstNew(sizeof(Variant *)));
FUNCTION_TEST_RETURN((VariantList *)lstNew(sizeof(Variant *)));
}
/***********************************************************************************************************************************
@ -40,7 +40,7 @@ varLstNewStrLst(const StringList *stringList)
varLstAdd(result, varNewStr(strLstGet(stringList, listIdx)));
}
FUNCTION_TEST_RETURN(VARIANT_LIST, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -63,7 +63,7 @@ varLstDup(const VariantList *source)
varLstAdd(result, varDup(varLstGet(source, listIdx)));
}
FUNCTION_TEST_RETURN(VARIANT_LIST, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -79,7 +79,7 @@ varLstAdd(VariantList *this, Variant *data)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(VARIANT_LIST, (VariantList *)lstAdd((List *)this, &data));
FUNCTION_TEST_RETURN((VariantList *)lstAdd((List *)this, &data));
}
/***********************************************************************************************************************************
@ -95,7 +95,7 @@ varLstGet(const VariantList *this, unsigned int listIdx)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(VARIANT, *(Variant **)lstGet((List *)this, listIdx));
FUNCTION_TEST_RETURN(*(Variant **)lstGet((List *)this, listIdx));
}
/***********************************************************************************************************************************
@ -110,7 +110,7 @@ varLstSize(const VariantList *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(UINT, lstSize((List *)this));
FUNCTION_TEST_RETURN(lstSize((List *)this));
}
/***********************************************************************************************************************************
@ -128,7 +128,7 @@ varLstMove(VariantList *this, MemContext *parentNew)
lstMove((List *)this, parentNew);
FUNCTION_TEST_RETURN(VARIANT_LIST, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************

View File

@ -51,7 +51,7 @@ XmlNodeList *
xmlNodeLstNew(void)
{
FUNCTION_TEST_VOID();
FUNCTION_TEST_RETURN(XML_NODE_LIST, (XmlNodeList *)lstNew(sizeof(XmlNode *)));
FUNCTION_TEST_RETURN((XmlNodeList *)lstNew(sizeof(XmlNode *)));
}
/***********************************************************************************************************************************
@ -67,7 +67,7 @@ xmlNodeLstGet(const XmlNodeList *this, unsigned int listIdx)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(XML_NODE, *(XmlNode **)lstGet((List *)this, listIdx));
FUNCTION_TEST_RETURN(*(XmlNode **)lstGet((List *)this, listIdx));
}
/***********************************************************************************************************************************
@ -82,7 +82,7 @@ xmlNodeLstSize(const XmlNodeList *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(UINT, lstSize((List *)this));
FUNCTION_TEST_RETURN(lstSize((List *)this));
}
/***********************************************************************************************************************************
@ -115,7 +115,7 @@ xmlNodeNew(xmlNodePtr node)
XmlNode *this = memNew(sizeof(XmlNode));
this->node = node;
FUNCTION_TEST_RETURN(XML_NODE, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -139,7 +139,7 @@ xmlNodeLstAdd(XmlNodeList *this, xmlNodePtr node)
}
MEM_CONTEXT_END();
FUNCTION_TEST_RETURN(XML_NODE_LIST, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -165,7 +165,7 @@ xmlNodeAttribute(XmlNode *this, const String *name)
xmlFree(value);
}
FUNCTION_TEST_RETURN(STRING, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -187,7 +187,7 @@ xmlNodeContent(XmlNode *this)
xmlFree(content);
}
FUNCTION_TEST_RETURN(STRING, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -212,7 +212,7 @@ xmlNodeChildList(XmlNode *this, const String *name)
xmlNodeLstAdd(list, currentNode);
}
FUNCTION_TEST_RETURN(XML_NODE_LIST, list);
FUNCTION_TEST_RETURN(list);
}
/***********************************************************************************************************************************
@ -250,7 +250,7 @@ xmlNodeChildN(XmlNode *this, const String *name, unsigned int index, bool errorO
if (child == NULL && errorOnMissing)
THROW_FMT(FormatError, "unable to find child '%s':%u in node '%s'", strPtr(name), index, this->node->name);
FUNCTION_TEST_RETURN(XML_NODE, child);
FUNCTION_TEST_RETURN(child);
}
XmlNode *
@ -264,7 +264,7 @@ xmlNodeChild(XmlNode *this, const String *name, bool errorOnMissing)
ASSERT(this != NULL);
ASSERT(name != NULL);
FUNCTION_TEST_RETURN(XML_NODE, xmlNodeChildN(this, name, 0, errorOnMissing));
FUNCTION_TEST_RETURN(xmlNodeChildN(this, name, 0, errorOnMissing));
}
/***********************************************************************************************************************************
@ -287,7 +287,7 @@ xmlNodeChildTotal(XmlNode *this, const String *name)
result++;
}
FUNCTION_TEST_RETURN(UINT, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -353,7 +353,7 @@ xmlDocumentNewC(const unsigned char *buffer, size_t bufferSize)
}
MEM_CONTEXT_NEW_END();
FUNCTION_TEST_RETURN(XML_DOCUMENT, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -369,7 +369,7 @@ xmlDocumentNewBuf(const Buffer *buffer)
ASSERT(buffer != NULL);
ASSERT(bufSize(buffer) > 0);
FUNCTION_TEST_RETURN(XML_DOCUMENT, xmlDocumentNewC(bufPtr(buffer), bufSize(buffer)));
FUNCTION_TEST_RETURN(xmlDocumentNewC(bufPtr(buffer), bufSize(buffer)));
}
/***********************************************************************************************************************************
@ -385,7 +385,7 @@ xmlDocumentNewZ(const char *string)
ASSERT(string != NULL);
ASSERT(strlen(string) > 0);
FUNCTION_TEST_RETURN(XML_DOCUMENT, xmlDocumentNewC((const unsigned char *)string, strlen(string)));
FUNCTION_TEST_RETURN(xmlDocumentNewC((const unsigned char *)string, strlen(string)));
}
/***********************************************************************************************************************************
@ -400,7 +400,7 @@ xmlDocumentRoot(const XmlDocument *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(XML_NODE, this->root);
FUNCTION_TEST_RETURN(this->root);
}
/***********************************************************************************************************************************

View File

@ -143,7 +143,7 @@ gzipCompressDone(const GzipCompress *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(BOOL, this->done);
FUNCTION_TEST_RETURN(this->done);
}
/***********************************************************************************************************************************
@ -158,7 +158,7 @@ gzipCompressFilter(const GzipCompress *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(IO_FILTER, this->filter);
FUNCTION_TEST_RETURN(this->filter);
}
/***********************************************************************************************************************************
@ -173,7 +173,7 @@ gzipCompressInputSame(const GzipCompress *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(BOOL, this->inputSame);
FUNCTION_TEST_RETURN(this->inputSame);
}
/***********************************************************************************************************************************

View File

@ -119,7 +119,7 @@ gzipDecompressDone(const GzipDecompress *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(BOOL, this->done);
FUNCTION_TEST_RETURN(this->done);
}
/***********************************************************************************************************************************
@ -134,7 +134,7 @@ gzipDecompressFilter(const GzipDecompress *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(IO_FILTER, this->filter);
FUNCTION_TEST_RETURN(this->filter);
}
/***********************************************************************************************************************************
@ -149,7 +149,7 @@ gzipDecompressInputSame(const GzipDecompress *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(BOOL, this->inputSame);
FUNCTION_TEST_RETURN(this->inputSame);
}
/***********************************************************************************************************************************

View File

@ -157,7 +157,7 @@ ConfigCommand
cfgCommand(void)
{
FUNCTION_TEST_VOID();
FUNCTION_TEST_RETURN(ENUM, command);
FUNCTION_TEST_RETURN(command);
}
void
@ -181,7 +181,7 @@ bool
cfgCommandHelp(void)
{
FUNCTION_TEST_VOID();
FUNCTION_TEST_RETURN(BOOL, help);
FUNCTION_TEST_RETURN(help);
}
void
@ -211,7 +211,7 @@ cfgCommandDefIdFromId(ConfigCommand commandId)
ASSERT(commandId < cfgCmdNone);
FUNCTION_TEST_RETURN(ENUM, (ConfigDefineCommand)commandId);
FUNCTION_TEST_RETURN((ConfigDefineCommand)commandId);
}
/***********************************************************************************************************************************
@ -235,7 +235,7 @@ cfgCommandId(const char *commandName)
if (commandId == cfgCmdNone)
THROW_FMT(AssertError, "invalid command '%s'", commandName);
FUNCTION_TEST_RETURN(ENUM, commandId);
FUNCTION_TEST_RETURN(commandId);
}
/***********************************************************************************************************************************
@ -250,7 +250,7 @@ cfgCommandName(ConfigCommand commandId)
ASSERT(commandId < cfgCmdNone);
FUNCTION_TEST_RETURN(STRINGZ, configCommandData[commandId].name);
FUNCTION_TEST_RETURN(configCommandData[commandId].name);
}
/***********************************************************************************************************************************
@ -270,7 +270,7 @@ cfgCommandParam(void)
MEM_CONTEXT_END();
}
FUNCTION_TEST_RETURN(STRING_LIST, paramList);
FUNCTION_TEST_RETURN(paramList);
}
void
@ -298,7 +298,7 @@ const String *
cfgExe(void)
{
FUNCTION_TEST_VOID();
FUNCTION_TEST_RETURN(STRING, exe);
FUNCTION_TEST_RETURN(exe);
}
void
@ -329,7 +329,7 @@ cfgLockRequired(void)
ASSERT(command != cfgCmdNone);
FUNCTION_TEST_RETURN(BOOL, configCommandData[cfgCommand()].lockRequired);
FUNCTION_TEST_RETURN(configCommandData[cfgCommand()].lockRequired);
}
/***********************************************************************************************************************************
@ -342,7 +342,7 @@ cfgLockType(void)
ASSERT(command != cfgCmdNone);
FUNCTION_TEST_RETURN(ENUM, (LockType)configCommandData[cfgCommand()].lockType);
FUNCTION_TEST_RETURN((LockType)configCommandData[cfgCommand()].lockType);
}
/***********************************************************************************************************************************
@ -355,7 +355,7 @@ cfgLogFile(void)
ASSERT(command != cfgCmdNone);
FUNCTION_TEST_RETURN(BOOL, configCommandData[cfgCommand()].logFile);
FUNCTION_TEST_RETURN(configCommandData[cfgCommand()].logFile);
}
/***********************************************************************************************************************************
@ -368,7 +368,7 @@ cfgLogLevelDefault(void)
ASSERT(command != cfgCmdNone);
FUNCTION_TEST_RETURN(ENUM, (LogLevel)configCommandData[cfgCommand()].logLevelDefault);
FUNCTION_TEST_RETURN((LogLevel)configCommandData[cfgCommand()].logLevelDefault);
}
/***********************************************************************************************************************************
@ -381,7 +381,7 @@ cfgLogLevelStdErrMax(void)
ASSERT(command != cfgCmdNone);
FUNCTION_TEST_RETURN(ENUM, (LogLevel)configCommandData[cfgCommand()].logLevelStdErrMax);
FUNCTION_TEST_RETURN((LogLevel)configCommandData[cfgCommand()].logLevelStdErrMax);
}
/***********************************************************************************************************************************
@ -396,7 +396,7 @@ cfgOptionDefIdFromId(ConfigOption optionId)
ASSERT(optionId < CFG_OPTION_TOTAL);
FUNCTION_TEST_RETURN(ENUM, configOptionData[optionId].defineId);
FUNCTION_TEST_RETURN(configOptionData[optionId].defineId);
}
/***********************************************************************************************************************************
@ -459,7 +459,7 @@ cfgOptionDefault(ConfigOption optionId)
}
}
FUNCTION_TEST_RETURN(VARIANT, configOptionValue[optionId].defaultValue);
FUNCTION_TEST_RETURN(configOptionValue[optionId].defaultValue);
}
void
@ -504,7 +504,7 @@ cfgOptionIndex(ConfigOption optionId)
ASSERT(optionId < CFG_OPTION_TOTAL);
FUNCTION_TEST_RETURN(UINT, configOptionData[optionId].index);
FUNCTION_TEST_RETURN(configOptionData[optionId].index);
}
/***********************************************************************************************************************************
@ -525,7 +525,7 @@ cfgOptionId(const char *optionName)
if (strcmp(optionName, configOptionData[optionId].name) == 0)
result = optionId;
FUNCTION_TEST_RETURN(INT, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -540,7 +540,7 @@ cfgOptionIndexTotal(ConfigOption optionId)
ASSERT(optionId < CFG_OPTION_TOTAL);
FUNCTION_TEST_RETURN(UINT, cfgDefOptionIndexTotal(configOptionData[optionId].defineId));
FUNCTION_TEST_RETURN(cfgDefOptionIndexTotal(configOptionData[optionId].defineId));
}
/***********************************************************************************************************************************
@ -568,7 +568,7 @@ cfgOptionIdFromDefId(ConfigDefineOption optionDefId, unsigned int index)
ASSERT(optionId != CFG_OPTION_TOTAL);
// Return with original index
FUNCTION_TEST_RETURN(ENUM, optionId + index);
FUNCTION_TEST_RETURN(optionId + index);
}
/***********************************************************************************************************************************
@ -583,7 +583,7 @@ cfgOptionName(ConfigOption optionId)
ASSERT(optionId < CFG_OPTION_TOTAL);
FUNCTION_TEST_RETURN(STRINGZ, configOptionData[optionId].name);
FUNCTION_TEST_RETURN(configOptionData[optionId].name);
}
/***********************************************************************************************************************************
@ -598,7 +598,7 @@ cfgOptionNegate(ConfigOption optionId)
ASSERT(optionId < CFG_OPTION_TOTAL);
FUNCTION_TEST_RETURN(BOOL, configOptionValue[optionId].negate);
FUNCTION_TEST_RETURN(configOptionValue[optionId].negate);
}
void
@ -628,7 +628,7 @@ cfgOptionReset(ConfigOption optionId)
ASSERT(optionId < CFG_OPTION_TOTAL);
FUNCTION_TEST_RETURN(BOOL, configOptionValue[optionId].reset);
FUNCTION_TEST_RETURN(configOptionValue[optionId].reset);
}
void
@ -658,7 +658,7 @@ cfgOption(ConfigOption optionId)
ASSERT(optionId < CFG_OPTION_TOTAL);
FUNCTION_TEST_RETURN(VARIANT, configOptionValue[optionId].value);
FUNCTION_TEST_RETURN(configOptionValue[optionId].value);
}
bool
@ -874,7 +874,7 @@ cfgOptionSource(ConfigOption optionId)
ASSERT(optionId < CFG_OPTION_TOTAL);
FUNCTION_TEST_RETURN(ENUM, configOptionValue[optionId].source);
FUNCTION_TEST_RETURN(configOptionValue[optionId].source);
}
/***********************************************************************************************************************************
@ -889,7 +889,7 @@ cfgOptionTest(ConfigOption optionId)
ASSERT(optionId < CFG_OPTION_TOTAL);
FUNCTION_TEST_RETURN(BOOL, cfgOptionValid(optionId) && configOptionValue[optionId].value != NULL);
FUNCTION_TEST_RETURN(cfgOptionValid(optionId) && configOptionValue[optionId].value != NULL);
}
/***********************************************************************************************************************************
@ -904,7 +904,7 @@ cfgOptionValid(ConfigOption optionId)
ASSERT(optionId < CFG_OPTION_TOTAL);
FUNCTION_TEST_RETURN(BOOL, configOptionValue[optionId].valid);
FUNCTION_TEST_RETURN(configOptionValue[optionId].valid);
}
void

View File

@ -267,14 +267,14 @@ unsigned int
cfgDefCommandTotal(void)
{
FUNCTION_TEST_VOID();
FUNCTION_TEST_RETURN(UINT, sizeof(configDefineCommandData) / sizeof(ConfigDefineCommandData));
FUNCTION_TEST_RETURN(sizeof(configDefineCommandData) / sizeof(ConfigDefineCommandData));
}
unsigned int
cfgDefOptionTotal(void)
{
FUNCTION_TEST_VOID();
FUNCTION_TEST_RETURN(UINT, sizeof(configDefineOptionData) / sizeof(ConfigDefineOptionData));
FUNCTION_TEST_RETURN(sizeof(configDefineOptionData) / sizeof(ConfigDefineOptionData));
}
/***********************************************************************************************************************************
@ -289,7 +289,7 @@ cfgDefCommandHelpDescription(ConfigDefineCommand commandDefId)
ASSERT(commandDefId < cfgDefCommandTotal());
FUNCTION_TEST_RETURN(STRINGZ, configDefineCommandData[commandDefId].helpDescription);
FUNCTION_TEST_RETURN(configDefineCommandData[commandDefId].helpDescription);
}
/***********************************************************************************************************************************
@ -304,7 +304,7 @@ cfgDefCommandHelpSummary(ConfigDefineCommand commandDefId)
ASSERT(commandDefId < cfgDefCommandTotal());
FUNCTION_TEST_RETURN(STRINGZ, configDefineCommandData[commandDefId].helpSummary);
FUNCTION_TEST_RETURN(configDefineCommandData[commandDefId].helpSummary);
}
/***********************************************************************************************************************************
@ -323,7 +323,7 @@ cfgDefOptionAllowList(ConfigDefineCommand commandDefId, ConfigDefineOption optio
CONFIG_DEFINE_DATA_FIND(commandDefId, optionDefId, configDefDataTypeAllowList);
FUNCTION_TEST_RETURN(BOOL, dataDefFound);
FUNCTION_TEST_RETURN(dataDefFound);
}
const char *
@ -341,7 +341,7 @@ cfgDefOptionAllowListValue(ConfigDefineCommand commandDefId, ConfigDefineOption
CONFIG_DEFINE_DATA_FIND(commandDefId, optionDefId, configDefDataTypeAllowList);
FUNCTION_TEST_RETURN(STRINGZ, (char *)dataDefList[valueId]);
FUNCTION_TEST_RETURN((char *)dataDefList[valueId]);
}
unsigned int
@ -357,7 +357,7 @@ cfgDefOptionAllowListValueTotal(ConfigDefineCommand commandDefId, ConfigDefineOp
CONFIG_DEFINE_DATA_FIND(commandDefId, optionDefId, configDefDataTypeAllowList);
FUNCTION_TEST_RETURN(UINT, dataDefListSize);
FUNCTION_TEST_RETURN(dataDefListSize);
}
// Check if the value matches a value in the allow list
@ -382,7 +382,7 @@ cfgDefOptionAllowListValueValid(ConfigDefineCommand commandDefId, ConfigDefineOp
result = true;
}
FUNCTION_TEST_RETURN(BOOL, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -401,7 +401,7 @@ cfgDefOptionAllowRange(ConfigDefineCommand commandDefId, ConfigDefineOption opti
CONFIG_DEFINE_DATA_FIND(commandDefId, optionDefId, configDefDataTypeAllowRange);
FUNCTION_TEST_RETURN(BOOL, dataDefFound);
FUNCTION_TEST_RETURN(dataDefFound);
}
double
@ -418,7 +418,7 @@ cfgDefOptionAllowRangeMax(ConfigDefineCommand commandDefId, ConfigDefineOption o
CONFIG_DEFINE_DATA_FIND(commandDefId, optionDefId, configDefDataTypeAllowRange);
FUNCTION_TEST_RETURN(
DOUBLE, ((double)(((int64_t)(intptr_t)dataDefList[2]) + (((int64_t)(intptr_t)dataDefList[3]) * 1000000000L))) / 100);
((double)(((int64_t)(intptr_t)dataDefList[2]) + (((int64_t)(intptr_t)dataDefList[3]) * 1000000000L))) / 100);
}
double
@ -435,7 +435,7 @@ cfgDefOptionAllowRangeMin(ConfigDefineCommand commandDefId, ConfigDefineOption o
CONFIG_DEFINE_DATA_FIND(commandDefId, optionDefId, configDefDataTypeAllowRange);
FUNCTION_TEST_RETURN(
DOUBLE, ((double)(((int64_t)(intptr_t)dataDefList[0]) + (((int64_t)(intptr_t)dataDefList[1]) * 1000000000L))) / 100);
((double)(((int64_t)(intptr_t)dataDefList[0]) + (((int64_t)(intptr_t)dataDefList[1]) * 1000000000L))) / 100);
}
/***********************************************************************************************************************************
@ -459,7 +459,7 @@ cfgDefOptionDefault(ConfigDefineCommand commandDefId, ConfigDefineOption optionD
if (dataDefFound)
result = (char *)dataDefList[0];
FUNCTION_TEST_RETURN(STRINGZ, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -478,7 +478,7 @@ cfgDefOptionDepend(ConfigDefineCommand commandDefId, ConfigDefineOption optionDe
CONFIG_DEFINE_DATA_FIND(commandDefId, optionDefId, configDefDataTypeDepend);
FUNCTION_TEST_RETURN(BOOL, dataDefFound);
FUNCTION_TEST_RETURN(dataDefFound);
}
ConfigDefineOption
@ -494,7 +494,7 @@ cfgDefOptionDependOption(ConfigDefineCommand commandDefId, ConfigDefineOption op
CONFIG_DEFINE_DATA_FIND(commandDefId, optionDefId, configDefDataTypeDepend);
FUNCTION_TEST_RETURN(ENUM, (ConfigDefineOption)dataDef);
FUNCTION_TEST_RETURN((ConfigDefineOption)dataDef);
}
const char *
@ -512,7 +512,7 @@ cfgDefOptionDependValue(ConfigDefineCommand commandDefId, ConfigDefineOption opt
CONFIG_DEFINE_DATA_FIND(commandDefId, optionDefId, configDefDataTypeDepend);
FUNCTION_TEST_RETURN(STRINGZ, (char *)dataDefList[valueId]);
FUNCTION_TEST_RETURN((char *)dataDefList[valueId]);
}
unsigned int
@ -528,7 +528,7 @@ cfgDefOptionDependValueTotal(ConfigDefineCommand commandDefId, ConfigDefineOptio
CONFIG_DEFINE_DATA_FIND(commandDefId, optionDefId, configDefDataTypeDepend);
FUNCTION_TEST_RETURN(UINT, dataDefListSize);
FUNCTION_TEST_RETURN(dataDefListSize);
}
// Check if the value matches a value in the allow list
@ -553,7 +553,7 @@ cfgDefOptionDependValueValid(ConfigDefineCommand commandDefId, ConfigDefineOptio
result = true;
}
FUNCTION_TEST_RETURN(BOOL, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -577,7 +577,7 @@ cfgDefOptionHelpDescription(ConfigDefineCommand commandDefId, ConfigDefineOption
if (dataDefFound)
result = (char *)dataDefList[0];
FUNCTION_TEST_RETURN(STRINGZ, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -594,7 +594,7 @@ cfgDefOptionHelpNameAlt(ConfigDefineOption optionDefId)
CONFIG_DEFINE_DATA_FIND(-1, optionDefId, configDefDataTypeHelpNameAlt);
FUNCTION_TEST_RETURN(BOOL, dataDefFound);
FUNCTION_TEST_RETURN(dataDefFound);
}
const char *
@ -610,7 +610,7 @@ cfgDefOptionHelpNameAltValue(ConfigDefineOption optionDefId, unsigned int valueI
CONFIG_DEFINE_DATA_FIND(-1, optionDefId, configDefDataTypeHelpNameAlt);
FUNCTION_TEST_RETURN(STRINGZ, (char *)dataDefList[valueId]);
FUNCTION_TEST_RETURN((char *)dataDefList[valueId]);
}
unsigned int
@ -624,7 +624,7 @@ cfgDefOptionHelpNameAltValueTotal(ConfigDefineOption optionDefId)
CONFIG_DEFINE_DATA_FIND(-1, optionDefId, configDefDataTypeHelpNameAlt);
FUNCTION_TEST_RETURN(UINT, dataDefListSize);
FUNCTION_TEST_RETURN(dataDefListSize);
}
/***********************************************************************************************************************************
@ -639,7 +639,7 @@ cfgDefOptionHelpSection(ConfigDefineOption optionDefId)
ASSERT(optionDefId < cfgDefOptionTotal());
FUNCTION_TEST_RETURN(STRINGZ, configDefineOptionData[optionDefId].helpSection);
FUNCTION_TEST_RETURN(configDefineOptionData[optionDefId].helpSection);
}
/***********************************************************************************************************************************
@ -663,7 +663,7 @@ cfgDefOptionHelpSummary(ConfigDefineCommand commandDefId, ConfigDefineOption opt
if (dataDefFound)
result = (char *)dataDefList[0];
FUNCTION_TEST_RETURN(STRINGZ, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -684,7 +684,7 @@ cfgDefOptionId(const char *optionName)
if (strcmp(optionName, configDefineOptionData[optionDefId].name) == 0)
result = optionDefId;
FUNCTION_TEST_RETURN(INT, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -699,7 +699,7 @@ cfgDefOptionIndexTotal(ConfigDefineOption optionDefId)
ASSERT(optionDefId < cfgDefOptionTotal());
FUNCTION_TEST_RETURN(UINT, configDefineOptionData[optionDefId].indexTotal);
FUNCTION_TEST_RETURN(configDefineOptionData[optionDefId].indexTotal);
}
/***********************************************************************************************************************************
@ -723,7 +723,7 @@ cfgDefOptionInternal(ConfigDefineCommand commandDefId, ConfigDefineOption option
if (dataDefFound)
result = (bool)dataDef;
FUNCTION_TEST_RETURN(BOOL, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -739,7 +739,6 @@ cfgDefOptionMulti(ConfigDefineOption optionDefId)
ASSERT(optionDefId < cfgDefOptionTotal());
FUNCTION_TEST_RETURN(
BOOL,
configDefineOptionData[optionDefId].type == cfgDefOptTypeHash ||
configDefineOptionData[optionDefId].type == cfgDefOptTypeList);
}
@ -756,7 +755,7 @@ cfgDefOptionName(ConfigDefineOption optionDefId)
ASSERT(optionDefId < cfgDefOptionTotal());
FUNCTION_TEST_RETURN(STRINGZ, configDefineOptionData[optionDefId].name);
FUNCTION_TEST_RETURN(configDefineOptionData[optionDefId].name);
}
/***********************************************************************************************************************************
@ -778,7 +777,7 @@ cfgDefOptionPrefix(ConfigDefineOption optionDefId)
if (dataDefFound)
result = (char *)dataDefList[0];
FUNCTION_TEST_RETURN(STRINGZ, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -793,7 +792,7 @@ cfgDefOptionSecure(ConfigDefineOption optionDefId)
ASSERT(optionDefId < cfgDefOptionTotal());
FUNCTION_TEST_RETURN(BOOL, configDefineOptionData[optionDefId].secure);
FUNCTION_TEST_RETURN(configDefineOptionData[optionDefId].secure);
}
/***********************************************************************************************************************************
@ -817,7 +816,7 @@ cfgDefOptionRequired(ConfigDefineCommand commandDefId, ConfigDefineOption option
if (dataDefFound)
result = (bool)dataDef;
FUNCTION_TEST_RETURN(BOOL, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -832,7 +831,7 @@ cfgDefOptionSection(ConfigDefineOption optionDefId)
ASSERT(optionDefId < cfgDefOptionTotal());
FUNCTION_TEST_RETURN(ENUM, configDefineOptionData[optionDefId].section);
FUNCTION_TEST_RETURN(configDefineOptionData[optionDefId].section);
}
/***********************************************************************************************************************************
@ -847,7 +846,7 @@ cfgDefOptionType(ConfigDefineOption optionDefId)
ASSERT(optionDefId < cfgDefOptionTotal());
FUNCTION_TEST_RETURN(INT, configDefineOptionData[optionDefId].type);
FUNCTION_TEST_RETURN(configDefineOptionData[optionDefId].type);
}
/***********************************************************************************************************************************
@ -864,5 +863,5 @@ cfgDefOptionValid(ConfigDefineCommand commandDefId, ConfigDefineOption optionDef
ASSERT(commandDefId < cfgDefCommandTotal());
ASSERT(optionDefId < cfgDefOptionTotal());
FUNCTION_TEST_RETURN(BOOL, configDefineOptionData[optionDefId].commandValid & (1 << commandDefId));
FUNCTION_TEST_RETURN(configDefineOptionData[optionDefId].commandValid & (1 << commandDefId));
}

View File

@ -415,7 +415,7 @@ cipherBlockDone(const CipherBlock *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(BOOL, this->done && !this->inputSame);
FUNCTION_TEST_RETURN(this->done && !this->inputSame);
}
/***********************************************************************************************************************************
@ -430,7 +430,7 @@ cipherBlockFilter(const CipherBlock *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(IO_FILTER, this->filter);
FUNCTION_TEST_RETURN(this->filter);
}
/***********************************************************************************************************************************
@ -445,7 +445,7 @@ cipherBlockInputSame(const CipherBlock *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(BOOL, this->inputSame);
FUNCTION_TEST_RETURN(this->inputSame);
}
/***********************************************************************************************************************************

View File

@ -73,7 +73,7 @@ cipherType(const String *name)
else if (!strEq(name, CIPHER_TYPE_NONE_STR))
THROW_FMT(AssertError, "invalid cipher name '%s'", strPtr(name));
FUNCTION_TEST_RETURN(ENUM, result);
FUNCTION_TEST_RETURN(result);
}
const String *
@ -90,7 +90,7 @@ cipherTypeName(CipherType type)
else if (type != cipherTypeNone)
THROW_FMT(AssertError, "invalid cipher type %u", type);
FUNCTION_TEST_RETURN(STRING, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -130,7 +130,7 @@ bool
cryptoIsInit(void)
{
FUNCTION_TEST_VOID();
FUNCTION_TEST_RETURN(BOOL, cryptoInitDone);
FUNCTION_TEST_RETURN(cryptoInitDone);
}
/***********************************************************************************************************************************

View File

@ -279,7 +279,7 @@ cryptoHashOne(const String *type, Buffer *message)
ASSERT(type != NULL);
ASSERT(message != NULL);
FUNCTION_TEST_RETURN(BUFFER, cryptoHashOneC(type, bufPtr(message), bufSize(message)));
FUNCTION_TEST_RETURN(cryptoHashOneC(type, bufPtr(message), bufSize(message)));
}
/***********************************************************************************************************************************
@ -296,7 +296,7 @@ cryptoHashOneStr(const String *type, String *message)
ASSERT(type != NULL);
ASSERT(message != NULL);
FUNCTION_TEST_RETURN(BUFFER, cryptoHashOneC(type, (const unsigned char *)strPtr(message), strSize(message)));
FUNCTION_TEST_RETURN(cryptoHashOneC(type, (const unsigned char *)strPtr(message), strSize(message)));
}
/***********************************************************************************************************************************
@ -324,5 +324,5 @@ cryptoHmacOne(const String *type, const Buffer *key, const Buffer *message)
// Calculate the HMAC
HMAC(hashType, bufPtr(key), (int)bufSize(key), bufPtr(message), bufSize(message), bufPtr(result), NULL);
FUNCTION_TEST_RETURN(BUFFER, result);
FUNCTION_TEST_RETURN(result);
}

View File

@ -104,7 +104,7 @@ infoHash(const Ini *ini)
}
MEM_CONTEXT_TEMP_END();
FUNCTION_TEST_RETURN(CRYPTO_HASH, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -279,7 +279,7 @@ infoCipherPass(const Info *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(STRING, this->cipherPass);
FUNCTION_TEST_RETURN(this->cipherPass);
}
Ini *
@ -291,7 +291,7 @@ infoIni(const Info *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(INI, this->ini);
FUNCTION_TEST_RETURN(this->ini);
}
String *
@ -303,7 +303,7 @@ infoFileName(const Info *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(STRING, this->fileName);
FUNCTION_TEST_RETURN(this->fileName);
}
/***********************************************************************************************************************************

View File

@ -176,7 +176,7 @@ infoArchiveIdHistoryMatch(
strPtr(pgVersionToStr(pgVersion)), pgSystemId);
}
FUNCTION_TEST_RETURN(STRING, archiveId);
FUNCTION_TEST_RETURN(archiveId);
}
/***********************************************************************************************************************************
@ -191,7 +191,7 @@ infoArchiveId(const InfoArchive *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(STRING, this->archiveId);
FUNCTION_TEST_RETURN(this->archiveId);
}
/***********************************************************************************************************************************
@ -206,7 +206,7 @@ infoArchiveCipherPass(const InfoArchive *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(STRING, infoPgCipherPass(this->infoPg));
FUNCTION_TEST_RETURN(infoPgCipherPass(this->infoPg));
}
/***********************************************************************************************************************************
@ -221,7 +221,7 @@ infoArchivePg(const InfoArchive *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(INFO_PG, this->infoPg);
FUNCTION_TEST_RETURN(this->infoPg);
}
/***********************************************************************************************************************************

View File

@ -198,7 +198,7 @@ infoBackupPg(const InfoBackup *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(INFO_PG, this->infoPg);
FUNCTION_TEST_RETURN(this->infoPg);
}
/***********************************************************************************************************************************
@ -213,7 +213,7 @@ infoBackupDataTotal(const InfoBackup *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(UINT, (this->backup == NULL ? 0 : lstSize(this->backup)));
FUNCTION_TEST_RETURN((this->backup == NULL ? 0 : lstSize(this->backup)));
}
/***********************************************************************************************************************************

View File

@ -179,7 +179,7 @@ infoPgCipherPass(const InfoPg *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(STRING, infoCipherPass(this->info));
FUNCTION_TEST_RETURN(infoCipherPass(this->info));
}
/***********************************************************************************************************************************

View File

@ -131,5 +131,5 @@ perlOptionJson(void)
}
MEM_CONTEXT_TEMP_END();
FUNCTION_TEST_RETURN(STRING, result);
FUNCTION_TEST_RETURN(result);
}

View File

@ -69,7 +69,7 @@ perlMain(void)
String *mainCall = strNewFmt(
"($iResult, $bErrorC, $strMessage) = " PGBACKREST_MAIN "('%s'%s)", cfgCommandName(cfgCommand()), strPtr(commandParam));
FUNCTION_TEST_RETURN(STRING, mainCall);
FUNCTION_TEST_RETURN(mainCall);
}
/***********************************************************************************************************************************

View File

@ -291,7 +291,7 @@ pgControlTestToBuffer(PgControl pgControl)
// Generate pg_control
interface->controlTest(pgControl, result);
FUNCTION_TEST_RETURN(BUFFER, result);
FUNCTION_TEST_RETURN(result);
}
#endif

View File

@ -25,7 +25,7 @@ pgInterfaceIs083(const Buffer *controlFile)
ControlFileData *controlData = (ControlFileData *)bufPtr(controlFile);
FUNCTION_TEST_RETURN(
BOOL, controlData->pg_control_version == PG_CONTROL_VERSION && controlData->catalog_version_no == CATALOG_VERSION_NO);
controlData->pg_control_version == PG_CONTROL_VERSION && controlData->catalog_version_no == CATALOG_VERSION_NO);
}
/***********************************************************************************************************************************

View File

@ -25,7 +25,7 @@ pgInterfaceIs084(const Buffer *controlFile)
ControlFileData *controlData = (ControlFileData *)bufPtr(controlFile);
FUNCTION_TEST_RETURN(
BOOL, controlData->pg_control_version == PG_CONTROL_VERSION && controlData->catalog_version_no == CATALOG_VERSION_NO);
controlData->pg_control_version == PG_CONTROL_VERSION && controlData->catalog_version_no == CATALOG_VERSION_NO);
}
/***********************************************************************************************************************************

View File

@ -25,7 +25,7 @@ pgInterfaceIs090(const Buffer *controlFile)
ControlFileData *controlData = (ControlFileData *)bufPtr(controlFile);
FUNCTION_TEST_RETURN(
BOOL, controlData->pg_control_version == PG_CONTROL_VERSION && controlData->catalog_version_no == CATALOG_VERSION_NO);
controlData->pg_control_version == PG_CONTROL_VERSION && controlData->catalog_version_no == CATALOG_VERSION_NO);
}
/***********************************************************************************************************************************

View File

@ -25,7 +25,7 @@ pgInterfaceIs091(const Buffer *controlFile)
ControlFileData *controlData = (ControlFileData *)bufPtr(controlFile);
FUNCTION_TEST_RETURN(
BOOL, controlData->pg_control_version == PG_CONTROL_VERSION && controlData->catalog_version_no == CATALOG_VERSION_NO);
controlData->pg_control_version == PG_CONTROL_VERSION && controlData->catalog_version_no == CATALOG_VERSION_NO);
}
/***********************************************************************************************************************************

View File

@ -25,7 +25,7 @@ pgInterfaceIs092(const Buffer *controlFile)
ControlFileData *controlData = (ControlFileData *)bufPtr(controlFile);
FUNCTION_TEST_RETURN(
BOOL, controlData->pg_control_version == PG_CONTROL_VERSION && controlData->catalog_version_no == CATALOG_VERSION_NO);
controlData->pg_control_version == PG_CONTROL_VERSION && controlData->catalog_version_no == CATALOG_VERSION_NO);
}
/***********************************************************************************************************************************

View File

@ -25,7 +25,7 @@ pgInterfaceIs093(const Buffer *controlFile)
ControlFileData *controlData = (ControlFileData *)bufPtr(controlFile);
FUNCTION_TEST_RETURN(
BOOL, controlData->pg_control_version == PG_CONTROL_VERSION && controlData->catalog_version_no == CATALOG_VERSION_NO);
controlData->pg_control_version == PG_CONTROL_VERSION && controlData->catalog_version_no == CATALOG_VERSION_NO);
}
/***********************************************************************************************************************************

View File

@ -25,7 +25,7 @@ pgInterfaceIs094(const Buffer *controlFile)
ControlFileData *controlData = (ControlFileData *)bufPtr(controlFile);
FUNCTION_TEST_RETURN(
BOOL, controlData->pg_control_version == PG_CONTROL_VERSION && controlData->catalog_version_no == CATALOG_VERSION_NO);
controlData->pg_control_version == PG_CONTROL_VERSION && controlData->catalog_version_no == CATALOG_VERSION_NO);
}
/***********************************************************************************************************************************

View File

@ -25,7 +25,7 @@ pgInterfaceIs095(const Buffer *controlFile)
ControlFileData *controlData = (ControlFileData *)bufPtr(controlFile);
FUNCTION_TEST_RETURN(
BOOL, controlData->pg_control_version == PG_CONTROL_VERSION && controlData->catalog_version_no == CATALOG_VERSION_NO);
controlData->pg_control_version == PG_CONTROL_VERSION && controlData->catalog_version_no == CATALOG_VERSION_NO);
}
/***********************************************************************************************************************************

View File

@ -25,7 +25,7 @@ pgInterfaceIs096(const Buffer *controlFile)
ControlFileData *controlData = (ControlFileData *)bufPtr(controlFile);
FUNCTION_TEST_RETURN(
BOOL, controlData->pg_control_version == PG_CONTROL_VERSION && controlData->catalog_version_no == CATALOG_VERSION_NO);
controlData->pg_control_version == PG_CONTROL_VERSION && controlData->catalog_version_no == CATALOG_VERSION_NO);
}
/***********************************************************************************************************************************

View File

@ -25,7 +25,7 @@ pgInterfaceIs100(const Buffer *controlFile)
ControlFileData *controlData = (ControlFileData *)bufPtr(controlFile);
FUNCTION_TEST_RETURN(
BOOL, controlData->pg_control_version == PG_CONTROL_VERSION && controlData->catalog_version_no == CATALOG_VERSION_NO);
controlData->pg_control_version == PG_CONTROL_VERSION && controlData->catalog_version_no == CATALOG_VERSION_NO);
}
/***********************************************************************************************************************************

View File

@ -25,7 +25,7 @@ pgInterfaceIs110(const Buffer *controlFile)
ControlFileData *controlData = (ControlFileData *)bufPtr(controlFile);
FUNCTION_TEST_RETURN(
BOOL, controlData->pg_control_version == PG_CONTROL_VERSION && controlData->catalog_version_no == CATALOG_VERSION_NO);
controlData->pg_control_version == PG_CONTROL_VERSION && controlData->catalog_version_no == CATALOG_VERSION_NO);
}
/***********************************************************************************************************************************

View File

@ -165,7 +165,7 @@ pageChecksumBlock(const unsigned char *page, unsigned int pageSize)
for (i = 0; i < N_SUMS; i++)
result ^= sums[i];
FUNCTION_TEST_RETURN(UINT32, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -198,7 +198,7 @@ pageChecksum(const unsigned char *page, unsigned int blockNo, unsigned int pageS
checksum ^= blockNo;
// Reduce to a uint16 with an offset of one. That avoids checksums of zero, which seems like a good idea.
FUNCTION_TEST_RETURN(UINT16, (uint16_t)(checksum % 65535 + 1));
FUNCTION_TEST_RETURN((uint16_t)(checksum % 65535 + 1));
}
/***********************************************************************************************************************************
@ -219,7 +219,6 @@ pageChecksumTest(
ASSERT(page != NULL);
FUNCTION_TEST_RETURN(
BOOL,
// This is a new page so don't test checksum
((PageHeader)page)->pd_upper == 0 ||
// LSN is after the backup started so checksum is not tested because pages may be torn

View File

@ -233,7 +233,7 @@ protocolClientMove(ProtocolClient *this, MemContext *parentNew)
if (this != NULL)
memContextMove(this->memContext, parentNew);
FUNCTION_TEST_RETURN(PROTOCOL_CLIENT, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -269,7 +269,7 @@ protocolClientIoRead(const ProtocolClient *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(IO_READ, this->read);
FUNCTION_TEST_RETURN(this->read);
}
/***********************************************************************************************************************************
@ -284,7 +284,7 @@ protocolClientIoWrite(const ProtocolClient *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(IO_WRITE, this->write);
FUNCTION_TEST_RETURN(this->write);
}
/***********************************************************************************************************************************

View File

@ -31,7 +31,7 @@ bool
repoIsLocal(void)
{
FUNCTION_TEST_VOID();
FUNCTION_TEST_RETURN(BOOL, !cfgOptionTest(cfgOptRepoHost));
FUNCTION_TEST_RETURN(!cfgOptionTest(cfgOptRepoHost));
}
/***********************************************************************************************************************************

View File

@ -42,7 +42,7 @@ storageDriverPosixFileOpen(
}
}
FUNCTION_TEST_RETURN(INT, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************

View File

@ -174,7 +174,7 @@ storageDriverPosixFileReadEof(const StorageDriverPosixFileRead *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(BOOL, this->eof);
FUNCTION_TEST_RETURN(this->eof);
}
/***********************************************************************************************************************************
@ -189,7 +189,7 @@ storageDriverPosixFileReadIgnoreMissing(const StorageDriverPosixFileRead *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(BOOL, this->ignoreMissing);
FUNCTION_TEST_RETURN(this->ignoreMissing);
}
/***********************************************************************************************************************************
@ -204,7 +204,7 @@ storageDriverPosixFileReadInterface(const StorageDriverPosixFileRead *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(STORAGE_FILE_READ, this->interface);
FUNCTION_TEST_RETURN(this->interface);
}
/***********************************************************************************************************************************
@ -219,7 +219,7 @@ storageDriverPosixFileReadIo(const StorageDriverPosixFileRead *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(IO_READ, this->io);
FUNCTION_TEST_RETURN(this->io);
}
/***********************************************************************************************************************************
@ -234,7 +234,7 @@ storageDriverPosixFileReadName(const StorageDriverPosixFileRead *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(STRING, this->name);
FUNCTION_TEST_RETURN(this->name);
}
/***********************************************************************************************************************************

View File

@ -217,7 +217,7 @@ storageDriverPosixFileWriteAtomic(const StorageDriverPosixFileWrite *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(BOOL, this->atomic);
FUNCTION_TEST_RETURN(this->atomic);
}
/***********************************************************************************************************************************
@ -232,7 +232,7 @@ storageDriverPosixFileWriteCreatePath(const StorageDriverPosixFileWrite *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(BOOL, this->createPath);
FUNCTION_TEST_RETURN(this->createPath);
}
/***********************************************************************************************************************************
@ -247,7 +247,7 @@ storageDriverPosixFileWriteInterface(const StorageDriverPosixFileWrite *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(STORAGE_FILE_WRITE, this->interface);
FUNCTION_TEST_RETURN(this->interface);
}
/***********************************************************************************************************************************
@ -262,7 +262,7 @@ storageDriverPosixFileWriteIo(const StorageDriverPosixFileWrite *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(IO_WRITE, this->io);
FUNCTION_TEST_RETURN(this->io);
}
/***********************************************************************************************************************************
@ -277,7 +277,7 @@ storageDriverPosixFileWriteModeFile(const StorageDriverPosixFileWrite *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(MODE, this->modeFile);
FUNCTION_TEST_RETURN(this->modeFile);
}
/***********************************************************************************************************************************
@ -292,7 +292,7 @@ storageDriverPosixFileWriteModePath(const StorageDriverPosixFileWrite *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(MODE, this->modePath);
FUNCTION_TEST_RETURN(this->modePath);
}
/***********************************************************************************************************************************
@ -307,7 +307,7 @@ storageDriverPosixFileWriteName(const StorageDriverPosixFileWrite *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(STRING, this->name);
FUNCTION_TEST_RETURN(this->name);
}
/***********************************************************************************************************************************
@ -322,7 +322,7 @@ storageDriverPosixFileWriteSyncFile(const StorageDriverPosixFileWrite *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(BOOL, this->syncFile);
FUNCTION_TEST_RETURN(this->syncFile);
}
/***********************************************************************************************************************************
@ -337,7 +337,7 @@ storageDriverPosixFileWriteSyncPath(const StorageDriverPosixFileWrite *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(BOOL, this->syncPath);
FUNCTION_TEST_RETURN(this->syncPath);
}
/***********************************************************************************************************************************

View File

@ -499,7 +499,7 @@ storageDriverPosixInterface(const StorageDriverPosix *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(STORAGE, this->interface);
FUNCTION_TEST_RETURN(this->interface);
}
/***********************************************************************************************************************************

View File

@ -243,7 +243,7 @@ storageDriverRemoteFileReadEof(const StorageDriverRemoteFileRead *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(BOOL, this->eof);
FUNCTION_TEST_RETURN(this->eof);
}
/***********************************************************************************************************************************
@ -258,7 +258,7 @@ storageDriverRemoteFileReadIgnoreMissing(const StorageDriverRemoteFileRead *this
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(BOOL, this->ignoreMissing);
FUNCTION_TEST_RETURN(this->ignoreMissing);
}
/***********************************************************************************************************************************
@ -273,7 +273,7 @@ storageDriverRemoteFileReadInterface(const StorageDriverRemoteFileRead *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(STORAGE_FILE_READ, this->interface);
FUNCTION_TEST_RETURN(this->interface);
}
/***********************************************************************************************************************************
@ -288,7 +288,7 @@ storageDriverRemoteFileReadIo(const StorageDriverRemoteFileRead *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(IO_READ, this->io);
FUNCTION_TEST_RETURN(this->io);
}
/***********************************************************************************************************************************
@ -303,5 +303,5 @@ storageDriverRemoteFileReadName(const StorageDriverRemoteFileRead *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(STRING, this->name);
FUNCTION_TEST_RETURN(this->name);
}

View File

@ -300,5 +300,5 @@ storageDriverRemoteInterface(const StorageDriverRemote *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(STORAGE, this->interface);
FUNCTION_TEST_RETURN(this->interface);
}

View File

@ -129,7 +129,7 @@ storageDriverS3FileReadEof(const StorageDriverS3FileRead *this)
ASSERT(this != NULL && this->httpClient != NULL);
FUNCTION_TEST_RETURN(BOOL, ioReadEof(httpClientIoRead(this->httpClient)));
FUNCTION_TEST_RETURN(ioReadEof(httpClientIoRead(this->httpClient)));
}
/***********************************************************************************************************************************
@ -144,7 +144,7 @@ storageDriverS3FileReadIgnoreMissing(const StorageDriverS3FileRead *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(BOOL, this->ignoreMissing);
FUNCTION_TEST_RETURN(this->ignoreMissing);
}
/***********************************************************************************************************************************
@ -159,7 +159,7 @@ storageDriverS3FileReadInterface(const StorageDriverS3FileRead *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(STORAGE_FILE_READ, this->interface);
FUNCTION_TEST_RETURN(this->interface);
}
/***********************************************************************************************************************************
@ -174,7 +174,7 @@ storageDriverS3FileReadIo(const StorageDriverS3FileRead *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(IO_READ, this->io);
FUNCTION_TEST_RETURN(this->io);
}
/***********************************************************************************************************************************
@ -189,5 +189,5 @@ storageDriverS3FileReadName(const StorageDriverS3FileRead *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(STRING, this->name);
FUNCTION_TEST_RETURN(this->name);
}

View File

@ -102,7 +102,7 @@ storageDriverS3DateTime(time_t authTime)
buffer, sizeof(buffer), "%Y%m%dT%H%M%SZ", gmtime(&authTime)) != ISO_8601_DATE_TIME_SIZE)
THROW_SYS_ERROR(AssertError, "unable to format date"); // {+uncoverable}
FUNCTION_TEST_RETURN(STRING, strNew(buffer));
FUNCTION_TEST_RETURN(strNew(buffer));
}
/***********************************************************************************************************************************
@ -686,7 +686,7 @@ storageDriverS3HttpClient(const StorageDriverS3 *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(HTTP_CLIENT, this->httpClient);
FUNCTION_TEST_RETURN(this->httpClient);
}
/***********************************************************************************************************************************
@ -701,5 +701,5 @@ storageDriverS3Interface(const StorageDriverS3 *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(STORAGE, this->interface);
FUNCTION_TEST_RETURN(this->interface);
}

View File

@ -62,7 +62,7 @@ storageFileReadMove(StorageFileRead *this, MemContext *parentNew)
if (this != NULL)
memContextMove(this->memContext, parentNew);
FUNCTION_TEST_RETURN(STORAGE_FILE_READ, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -77,7 +77,7 @@ storageFileReadDriver(const StorageFileRead *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(VOIDP, this->driver);
FUNCTION_TEST_RETURN(this->driver);
}
/***********************************************************************************************************************************
@ -92,7 +92,7 @@ storageFileReadIgnoreMissing(const StorageFileRead *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(BOOL, this->interface.ignoreMissing(this->driver));
FUNCTION_TEST_RETURN(this->interface.ignoreMissing(this->driver));
}
/***********************************************************************************************************************************
@ -107,7 +107,7 @@ storageFileReadIo(const StorageFileRead *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(IO_READ, this->interface.io(this->driver));
FUNCTION_TEST_RETURN(this->interface.io(this->driver));
}
/***********************************************************************************************************************************
@ -122,7 +122,7 @@ storageFileReadName(const StorageFileRead *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(STRING, this->interface.name(this->driver));
FUNCTION_TEST_RETURN(this->interface.name(this->driver));
}
/***********************************************************************************************************************************
@ -137,7 +137,7 @@ storageFileReadType(const StorageFileRead *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(STRING, this->type);
FUNCTION_TEST_RETURN(this->type);
}
/***********************************************************************************************************************************

View File

@ -69,7 +69,7 @@ storageFileWriteMove(StorageFileWrite *this, MemContext *parentNew)
if (this != NULL)
memContextMove(this->memContext, parentNew);
FUNCTION_TEST_RETURN(STORAGE_FILE_WRITE, this);
FUNCTION_TEST_RETURN(this);
}
/***********************************************************************************************************************************
@ -86,7 +86,7 @@ storageFileWriteAtomic(const StorageFileWrite *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(BOOL, this->interface.atomic(this->driver));
FUNCTION_TEST_RETURN(this->interface.atomic(this->driver));
}
/***********************************************************************************************************************************
@ -101,7 +101,7 @@ storageFileWriteCreatePath(const StorageFileWrite *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(BOOL, this->interface.createPath(this->driver));
FUNCTION_TEST_RETURN(this->interface.createPath(this->driver));
}
/***********************************************************************************************************************************
@ -116,7 +116,7 @@ storageFileWriteFileDriver(const StorageFileWrite *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(VOIDP, this->driver);
FUNCTION_TEST_RETURN(this->driver);
}
/***********************************************************************************************************************************
@ -131,7 +131,7 @@ storageFileWriteIo(const StorageFileWrite *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(IO_WRITE, this->interface.io(this->driver));
FUNCTION_TEST_RETURN(this->interface.io(this->driver));
}
/***********************************************************************************************************************************
@ -146,7 +146,7 @@ storageFileWriteModeFile(const StorageFileWrite *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(MODE, this->interface.modeFile(this->driver));
FUNCTION_TEST_RETURN(this->interface.modeFile(this->driver));
}
/***********************************************************************************************************************************
@ -161,7 +161,7 @@ storageFileWriteModePath(const StorageFileWrite *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(MODE, this->interface.modePath(this->driver));
FUNCTION_TEST_RETURN(this->interface.modePath(this->driver));
}
/***********************************************************************************************************************************
@ -176,7 +176,7 @@ storageFileWriteName(const StorageFileWrite *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(STRING, this->interface.name(this->driver));
FUNCTION_TEST_RETURN(this->interface.name(this->driver));
}
/***********************************************************************************************************************************
@ -191,7 +191,7 @@ storageFileWriteSyncFile(const StorageFileWrite *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(BOOL, this->interface.syncFile(this->driver));
FUNCTION_TEST_RETURN(this->interface.syncFile(this->driver));
}
/***********************************************************************************************************************************
@ -206,7 +206,7 @@ storageFileWriteSyncPath(const StorageFileWrite *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(BOOL, this->interface.syncPath(this->driver));
FUNCTION_TEST_RETURN(this->interface.syncPath(this->driver));
}
/***********************************************************************************************************************************
@ -221,7 +221,7 @@ storageFileWriteType(const StorageFileWrite *this)
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(STRING, this->type);
FUNCTION_TEST_RETURN(this->type);
}
/***********************************************************************************************************************************

View File

@ -112,7 +112,7 @@ storageLocal(void)
MEM_CONTEXT_END();
}
FUNCTION_TEST_RETURN(STORAGE, storageHelper.storageLocal);
FUNCTION_TEST_RETURN(storageHelper.storageLocal);
}
/***********************************************************************************************************************************
@ -138,7 +138,7 @@ storageLocalWrite(void)
MEM_CONTEXT_END();
}
FUNCTION_TEST_RETURN(STORAGE, storageHelper.storageLocalWrite);
FUNCTION_TEST_RETURN(storageHelper.storageLocalWrite);
}
/***********************************************************************************************************************************
@ -191,7 +191,7 @@ storageRepoPathExpression(const String *expression, const String *path)
else
THROW_FMT(AssertError, "invalid expression '%s'", strPtr(expression));
FUNCTION_TEST_RETURN(STRING, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -242,7 +242,7 @@ storageRepoGet(const String *type, bool write)
else
THROW_FMT(AssertError, "invalid storage type '%s'", strPtr(type));
FUNCTION_TEST_RETURN(STORAGE, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -266,7 +266,7 @@ storageRepo(void)
MEM_CONTEXT_END();
}
FUNCTION_TEST_RETURN(STORAGE, storageHelper.storageRepo);
FUNCTION_TEST_RETURN(storageHelper.storageRepo);
}
/***********************************************************************************************************************************
@ -302,7 +302,7 @@ storageSpoolPathExpression(const String *expression, const String *path)
else
THROW_FMT(AssertError, "invalid expression '%s'", strPtr(expression));
FUNCTION_TEST_RETURN(STRING, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
@ -328,7 +328,7 @@ storageSpool(void)
MEM_CONTEXT_END();
}
FUNCTION_TEST_RETURN(STORAGE, storageHelper.storageSpool);
FUNCTION_TEST_RETURN(storageHelper.storageSpool);
}
/***********************************************************************************************************************************
@ -354,5 +354,5 @@ storageSpoolWrite(void)
MEM_CONTEXT_END();
}
FUNCTION_TEST_RETURN(STORAGE, storageHelper.storageSpoolWrite);
FUNCTION_TEST_RETURN(storageHelper.storageSpoolWrite);
}

View File

@ -501,7 +501,7 @@ storagePath(const Storage *this, const String *pathExp)
}
}
FUNCTION_TEST_RETURN(STRING, result);
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************