mirror of
https://github.com/love2d/megasource.git
synced 2026-08-18 19:54:37 +02:00
Update SDL to 2.0.7
This commit is contained in:
@@ -112,7 +112,7 @@ int platform_testGetFunctions (void *arg)
|
||||
char *platform;
|
||||
char *revision;
|
||||
int ret;
|
||||
int len;
|
||||
size_t len;
|
||||
|
||||
platform = (char *)SDL_GetPlatform();
|
||||
SDLTest_AssertPass("SDL_GetPlatform()");
|
||||
@@ -122,7 +122,7 @@ int platform_testGetFunctions (void *arg)
|
||||
SDLTest_AssertCheck(len > 0,
|
||||
"SDL_GetPlatform(): expected non-empty platform, was platform: '%s', len: %i",
|
||||
platform,
|
||||
len);
|
||||
(int) len);
|
||||
}
|
||||
|
||||
ret = SDL_GetCPUCount();
|
||||
@@ -282,7 +282,7 @@ int platform_testGetSetClearError(void *arg)
|
||||
int result;
|
||||
const char *testError = "Testing";
|
||||
char *lastError;
|
||||
int len;
|
||||
size_t len;
|
||||
|
||||
SDL_ClearError();
|
||||
SDLTest_AssertPass("SDL_ClearError()");
|
||||
@@ -295,7 +295,7 @@ int platform_testGetSetClearError(void *arg)
|
||||
{
|
||||
len = SDL_strlen(lastError);
|
||||
SDLTest_AssertCheck(len == 0,
|
||||
"SDL_GetError(): no message expected, len: %i", len);
|
||||
"SDL_GetError(): no message expected, len: %i", (int) len);
|
||||
}
|
||||
|
||||
result = SDL_SetError("%s", testError);
|
||||
@@ -309,8 +309,8 @@ int platform_testGetSetClearError(void *arg)
|
||||
len = SDL_strlen(lastError);
|
||||
SDLTest_AssertCheck(len == SDL_strlen(testError),
|
||||
"SDL_GetError(): expected message len %i, was len: %i",
|
||||
SDL_strlen(testError),
|
||||
len);
|
||||
(int) SDL_strlen(testError),
|
||||
(int) len);
|
||||
SDLTest_AssertCheck(SDL_strcmp(lastError, testError) == 0,
|
||||
"SDL_GetError(): expected message %s, was message: %s",
|
||||
testError,
|
||||
@@ -334,7 +334,7 @@ int platform_testSetErrorEmptyInput(void *arg)
|
||||
int result;
|
||||
const char *testError = "";
|
||||
char *lastError;
|
||||
int len;
|
||||
size_t len;
|
||||
|
||||
result = SDL_SetError("%s", testError);
|
||||
SDLTest_AssertPass("SDL_SetError()");
|
||||
@@ -347,8 +347,8 @@ int platform_testSetErrorEmptyInput(void *arg)
|
||||
len = SDL_strlen(lastError);
|
||||
SDLTest_AssertCheck(len == SDL_strlen(testError),
|
||||
"SDL_GetError(): expected message len %i, was len: %i",
|
||||
SDL_strlen(testError),
|
||||
len);
|
||||
(int) SDL_strlen(testError),
|
||||
(int) len);
|
||||
SDLTest_AssertCheck(SDL_strcmp(lastError, testError) == 0,
|
||||
"SDL_GetError(): expected message '%s', was message: '%s'",
|
||||
testError,
|
||||
@@ -373,14 +373,14 @@ int platform_testSetErrorInvalidInput(void *arg)
|
||||
const char *invalidError = NULL;
|
||||
const char *probeError = "Testing";
|
||||
char *lastError;
|
||||
int len;
|
||||
size_t len;
|
||||
|
||||
/* Reset */
|
||||
SDL_ClearError();
|
||||
SDLTest_AssertPass("SDL_ClearError()");
|
||||
|
||||
/* Check for no-op */
|
||||
result = SDL_SetError(invalidError);
|
||||
result = SDL_SetError("%s", invalidError);
|
||||
SDLTest_AssertPass("SDL_SetError()");
|
||||
SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result);
|
||||
lastError = (char *)SDL_GetError();
|
||||
@@ -391,16 +391,16 @@ int platform_testSetErrorInvalidInput(void *arg)
|
||||
len = SDL_strlen(lastError);
|
||||
SDLTest_AssertCheck(len == 0,
|
||||
"SDL_GetError(): expected message len 0, was len: %i",
|
||||
len);
|
||||
(int) len);
|
||||
}
|
||||
|
||||
/* Set */
|
||||
result = SDL_SetError(probeError);
|
||||
result = SDL_SetError("%s", probeError);
|
||||
SDLTest_AssertPass("SDL_SetError('%s')", probeError);
|
||||
SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result);
|
||||
|
||||
/* Check for no-op */
|
||||
result = SDL_SetError(invalidError);
|
||||
result = SDL_SetError("%s", invalidError);
|
||||
SDLTest_AssertPass("SDL_SetError(NULL)");
|
||||
SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result);
|
||||
lastError = (char *)SDL_GetError();
|
||||
@@ -411,7 +411,7 @@ int platform_testSetErrorInvalidInput(void *arg)
|
||||
len = SDL_strlen(lastError);
|
||||
SDLTest_AssertCheck(len == 0,
|
||||
"SDL_GetError(): expected message len 0, was len: %i",
|
||||
len);
|
||||
(int) len);
|
||||
}
|
||||
|
||||
/* Reset */
|
||||
@@ -419,7 +419,7 @@ int platform_testSetErrorInvalidInput(void *arg)
|
||||
SDLTest_AssertPass("SDL_ClearError()");
|
||||
|
||||
/* Set and check */
|
||||
result = SDL_SetError(probeError);
|
||||
result = SDL_SetError("%s", probeError);
|
||||
SDLTest_AssertPass("SDL_SetError()");
|
||||
SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result);
|
||||
lastError = (char *)SDL_GetError();
|
||||
@@ -430,8 +430,8 @@ int platform_testSetErrorInvalidInput(void *arg)
|
||||
len = SDL_strlen(lastError);
|
||||
SDLTest_AssertCheck(len == SDL_strlen(probeError),
|
||||
"SDL_GetError(): expected message len %i, was len: %i",
|
||||
SDL_strlen(probeError),
|
||||
len);
|
||||
(int) SDL_strlen(probeError),
|
||||
(int) len);
|
||||
SDLTest_AssertCheck(SDL_strcmp(lastError, probeError) == 0,
|
||||
"SDL_GetError(): expected message '%s', was message: '%s'",
|
||||
probeError,
|
||||
|
||||
Reference in New Issue
Block a user