33 #define SDLTEST_ASSERT_CHECK_FORMAT "Assert '%s': %s" 36 #define SDLTEST_ASSERT_SUMMARY_FORMAT "Assert Summary: Total=%d Passed=%d Failed=%d" 54 va_start(list, assertDescription);
72 va_start(list, assertDescription);
88 return assertCondition;
101 va_start(list, assertDescription);
126 if (SDLTest_AssertsFailed == 0)
int SDLTest_AssertSummaryToTestResult()
Converts the current assert summary state to a test result.
#define SDLTEST_ASSERT_CHECK_FORMAT
#define SDLTEST_MAX_LOGMESSAGE_LENGTH
void SDLTest_LogAssertSummary()
Logs summary of all assertions (total, pass, fail) since last reset as INFO or ERROR.
#define SDLTEST_ASSERT_SUMMARY_FORMAT
static Uint32 SDLTest_AssertsPassed
#define TEST_RESULT_FAILED
void SDLTest_LogError(SDL_PRINTF_FORMAT_STRING const char *fmt,...) SDL_PRINTF_VARARG_FUNC(1)
Prints given message with a timestamp in the TEST category and the ERROR priority.
static Uint32 SDLTest_AssertsFailed
#define ASSERT_FAIL
Fails the assert.
#define TEST_RESULT_NO_ASSERT
void SDLTest_Assert(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription,...)
Assert that logs and break execution flow on failures.
#define SDL_assert(condition)
#define TEST_RESULT_PASSED
void SDLTest_ResetAssertSummary()
Resets the assert summary counters to zero.
void SDLTest_Log(SDL_PRINTF_FORMAT_STRING const char *fmt,...) SDL_PRINTF_VARARG_FUNC(1)
Prints given message with a timestamp in the TEST category and INFO priority.
void SDLTest_AssertPass(SDL_PRINTF_FORMAT_STRING const char *assertDescription,...)
Explicitly pass without checking an assertion condition. Updates assertion counter.
#define SDL_PRINTF_FORMAT_STRING
int SDLTest_AssertCheck(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription,...)
Assert for test cases that logs but does not break execution flow on failures. Updates assertion coun...