SDL
2.0
|
Go to the source code of this file.
Functions | |
SDL_Window * | _createVideoSuiteTestWindow (const char *title) |
void | _destroyVideoSuiteTestWindow (SDL_Window *window) |
int | video_enableDisableScreensaver (void *arg) |
Enable and disable screensaver while checking state. More... | |
int | video_createWindowVariousPositions (void *arg) |
Tests the functionality of the SDL_CreateWindow function using different positions. More... | |
int | video_createWindowVariousSizes (void *arg) |
Tests the functionality of the SDL_CreateWindow function using different sizes. More... | |
int | video_createWindowVariousFlags (void *arg) |
Tests the functionality of the SDL_CreateWindow function using different flags. More... | |
int | video_getWindowFlags (void *arg) |
Tests the functionality of the SDL_GetWindowFlags function. More... | |
int | video_getNumDisplayModes (void *arg) |
Tests the functionality of the SDL_GetNumDisplayModes function. More... | |
int | video_getNumDisplayModesNegative (void *arg) |
Tests negative call to SDL_GetNumDisplayModes function. More... | |
int | video_getClosestDisplayModeCurrentResolution (void *arg) |
Tests the functionality of the SDL_GetClosestDisplayMode function against current resolution. More... | |
int | video_getClosestDisplayModeRandomResolution (void *arg) |
Tests the functionality of the SDL_GetClosestDisplayMode function against random resolution. More... | |
int | video_getWindowBrightness (void *arg) |
Tests call to SDL_GetWindowBrightness. More... | |
int | video_getWindowBrightnessNegative (void *arg) |
Tests call to SDL_GetWindowBrightness with invalid input. More... | |
int | video_getWindowDisplayMode (void *arg) |
Tests call to SDL_GetWindowDisplayMode. More... | |
void | _checkInvalidWindowError () |
int | video_getWindowDisplayModeNegative (void *arg) |
Tests call to SDL_GetWindowDisplayMode with invalid input. More... | |
int | video_getWindowGammaRamp (void *arg) |
Tests call to SDL_GetWindowGammaRamp. More... | |
int | video_getWindowGammaRampNegative (void *arg) |
Tests call to SDL_GetWindowGammaRamp with invalid input. More... | |
void | _setAndCheckWindowGrabState (SDL_Window *window, SDL_bool desiredState) |
int | video_getSetWindowGrab (void *arg) |
Tests call to SDL_GetWindowGrab and SDL_SetWindowGrab. More... | |
int | video_getWindowId (void *arg) |
Tests call to SDL_GetWindowID and SDL_GetWindowFromID. More... | |
int | video_getWindowPixelFormat (void *arg) |
Tests call to SDL_GetWindowPixelFormat. More... | |
int | video_getSetWindowPosition (void *arg) |
Tests call to SDL_GetWindowPosition and SDL_SetWindowPosition. More... | |
void | _checkInvalidParameterError () |
int | video_getSetWindowSize (void *arg) |
Tests call to SDL_GetWindowSize and SDL_SetWindowSize. More... | |
int | video_getSetWindowMinimumSize (void *arg) |
Tests call to SDL_GetWindowMinimumSize and SDL_SetWindowMinimumSize. More... | |
int | video_getSetWindowMaximumSize (void *arg) |
Tests call to SDL_GetWindowMaximumSize and SDL_SetWindowMaximumSize. More... | |
int | video_getSetWindowData (void *arg) |
Tests call to SDL_SetWindowData and SDL_GetWindowData. More... | |
void _checkInvalidParameterError | ( | ) |
Definition at line 1051 of file testautomation_video.c.
References NULL, SDL_ClearError, SDL_GetError, SDL_strlen, SDL_strncmp, SDLTest_AssertCheck(), and SDLTest_AssertPass().
Referenced by video_getSetWindowData(), video_getSetWindowMaximumSize(), video_getSetWindowMinimumSize(), and video_getSetWindowSize().
void _checkInvalidWindowError | ( | ) |
Definition at line 599 of file testautomation_video.c.
References NULL, SDL_ClearError, SDL_GetError, SDL_strcmp, SDLTest_AssertCheck(), and SDLTest_AssertPass().
Referenced by video_getSetWindowData(), video_getSetWindowGrab(), video_getSetWindowMaximumSize(), video_getSetWindowMinimumSize(), video_getSetWindowPosition(), video_getSetWindowSize(), video_getWindowDisplayModeNegative(), video_getWindowGammaRampNegative(), video_getWindowId(), and video_getWindowPixelFormat().
SDL_Window* _createVideoSuiteTestWindow | ( | const char * | title | ) |
Video test suite
Definition at line 26 of file testautomation_video.c.
References NULL, SDL_CreateWindow, SDL_WINDOW_BORDERLESS, SDL_WINDOW_RESIZABLE, SDL_WINDOW_SHOWN, SDLTest_AssertCheck(), SDLTest_AssertPass(), and SDLTest_RandomIntegerInRange().
Referenced by video_getSetWindowData(), video_getSetWindowGrab(), video_getSetWindowMaximumSize(), video_getSetWindowMinimumSize(), video_getSetWindowPosition(), video_getSetWindowSize(), video_getWindowBrightness(), video_getWindowDisplayMode(), video_getWindowDisplayModeNegative(), video_getWindowFlags(), video_getWindowGammaRamp(), video_getWindowId(), and video_getWindowPixelFormat().
void _destroyVideoSuiteTestWindow | ( | SDL_Window * | window | ) |
Definition at line 49 of file testautomation_video.c.
References NULL, SDL_DestroyWindow, and SDLTest_AssertPass().
Referenced by video_createWindowVariousFlags(), video_createWindowVariousPositions(), video_createWindowVariousSizes(), video_getSetWindowData(), video_getSetWindowGrab(), video_getSetWindowMaximumSize(), video_getSetWindowMinimumSize(), video_getSetWindowPosition(), video_getSetWindowSize(), video_getWindowBrightness(), video_getWindowDisplayMode(), video_getWindowDisplayModeNegative(), video_getWindowFlags(), video_getWindowGammaRamp(), video_getWindowId(), and video_getWindowPixelFormat().
void _setAndCheckWindowGrabState | ( | SDL_Window * | window, |
SDL_bool | desiredState | ||
) |
Definition at line 749 of file testautomation_video.c.
References SDL_FALSE, SDL_GetWindowGrab, SDL_SetWindowGrab, SDLTest_AssertCheck(), and SDLTest_AssertPass().
Referenced by video_getSetWindowGrab().
int video_createWindowVariousFlags | ( | void * | arg | ) |
Tests the functionality of the SDL_CreateWindow function using different flags.
Definition at line 254 of file testautomation_video.c.
References _destroyVideoSuiteTestWindow(), NULL, SDL_CreateWindow, SDL_WINDOW_BORDERLESS, SDL_WINDOW_FOREIGN, SDL_WINDOW_FULLSCREEN, SDL_WINDOW_FULLSCREEN_DESKTOP, SDL_WINDOW_HIDDEN, SDL_WINDOW_INPUT_FOCUS, SDL_WINDOW_INPUT_GRABBED, SDL_WINDOW_MAXIMIZED, SDL_WINDOW_MINIMIZED, SDL_WINDOW_MOUSE_FOCUS, SDL_WINDOW_OPENGL, SDL_WINDOW_RESIZABLE, SDL_WINDOW_SHOWN, SDLTest_AssertCheck(), SDLTest_AssertPass(), SDLTest_RandomIntegerInRange(), and TEST_COMPLETED.
int video_createWindowVariousPositions | ( | void * | arg | ) |
Tests the functionality of the SDL_CreateWindow function using different positions.
Definition at line 116 of file testautomation_video.c.
References _destroyVideoSuiteTestWindow(), NULL, SDL_CreateWindow, SDL_WINDOW_SHOWN, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_UNDEFINED, SDLTest_AssertCheck(), SDLTest_AssertPass(), SDLTest_RandomIntegerInRange(), and TEST_COMPLETED.
int video_createWindowVariousSizes | ( | void * | arg | ) |
Tests the functionality of the SDL_CreateWindow function using different sizes.
Definition at line 197 of file testautomation_video.c.
References _destroyVideoSuiteTestWindow(), NULL, SDL_CreateWindow, SDL_WINDOW_SHOWN, SDLTest_AssertCheck(), SDLTest_AssertPass(), SDLTest_RandomIntegerInRange(), and TEST_COMPLETED.
int video_enableDisableScreensaver | ( | void * | arg | ) |
Enable and disable screensaver while checking state.
Definition at line 64 of file testautomation_video.c.
References SDL_DisableScreenSaver, SDL_EnableScreenSaver, SDL_FALSE, SDL_IsScreenSaverEnabled, SDL_TRUE, SDLTest_AssertCheck(), SDLTest_AssertPass(), and TEST_COMPLETED.
int video_getClosestDisplayModeCurrentResolution | ( | void * | arg | ) |
Tests the functionality of the SDL_GetClosestDisplayMode function against current resolution.
Definition at line 417 of file testautomation_video.c.
References SDL_DisplayMode::driverdata, SDL_DisplayMode::format, SDL_DisplayMode::h, i, NULL, SDL_DisplayMode::refresh_rate, SDL_GetClosestDisplayMode, SDL_GetDisplayMode, SDL_GetNumVideoDisplays, SDLTest_AssertCheck(), SDLTest_AssertPass(), SDLTest_Log(), TEST_ABORTED, TEST_COMPLETED, and SDL_DisplayMode::w.
int video_getClosestDisplayModeRandomResolution | ( | void * | arg | ) |
Tests the functionality of the SDL_GetClosestDisplayMode function against random resolution.
Definition at line 473 of file testautomation_video.c.
References SDL_DisplayMode::driverdata, SDL_DisplayMode::format, SDL_DisplayMode::h, i, SDL_DisplayMode::refresh_rate, SDL_GetClosestDisplayMode, SDL_GetNumVideoDisplays, SDLTest_AssertPass(), SDLTest_Log(), SDLTest_RandomIntegerInRange(), TEST_COMPLETED, and SDL_DisplayMode::w.
int video_getNumDisplayModes | ( | void * | arg | ) |
Tests the functionality of the SDL_GetNumDisplayModes function.
Definition at line 359 of file testautomation_video.c.
References i, SDL_GetNumDisplayModes, SDL_GetNumVideoDisplays, SDLTest_AssertCheck(), SDLTest_AssertPass(), and TEST_COMPLETED.
int video_getNumDisplayModesNegative | ( | void * | arg | ) |
Tests negative call to SDL_GetNumDisplayModes function.
Definition at line 383 of file testautomation_video.c.
References SDL_FALSE, SDL_GetNumDisplayModes, SDL_GetNumVideoDisplays, SDLTest_AssertCheck(), SDLTest_AssertPass(), SDLTest_RandomIntegerInRange(), SDLTest_RandomSint32BoundaryValue(), and TEST_COMPLETED.
int video_getSetWindowData | ( | void * | arg | ) |
Tests call to SDL_SetWindowData and SDL_GetWindowData.
Definition at line 1515 of file testautomation_video.c.
References _checkInvalidParameterError(), _checkInvalidWindowError(), _createVideoSuiteTestWindow(), _destroyVideoSuiteTestWindow(), cleanup(), iteration(), NULL, SDL_ClearError, SDL_free, SDL_GetWindowData, SDL_SetWindowData, SDL_strcmp, SDL_strdup, SDLTest_AssertCheck(), SDLTest_AssertPass(), SDLTest_RandomAsciiStringOfSize(), SDLTest_RandomIntegerInRange(), TEST_ABORTED, and TEST_COMPLETED.
int video_getSetWindowGrab | ( | void * | arg | ) |
Tests call to SDL_GetWindowGrab and SDL_SetWindowGrab.
Definition at line 774 of file testautomation_video.c.
References _checkInvalidWindowError(), _createVideoSuiteTestWindow(), _destroyVideoSuiteTestWindow(), _setAndCheckWindowGrabState(), NULL, SDL_FALSE, SDL_GetWindowGrab, SDL_SetWindowGrab, SDL_TRUE, SDLTest_AssertCheck(), SDLTest_AssertPass(), TEST_ABORTED, and TEST_COMPLETED.
int video_getSetWindowMaximumSize | ( | void * | arg | ) |
Tests call to SDL_GetWindowMaximumSize and SDL_SetWindowMaximumSize.
Definition at line 1377 of file testautomation_video.c.
References _checkInvalidParameterError(), _checkInvalidWindowError(), _createVideoSuiteTestWindow(), _destroyVideoSuiteTestWindow(), SDL_Rect::h, NULL, SDL_ClearError, SDL_GetDisplayBounds, SDL_GetWindowMaximumSize, SDL_SetWindowMaximumSize, SDLTest_AssertCheck(), SDLTest_AssertPass(), SDLTest_RandomIntegerInRange(), SDLTest_RandomSint32(), TEST_ABORTED, TEST_COMPLETED, and SDL_Rect::w.
int video_getSetWindowMinimumSize | ( | void * | arg | ) |
Tests call to SDL_GetWindowMinimumSize and SDL_SetWindowMinimumSize.
Definition at line 1238 of file testautomation_video.c.
References _checkInvalidParameterError(), _checkInvalidWindowError(), _createVideoSuiteTestWindow(), _destroyVideoSuiteTestWindow(), SDL_Rect::h, NULL, SDL_ClearError, SDL_GetDisplayBounds, SDL_GetWindowMinimumSize, SDL_SetWindowMinimumSize, SDLTest_AssertCheck(), SDLTest_AssertPass(), SDLTest_RandomIntegerInRange(), SDLTest_RandomSint32(), TEST_ABORTED, TEST_COMPLETED, and SDL_Rect::w.
int video_getSetWindowPosition | ( | void * | arg | ) |
Tests call to SDL_GetWindowPosition and SDL_SetWindowPosition.
Definition at line 933 of file testautomation_video.c.
References _checkInvalidWindowError(), _createVideoSuiteTestWindow(), _destroyVideoSuiteTestWindow(), NULL, SDL_ClearError, SDL_GetWindowPosition, SDL_SetWindowPosition, SDLTest_AssertCheck(), SDLTest_AssertPass(), SDLTest_RandomIntegerInRange(), SDLTest_RandomSint32(), TEST_ABORTED, and TEST_COMPLETED.
int video_getSetWindowSize | ( | void * | arg | ) |
Tests call to SDL_GetWindowSize and SDL_SetWindowSize.
Definition at line 1076 of file testautomation_video.c.
References _checkInvalidParameterError(), _checkInvalidWindowError(), _createVideoSuiteTestWindow(), _destroyVideoSuiteTestWindow(), SDL_Rect::h, NULL, SDL_ClearError, SDL_GetDisplayBounds, SDL_GetWindowSize, SDL_SetWindowSize, SDLTest_AssertCheck(), SDLTest_AssertPass(), SDLTest_RandomIntegerInRange(), SDLTest_RandomSint32(), TEST_ABORTED, TEST_COMPLETED, and SDL_Rect::w.
int video_getWindowBrightness | ( | void * | arg | ) |
Tests call to SDL_GetWindowBrightness.
Definition at line 514 of file testautomation_video.c.
References _createVideoSuiteTestWindow(), _destroyVideoSuiteTestWindow(), NULL, SDL_GetWindowBrightness, SDLTest_AssertCheck(), SDLTest_AssertPass(), and TEST_COMPLETED.
int video_getWindowBrightnessNegative | ( | void * | arg | ) |
Tests call to SDL_GetWindowBrightness with invalid input.
Definition at line 540 of file testautomation_video.c.
References NULL, SDL_GetError, SDL_GetWindowBrightness, SDL_strcmp, SDLTest_AssertCheck(), SDLTest_AssertPass(), and TEST_COMPLETED.
int video_getWindowDisplayMode | ( | void * | arg | ) |
Tests call to SDL_GetWindowDisplayMode.
Definition at line 569 of file testautomation_video.c.
References _createVideoSuiteTestWindow(), _destroyVideoSuiteTestWindow(), SDL_DisplayMode::h, NULL, SDL_DisplayMode::refresh_rate, SDL_GetWindowDisplayMode, SDLTest_AssertCheck(), SDLTest_AssertPass(), TEST_COMPLETED, and SDL_DisplayMode::w.
int video_getWindowDisplayModeNegative | ( | void * | arg | ) |
Tests call to SDL_GetWindowDisplayMode with invalid input.
Definition at line 623 of file testautomation_video.c.
References _checkInvalidWindowError(), _createVideoSuiteTestWindow(), _destroyVideoSuiteTestWindow(), NULL, SDL_GetError, SDL_GetWindowDisplayMode, SDL_strcmp, SDLTest_AssertCheck(), SDLTest_AssertPass(), and TEST_COMPLETED.
int video_getWindowFlags | ( | void * | arg | ) |
Tests the functionality of the SDL_GetWindowFlags function.
Definition at line 331 of file testautomation_video.c.
References _createVideoSuiteTestWindow(), _destroyVideoSuiteTestWindow(), NULL, SDL_GetWindowFlags, SDL_WINDOW_SHOWN, SDLTest_AssertCheck(), SDLTest_AssertPass(), and TEST_COMPLETED.
int video_getWindowGammaRamp | ( | void * | arg | ) |
Tests call to SDL_GetWindowGammaRamp.
Definition at line 667 of file testautomation_video.c.
References _createVideoSuiteTestWindow(), _destroyVideoSuiteTestWindow(), NULL, red, SDL_GetWindowGammaRamp, SDLTest_AssertCheck(), SDLTest_AssertPass(), TEST_ABORTED, and TEST_COMPLETED.
int video_getWindowGammaRampNegative | ( | void * | arg | ) |
Tests call to SDL_GetWindowGammaRamp with invalid input.
Definition at line 728 of file testautomation_video.c.
References _checkInvalidWindowError(), NULL, red, SDL_ClearError, SDL_GetWindowGammaRamp, SDLTest_AssertCheck(), SDLTest_AssertPass(), and TEST_COMPLETED.
int video_getWindowId | ( | void * | arg | ) |
Tests call to SDL_GetWindowID and SDL_GetWindowFromID.
Definition at line 843 of file testautomation_video.c.
References _checkInvalidWindowError(), _createVideoSuiteTestWindow(), _destroyVideoSuiteTestWindow(), NULL, SDL_ClearError, SDL_GetWindowFromID, SDL_GetWindowID, SDLTest_AssertCheck(), SDLTest_AssertPass(), SDLTest_RandomIntegerInRange(), TEST_ABORTED, and TEST_COMPLETED.
int video_getWindowPixelFormat | ( | void * | arg | ) |
Tests call to SDL_GetWindowPixelFormat.
Definition at line 898 of file testautomation_video.c.
References _checkInvalidWindowError(), _createVideoSuiteTestWindow(), _destroyVideoSuiteTestWindow(), NULL, SDL_ClearError, SDL_GetWindowPixelFormat, SDL_PIXELFORMAT_UNKNOWN, SDLTest_AssertCheck(), SDLTest_AssertPass(), TEST_ABORTED, and TEST_COMPLETED.
|
static |
Definition at line 1727 of file testautomation_video.c.
|
static |
Definition at line 1754 of file testautomation_video.c.
|
static |
Definition at line 1757 of file testautomation_video.c.
|
static |
Definition at line 1760 of file testautomation_video.c.
|
static |
Definition at line 1763 of file testautomation_video.c.
|
static |
Definition at line 1766 of file testautomation_video.c.
|
static |
Definition at line 1769 of file testautomation_video.c.
|
static |
Definition at line 1772 of file testautomation_video.c.
|
static |
Definition at line 1775 of file testautomation_video.c.
|
static |
Definition at line 1778 of file testautomation_video.c.
|
static |
Definition at line 1781 of file testautomation_video.c.
|
static |
Definition at line 1730 of file testautomation_video.c.
|
static |
Definition at line 1784 of file testautomation_video.c.
|
static |
Definition at line 1787 of file testautomation_video.c.
|
static |
Definition at line 1790 of file testautomation_video.c.
|
static |
Definition at line 1793 of file testautomation_video.c.
|
static |
Definition at line 1733 of file testautomation_video.c.
|
static |
Definition at line 1736 of file testautomation_video.c.
|
static |
Definition at line 1739 of file testautomation_video.c.
|
static |
Definition at line 1742 of file testautomation_video.c.
|
static |
Definition at line 1745 of file testautomation_video.c.
|
static |
Definition at line 1748 of file testautomation_video.c.
|
static |
Definition at line 1751 of file testautomation_video.c.
|
static |
Definition at line 1797 of file testautomation_video.c.
SDLTest_TestSuiteReference videoTestSuite |
Definition at line 1806 of file testautomation_video.c.