SDL_test: add SDLTest_LogEscapedString

This commit is contained in:
Anonymous Maarten
2024-09-06 03:25:50 +02:00
committed by Anonymous Maarten
parent 6a305e1532
commit ee65176eec
2 changed files with 110 additions and 0 deletions

View File

@@ -51,6 +51,16 @@ extern "C" {
*/
void SDLCALL SDLTest_Log(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
/**
* Prints given prefix and buffer.
* Non-printible characters in the raw data are substituted by printible alternatives.
*
* \param prefix Prefix message.
* \param buffer Raw data to be escaped.
* \param size Number of bytes in buffer.
*/
void SDLCALL SDLTest_LogEscapedString(const char *prefix, const void *buffer, size_t size);
/**
* Prints given message with a timestamp in the TEST category and the ERROR priority.
*