SDL_test: use SDLCALL calling convention

This is needed when using a pre-built static SDL3_test library.
This commit is contained in:
Anonymous Maarten 2024-09-06 03:21:13 +02:00 committed by Anonymous Maarten
parent 379aea5c2d
commit db96ddca34
38 changed files with 444 additions and 452 deletions

View file

@ -54,7 +54,7 @@ extern "C" {
* \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0).
* \param assertDescription Message to log with the assert describing it.
*/
void SDLTest_Assert(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(2);
void SDLCALL SDLTest_Assert(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(2);
/*
* Assert for test cases that logs but does not break execution flow on failures. Updates assertion counters.
@ -64,32 +64,31 @@ void SDLTest_Assert(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *as
*
* \returns the assertCondition so it can be used to externally to break execution flow if desired.
*/
int SDLTest_AssertCheck(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(2);
int SDLCALL SDLTest_AssertCheck(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(2);
/*
* Explicitly pass without checking an assertion condition. Updates assertion counter.
*
* \param assertDescription Message to log with the assert describing it.
*/
void SDLTest_AssertPass(SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(1);
void SDLCALL SDLTest_AssertPass(SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(1);
/*
* Resets the assert summary counters to zero.
*/
void SDLTest_ResetAssertSummary(void);
void SDLCALL SDLTest_ResetAssertSummary(void);
/*
* Logs summary of all assertions (total, pass, fail) since last reset as INFO or ERROR.
*/
void SDLTest_LogAssertSummary(void);
void SDLCALL SDLTest_LogAssertSummary(void);
/*
* Converts the current assert summary state to a test result.
*
* \returns TEST_RESULT_PASSED, TEST_RESULT_FAILED, or TEST_RESULT_NO_ASSERT
*/
int SDLTest_AssertSummaryToTestResult(void);
int SDLCALL SDLTest_AssertSummaryToTestResult(void);
#ifdef __cplusplus
}