SDL
2.0
|
Go to the source code of this file.
Macros | |
#define | ASSERT_FAIL 0 |
Fails the assert. More... | |
#define | ASSERT_PASS 1 |
Passes the assert. More... | |
Functions | |
void | SDLTest_Assert (int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription,...) SDL_PRINTF_VARARG_FUNC(2) |
Assert that logs and break execution flow on failures. More... | |
int | SDLTest_AssertCheck (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. More... | |
void | SDLTest_AssertPass (SDL_PRINTF_FORMAT_STRING const char *assertDescription,...) SDL_PRINTF_VARARG_FUNC(1) |
Explicitly pass without checking an assertion condition. Updates assertion counter. More... | |
void | SDLTest_ResetAssertSummary (void) |
Resets the assert summary counters to zero. More... | |
void | SDLTest_LogAssertSummary (void) |
Logs summary of all assertions (total, pass, fail) since last reset as INFO or ERROR. More... | |
int | SDLTest_AssertSummaryToTestResult (void) |
Converts the current assert summary state to a test result. More... | |
Include file for SDL test framework.
This code is a part of the SDL2_test library, not the main SDL library.
Definition in file SDL_test_assert.h.
#define ASSERT_FAIL 0 |
Fails the assert.
Definition at line 48 of file SDL_test_assert.h.
#define ASSERT_PASS 1 |
Passes the assert.
Definition at line 53 of file SDL_test_assert.h.
void SDLTest_Assert | ( | int | assertCondition, |
SDL_PRINTF_FORMAT_STRING const char * | assertDescription, | ||
... | |||
) |
Assert that logs and break execution flow on failures.
assertCondition | Evaluated condition or variable to assert; fail (==0) or pass (!=0). |
assertDescription | Message to log with the assert describing it. |
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 counters.
assertCondition | Evaluated condition or variable to assert; fail (==0) or pass (!=0). |
assertDescription | Message to log with the assert describing it. |
void SDLTest_AssertPass | ( | SDL_PRINTF_FORMAT_STRING const char * | assertDescription, |
... | |||
) |
Explicitly pass without checking an assertion condition. Updates assertion counter.
assertDescription | Message to log with the assert describing it. |
int SDLTest_AssertSummaryToTestResult | ( | void | ) |
Converts the current assert summary state to a test result.
void SDLTest_LogAssertSummary | ( | void | ) |
Logs summary of all assertions (total, pass, fail) since last reset as INFO or ERROR.
void SDLTest_ResetAssertSummary | ( | void | ) |
Resets the assert summary counters to zero.