World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
Файл SDL_test_assert.h

См. исходные тексты.

Функции

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. Подробнее...
 
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. Подробнее...
 
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. Подробнее...
 
void SDLTest_ResetAssertSummary (void)
 Resets the assert summary counters to zero. Подробнее...
 
void SDLTest_LogAssertSummary (void)
 Logs summary of all assertions (total, pass, fail) since last reset as INFO or ERROR. Подробнее...
 
int SDLTest_AssertSummaryToTestResult (void)
 Converts the current assert summary state to a test result. Подробнее...
 

Подробное описание

Include file for SDL test framework.

This code is a part of the SDL2_test library, not the main SDL library.

См. определение в файле SDL_test_assert.h

Функции

◆ SDLTest_Assert()

void SDLTest_Assert ( int  assertCondition,
SDL_PRINTF_FORMAT_STRING const char *  assertDescription,
  ... 
)

Assert that logs and break execution flow on failures.

Аргументы
assertConditionEvaluated condition or variable to assert; fail (==0) or pass (!=0).
assertDescriptionMessage to log with the assert describing it.

◆ SDLTest_AssertCheck()

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.

Аргументы
assertConditionEvaluated condition or variable to assert; fail (==0) or pass (!=0).
assertDescriptionMessage to log with the assert describing it.
Возвращает
Returns the assertCondition so it can be used to externally to break execution flow if desired.

◆ SDLTest_AssertPass()

void SDLTest_AssertPass ( SDL_PRINTF_FORMAT_STRING const char *  assertDescription,
  ... 
)

Explicitly pass without checking an assertion condition. Updates assertion counter.

Аргументы
assertDescriptionMessage to log with the assert describing it.

◆ SDLTest_ResetAssertSummary()

void SDLTest_ResetAssertSummary ( void  )

Resets the assert summary counters to zero.

◆ SDLTest_LogAssertSummary()

void SDLTest_LogAssertSummary ( void  )

Logs summary of all assertions (total, pass, fail) since last reset as INFO or ERROR.

◆ SDLTest_AssertSummaryToTestResult()

int SDLTest_AssertSummaryToTestResult ( void  )

Converts the current assert summary state to a test result.

Возвращает
TEST_RESULT_PASSED, TEST_RESULT_FAILED, or TEST_RESULT_NO_ASSERT