Commit be0531f0 authored by Andreas Schiffler's avatar Andreas Schiffler

Added tests for SDL_HasIntersection; added negative parameter tests; refactored existing test code

parent e36c0d83
...@@ -607,7 +607,7 @@ LoadTestCaseFunction(void *suite, char *testName) ...@@ -607,7 +607,7 @@ LoadTestCaseFunction(void *suite, char *testName)
{ {
TestCaseFp test = (TestCaseFp) SDL_LoadFunction(suite, testName); TestCaseFp test = (TestCaseFp) SDL_LoadFunction(suite, testName);
if(test == NULL) { if(test == NULL) {
fprintf(stderr, "Loading test failed, tests == NULL\n"); fprintf(stderr, "Loading test %s failed, test == NULL\n", testName);
fprintf(stderr, "%s\n", SDL_GetError()); fprintf(stderr, "%s\n", SDL_GetError());
} }
...@@ -702,6 +702,7 @@ LoadCountFailedAssertsFunction(void *suite) { ...@@ -702,6 +702,7 @@ LoadCountFailedAssertsFunction(void *suite) {
return countFailedAssert; return countFailedAssert;
} }
#define USE_SDL_TIMER_FOR_TIMEOUT
/*! /*!
* Set timeout for test. * Set timeout for test.
...@@ -722,7 +723,7 @@ SetTestTimeout(int timeout, void (*callback)(int)) ...@@ -722,7 +723,7 @@ SetTestTimeout(int timeout, void (*callback)(int))
int tm = (timeout > universal_timeout ? timeout : universal_timeout); int tm = (timeout > universal_timeout ? timeout : universal_timeout);
#if 1 #ifdef USE_SDL_TIMER_FOR_TIMEOUT
/* Init SDL timer if not initialized before */ /* Init SDL timer if not initialized before */
if(SDL_WasInit(SDL_INIT_TIMER) == 0) { if(SDL_WasInit(SDL_INIT_TIMER) == 0) {
if(SDL_InitSubSystem(SDL_INIT_TIMER)) { if(SDL_InitSubSystem(SDL_INIT_TIMER)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment