test: remove unused variables and typedefs

This commit is contained in:
Christian Rauch 2021-03-26 22:49:28 +00:00 committed by Sam Lantinga
parent 3f25704592
commit b972258d56
6 changed files with 17 additions and 29 deletions

View File

@ -21,8 +21,7 @@
int
clipboard_testHasClipboardText(void *arg)
{
SDL_bool result;
result = SDL_HasClipboardText();
SDL_HasClipboardText();
SDLTest_AssertPass("Call to SDL_HasClipboardText succeeded");
return TEST_COMPLETED;

View File

@ -47,10 +47,8 @@ keyboard_getKeyboardState(void *arg)
int
keyboard_getKeyboardFocus(void *arg)
{
SDL_Window* window;
/* Call, but ignore return value */
window = SDL_GetKeyboardFocus();
SDL_GetKeyboardFocus();
SDLTest_AssertPass("Call to SDL_GetKeyboardFocus()");
return TEST_COMPLETED;

View File

@ -160,38 +160,36 @@ int platform_testGetFunctions (void *arg)
*/
int platform_testHasFunctions (void *arg)
{
int ret;
/* TODO: independently determine and compare values as well */
ret = SDL_HasRDTSC();
SDL_HasRDTSC();
SDLTest_AssertPass("SDL_HasRDTSC()");
ret = SDL_HasAltiVec();
SDL_HasAltiVec();
SDLTest_AssertPass("SDL_HasAltiVec()");
ret = SDL_HasMMX();
SDL_HasMMX();
SDLTest_AssertPass("SDL_HasMMX()");
ret = SDL_Has3DNow();
SDL_Has3DNow();
SDLTest_AssertPass("SDL_Has3DNow()");
ret = SDL_HasSSE();
SDL_HasSSE();
SDLTest_AssertPass("SDL_HasSSE()");
ret = SDL_HasSSE2();
SDL_HasSSE2();
SDLTest_AssertPass("SDL_HasSSE2()");
ret = SDL_HasSSE3();
SDL_HasSSE3();
SDLTest_AssertPass("SDL_HasSSE3()");
ret = SDL_HasSSE41();
SDL_HasSSE41();
SDLTest_AssertPass("SDL_HasSSE41()");
ret = SDL_HasSSE42();
SDL_HasSSE42();
SDLTest_AssertPass("SDL_HasSSE42()");
ret = SDL_HasAVX();
SDL_HasAVX();
SDLTest_AssertPass("SDL_HasAVX()");
return TEST_COMPLETED;

View File

@ -89,7 +89,6 @@ int
sdltest_randomNumber(void *arg)
{
Sint64 result;
Uint64 uresult;
double dresult;
Uint64 umax;
Sint64 min, max;
@ -127,7 +126,7 @@ sdltest_randomNumber(void *arg)
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);
uresult = SDLTest_RandomUint64();
SDLTest_RandomUint64();
SDLTest_AssertPass("Call to SDLTest_RandomUint64");
result = SDLTest_RandomSint64();

View File

@ -477,7 +477,6 @@ video_getClosestDisplayModeRandomResolution(void *arg)
{
SDL_DisplayMode target;
SDL_DisplayMode closest;
SDL_DisplayMode* dResult;
int displayNum;
int i;
int variation;
@ -500,7 +499,7 @@ video_getClosestDisplayModeRandomResolution(void *arg)
target.driverdata = 0;
/* 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);
}
}
@ -830,7 +829,7 @@ video_getSetWindowGrab(void *arg)
{
const char* title = "video_getSetWindowGrab Test Window";
SDL_Window* window;
SDL_bool originalMouseState, originalKeyboardState, dummyState;
SDL_bool originalMouseState, originalKeyboardState;
/* Call against new test window */
window = _createVideoSuiteTestWindow(title);
@ -927,11 +926,11 @@ video_getSetWindowGrab(void *arg)
"SDL_GetWindowKeyboardGrab() should return SDL_FALSE");
/* Negative tests */
dummyState = SDL_GetWindowGrab(NULL);
SDL_GetWindowGrab(NULL);
SDLTest_AssertPass("Call to SDL_GetWindowGrab(window=NULL)");
_checkInvalidWindowError();
dummyState = SDL_GetWindowKeyboardGrab(NULL);
SDL_GetWindowKeyboardGrab(NULL);
SDLTest_AssertPass("Call to SDL_GetWindowKeyboardGrab(window=NULL)");
_checkInvalidWindowError();

View File

@ -1117,7 +1117,6 @@ static SDL_bool render(void)
int main(int argc, char *argv[])
{
int fsaa, accel;
int done;
SDL_DisplayMode mode;
SDL_Event event;
@ -1127,10 +1126,6 @@ int main(int argc, char *argv[])
/* Enable standard application logging */
SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Initialize parameters */
fsaa = 0;
accel = -1;
/* Initialize test framework */
state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);
if(!state)