zenilib
0.5.3.0
|
Go to the source code of this file.
Functions | |
void | SDLTest_Assert (int assertCondition, const char *assertDescription,...) |
Assert that logs and break execution flow on failures. More... | |
int | SDLTest_AssertCheck (int assertCondition, const char *assertDescription,...) |
Assert for test cases that logs but does not break execution flow on failures. Updates assertion counters. More... | |
void | SDLTest_AssertPass (const char *assertDescription,...) |
Explicitely pass without checking an assertion condition. Updates assertion counter. More... | |
int | SDLTest_AssertSummaryToTestResult () |
Converts the current assert summary state to a test result. More... | |
void | SDLTest_LogAssertSummary () |
Logs summary of all assertions (total, pass, fail) since last reset as INFO or ERROR. More... | |
void | SDLTest_ResetAssertSummary () |
Resets the assert summary counters to zero. More... | |
Variables | |
const char * | SDLTest_AssertCheckFormat = "Assert '%s': %s" |
static Uint32 | SDLTest_AssertsFailed = 0 |
static Uint32 | SDLTest_AssertsPassed = 0 |
const char * | SDLTest_AssertSummaryFormat = "Assert Summary: Total=%d Passed=%d Failed=%d" |
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. |
Definition at line 47 of file SDL_test_assert.c.
References SDL_assert, SDL_memset(), SDL_vsnprintf(), SDLTest_AssertCheck(), and SDLTEST_MAX_LOGMESSAGE_LENGTH.
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. |
Definition at line 65 of file SDL_test_assert.c.
References ASSERT_FAIL, SDL_memset(), SDL_vsnprintf(), SDLTest_AssertCheckFormat, SDLTest_AssertsFailed, SDLTest_AssertsPassed, SDLTest_Log(), SDLTest_LogError(), and SDLTEST_MAX_LOGMESSAGE_LENGTH.
Referenced by SDLTest_Assert().
Explicitely pass without checking an assertion condition. Updates assertion counter.
assertDescription | Message to log with the assert describing it. |
Definition at line 94 of file SDL_test_assert.c.
References SDL_memset(), SDL_vsnprintf(), SDLTest_AssertCheckFormat, SDLTest_AssertsPassed, SDLTest_Log(), and SDLTEST_MAX_LOGMESSAGE_LENGTH.
int SDLTest_AssertSummaryToTestResult | ( | ) |
Converts the current assert summary state to a test result.
Definition at line 139 of file SDL_test_assert.c.
References SDLTest_AssertsFailed, SDLTest_AssertsPassed, TEST_RESULT_FAILED, TEST_RESULT_NO_ASSERT, and TEST_RESULT_PASSED.
Referenced by SDLTest_RunTest().
void SDLTest_LogAssertSummary | ( | ) |
Logs summary of all assertions (total, pass, fail) since last reset as INFO or ERROR.
Definition at line 123 of file SDL_test_assert.c.
References SDLTest_AssertsFailed, SDLTest_AssertsPassed, SDLTest_AssertSummaryFormat, SDLTest_Log(), and SDLTest_LogError().
Referenced by SDLTest_RunTest().
void SDLTest_ResetAssertSummary | ( | ) |
Resets the assert summary counters to zero.
Definition at line 113 of file SDL_test_assert.c.
References SDLTest_AssertsFailed, and SDLTest_AssertsPassed.
Referenced by SDLTest_RunTest().
Definition at line 33 of file SDL_test_assert.c.
Referenced by SDLTest_AssertCheck(), and SDLTest_AssertPass().
|
static |
Definition at line 39 of file SDL_test_assert.c.
Referenced by SDLTest_AssertCheck(), SDLTest_AssertSummaryToTestResult(), SDLTest_LogAssertSummary(), and SDLTest_ResetAssertSummary().
|
static |
Definition at line 42 of file SDL_test_assert.c.
Referenced by SDLTest_AssertCheck(), SDLTest_AssertPass(), SDLTest_AssertSummaryToTestResult(), SDLTest_LogAssertSummary(), and SDLTest_ResetAssertSummary().
Definition at line 36 of file SDL_test_assert.c.
Referenced by SDLTest_LogAssertSummary().