SDL Library
SDL_test_assert.h File Reference
Include file for SDL test framework. More...
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. | |
int | SDLTest_AssertCheck (int assertCondition, const char *assertDescription,...) |
Assert for test cases that logs but does not break execution flow on failures. | |
void | SDLTest_AssertPass (const char *assertDescription,...) |
Explicitely pass without checking an assertion condition. | |
void | SDLTest_ResetAssertSummary () |
Resets the assert summary counters to zero. | |
void | SDLTest_LogAssertSummary () |
Logs summary of all assertions (total, pass, fail) since last reset as INFO or ERROR. | |
int | SDLTest_AssertSummaryToTestResult () |
Converts the current assert summary state to a test result. |
Detailed Description
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.
Function Documentation
void SDLTest_Assert | ( | int | assertCondition, |
const char * | assertDescription, | ||
... | |||
) |
Assert that logs and break execution flow on failures.
- Parameters:
-
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, |
const char * | assertDescription, | ||
... | |||
) |
Assert for test cases that logs but does not break execution flow on failures.
Updates assertion counters.
- Parameters:
-
assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0). assertDescription Message to log with the assert describing it.
- Returns:
- Returns the assertCondition so it can be used to externally to break execution flow if desired.
void SDLTest_AssertPass | ( | const char * | assertDescription, |
... | |||
) |
Explicitely pass without checking an assertion condition.
Updates assertion counter.
- Parameters:
-
assertDescription Message to log with the assert describing it.
int SDLTest_AssertSummaryToTestResult | ( | ) |
Converts the current assert summary state to a test result.
- Returns:
- TEST_RESULT_PASSED, TEST_RESULT_FAILED, or TEST_RESULT_NO_ASSERT
void SDLTest_LogAssertSummary | ( | ) |
Logs summary of all assertions (total, pass, fail) since last reset as INFO or ERROR.
void SDLTest_ResetAssertSummary | ( | ) |
Resets the assert summary counters to zero.
Generated on Tue Jul 12 2022 15:10:21 by 1.7.2