mirror of https://github.com/encounter/SDL.git
test: remove unused variables and typedefs
This commit is contained in:
parent
3f25704592
commit
b972258d56
|
@ -21,8 +21,7 @@
|
||||||
int
|
int
|
||||||
clipboard_testHasClipboardText(void *arg)
|
clipboard_testHasClipboardText(void *arg)
|
||||||
{
|
{
|
||||||
SDL_bool result;
|
SDL_HasClipboardText();
|
||||||
result = SDL_HasClipboardText();
|
|
||||||
SDLTest_AssertPass("Call to SDL_HasClipboardText succeeded");
|
SDLTest_AssertPass("Call to SDL_HasClipboardText succeeded");
|
||||||
|
|
||||||
return TEST_COMPLETED;
|
return TEST_COMPLETED;
|
||||||
|
|
|
@ -47,10 +47,8 @@ keyboard_getKeyboardState(void *arg)
|
||||||
int
|
int
|
||||||
keyboard_getKeyboardFocus(void *arg)
|
keyboard_getKeyboardFocus(void *arg)
|
||||||
{
|
{
|
||||||
SDL_Window* window;
|
|
||||||
|
|
||||||
/* Call, but ignore return value */
|
/* Call, but ignore return value */
|
||||||
window = SDL_GetKeyboardFocus();
|
SDL_GetKeyboardFocus();
|
||||||
SDLTest_AssertPass("Call to SDL_GetKeyboardFocus()");
|
SDLTest_AssertPass("Call to SDL_GetKeyboardFocus()");
|
||||||
|
|
||||||
return TEST_COMPLETED;
|
return TEST_COMPLETED;
|
||||||
|
|
|
@ -160,38 +160,36 @@ int platform_testGetFunctions (void *arg)
|
||||||
*/
|
*/
|
||||||
int platform_testHasFunctions (void *arg)
|
int platform_testHasFunctions (void *arg)
|
||||||
{
|
{
|
||||||
int ret;
|
|
||||||
|
|
||||||
/* TODO: independently determine and compare values as well */
|
/* TODO: independently determine and compare values as well */
|
||||||
|
|
||||||
ret = SDL_HasRDTSC();
|
SDL_HasRDTSC();
|
||||||
SDLTest_AssertPass("SDL_HasRDTSC()");
|
SDLTest_AssertPass("SDL_HasRDTSC()");
|
||||||
|
|
||||||
ret = SDL_HasAltiVec();
|
SDL_HasAltiVec();
|
||||||
SDLTest_AssertPass("SDL_HasAltiVec()");
|
SDLTest_AssertPass("SDL_HasAltiVec()");
|
||||||
|
|
||||||
ret = SDL_HasMMX();
|
SDL_HasMMX();
|
||||||
SDLTest_AssertPass("SDL_HasMMX()");
|
SDLTest_AssertPass("SDL_HasMMX()");
|
||||||
|
|
||||||
ret = SDL_Has3DNow();
|
SDL_Has3DNow();
|
||||||
SDLTest_AssertPass("SDL_Has3DNow()");
|
SDLTest_AssertPass("SDL_Has3DNow()");
|
||||||
|
|
||||||
ret = SDL_HasSSE();
|
SDL_HasSSE();
|
||||||
SDLTest_AssertPass("SDL_HasSSE()");
|
SDLTest_AssertPass("SDL_HasSSE()");
|
||||||
|
|
||||||
ret = SDL_HasSSE2();
|
SDL_HasSSE2();
|
||||||
SDLTest_AssertPass("SDL_HasSSE2()");
|
SDLTest_AssertPass("SDL_HasSSE2()");
|
||||||
|
|
||||||
ret = SDL_HasSSE3();
|
SDL_HasSSE3();
|
||||||
SDLTest_AssertPass("SDL_HasSSE3()");
|
SDLTest_AssertPass("SDL_HasSSE3()");
|
||||||
|
|
||||||
ret = SDL_HasSSE41();
|
SDL_HasSSE41();
|
||||||
SDLTest_AssertPass("SDL_HasSSE41()");
|
SDLTest_AssertPass("SDL_HasSSE41()");
|
||||||
|
|
||||||
ret = SDL_HasSSE42();
|
SDL_HasSSE42();
|
||||||
SDLTest_AssertPass("SDL_HasSSE42()");
|
SDLTest_AssertPass("SDL_HasSSE42()");
|
||||||
|
|
||||||
ret = SDL_HasAVX();
|
SDL_HasAVX();
|
||||||
SDLTest_AssertPass("SDL_HasAVX()");
|
SDLTest_AssertPass("SDL_HasAVX()");
|
||||||
|
|
||||||
return TEST_COMPLETED;
|
return TEST_COMPLETED;
|
||||||
|
|
|
@ -89,7 +89,6 @@ int
|
||||||
sdltest_randomNumber(void *arg)
|
sdltest_randomNumber(void *arg)
|
||||||
{
|
{
|
||||||
Sint64 result;
|
Sint64 result;
|
||||||
Uint64 uresult;
|
|
||||||
double dresult;
|
double dresult;
|
||||||
Uint64 umax;
|
Uint64 umax;
|
||||||
Sint64 min, max;
|
Sint64 min, max;
|
||||||
|
@ -127,7 +126,7 @@ sdltest_randomNumber(void *arg)
|
||||||
SDLTest_AssertPass("Call to SDLTest_RandomSint32");
|
SDLTest_AssertPass("Call to SDLTest_RandomSint32");
|
||||||
SDLTest_AssertCheck(result >= min && result <= max, "Verify result value, expected: [%"SDL_PRIs64",%"SDL_PRIs64"], got: %"SDL_PRIs64, min, max, result);
|
SDLTest_AssertCheck(result >= min && result <= max, "Verify result value, expected: [%"SDL_PRIs64",%"SDL_PRIs64"], got: %"SDL_PRIs64, min, max, result);
|
||||||
|
|
||||||
uresult = SDLTest_RandomUint64();
|
SDLTest_RandomUint64();
|
||||||
SDLTest_AssertPass("Call to SDLTest_RandomUint64");
|
SDLTest_AssertPass("Call to SDLTest_RandomUint64");
|
||||||
|
|
||||||
result = SDLTest_RandomSint64();
|
result = SDLTest_RandomSint64();
|
||||||
|
|
|
@ -477,7 +477,6 @@ video_getClosestDisplayModeRandomResolution(void *arg)
|
||||||
{
|
{
|
||||||
SDL_DisplayMode target;
|
SDL_DisplayMode target;
|
||||||
SDL_DisplayMode closest;
|
SDL_DisplayMode closest;
|
||||||
SDL_DisplayMode* dResult;
|
|
||||||
int displayNum;
|
int displayNum;
|
||||||
int i;
|
int i;
|
||||||
int variation;
|
int variation;
|
||||||
|
@ -500,7 +499,7 @@ video_getClosestDisplayModeRandomResolution(void *arg)
|
||||||
target.driverdata = 0;
|
target.driverdata = 0;
|
||||||
|
|
||||||
/* Make call; may or may not find anything, so don't validate any further */
|
/* Make call; may or may not find anything, so don't validate any further */
|
||||||
dResult = SDL_GetClosestDisplayMode(i, &target, &closest);
|
SDL_GetClosestDisplayMode(i, &target, &closest);
|
||||||
SDLTest_AssertPass("Call to SDL_GetClosestDisplayMode(target=random/variation%d)", variation);
|
SDLTest_AssertPass("Call to SDL_GetClosestDisplayMode(target=random/variation%d)", variation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -830,7 +829,7 @@ video_getSetWindowGrab(void *arg)
|
||||||
{
|
{
|
||||||
const char* title = "video_getSetWindowGrab Test Window";
|
const char* title = "video_getSetWindowGrab Test Window";
|
||||||
SDL_Window* window;
|
SDL_Window* window;
|
||||||
SDL_bool originalMouseState, originalKeyboardState, dummyState;
|
SDL_bool originalMouseState, originalKeyboardState;
|
||||||
|
|
||||||
/* Call against new test window */
|
/* Call against new test window */
|
||||||
window = _createVideoSuiteTestWindow(title);
|
window = _createVideoSuiteTestWindow(title);
|
||||||
|
@ -927,11 +926,11 @@ video_getSetWindowGrab(void *arg)
|
||||||
"SDL_GetWindowKeyboardGrab() should return SDL_FALSE");
|
"SDL_GetWindowKeyboardGrab() should return SDL_FALSE");
|
||||||
|
|
||||||
/* Negative tests */
|
/* Negative tests */
|
||||||
dummyState = SDL_GetWindowGrab(NULL);
|
SDL_GetWindowGrab(NULL);
|
||||||
SDLTest_AssertPass("Call to SDL_GetWindowGrab(window=NULL)");
|
SDLTest_AssertPass("Call to SDL_GetWindowGrab(window=NULL)");
|
||||||
_checkInvalidWindowError();
|
_checkInvalidWindowError();
|
||||||
|
|
||||||
dummyState = SDL_GetWindowKeyboardGrab(NULL);
|
SDL_GetWindowKeyboardGrab(NULL);
|
||||||
SDLTest_AssertPass("Call to SDL_GetWindowKeyboardGrab(window=NULL)");
|
SDLTest_AssertPass("Call to SDL_GetWindowKeyboardGrab(window=NULL)");
|
||||||
_checkInvalidWindowError();
|
_checkInvalidWindowError();
|
||||||
|
|
||||||
|
|
|
@ -1117,7 +1117,6 @@ static SDL_bool render(void)
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int fsaa, accel;
|
|
||||||
int done;
|
int done;
|
||||||
SDL_DisplayMode mode;
|
SDL_DisplayMode mode;
|
||||||
SDL_Event event;
|
SDL_Event event;
|
||||||
|
@ -1127,10 +1126,6 @@ int main(int argc, char *argv[])
|
||||||
/* Enable standard application logging */
|
/* Enable standard application logging */
|
||||||
SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
|
SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
|
||||||
|
|
||||||
/* Initialize parameters */
|
|
||||||
fsaa = 0;
|
|
||||||
accel = -1;
|
|
||||||
|
|
||||||
/* Initialize test framework */
|
/* Initialize test framework */
|
||||||
state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);
|
state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);
|
||||||
if(!state)
|
if(!state)
|
||||||
|
|
Loading…
Reference in New Issue