37 SDLTest_AssertCheck(numkeys >= 0,
"Validate that value of numkeys is >= 0, got: %i", numkeys);
113 const char *expectedError =
"Parameter 'scancode' is invalid";
120 "Validate error message, expected: '%s', got: '%s'", expectedError, error);
205 expected =
"BrightnessUp";
212 expected =
"Keypad MemStore";
334 if (currentState != 0) {
385 SDLTest_AssertPass(
"Call to SDL_SetTextInputRect with refRect(x:%i,y:%i,w:%i,h:%i)", refRect.
x, refRect.
y, refRect.
w, refRect.
h);
387 (refRect.
x == testRect.
x) && (refRect.
y == testRect.
y) && (refRect.
w == testRect.
w) && (refRect.
h == testRect.
h),
388 "Check that input data was not modified, expected: x:%i,y:%i,w:%i,h:%i, got: x:%i,y:%i,w:%i,h:%i",
389 refRect.
x, refRect.
y, refRect.
w, refRect.
h,
390 testRect.
x, testRect.
y, testRect.
w, testRect.
h);
482#if SDL_VIDEO_DRIVER_WINDOWS || SDL_VIDEO_DRIVER_ANDROID || SDL_VIDEO_DRIVER_COCOA
483 const char *expectedError =
"Parameter 'rect' is invalid";
495#if SDL_VIDEO_DRIVER_WINDOWS || SDL_VIDEO_DRIVER_ANDROID || SDL_VIDEO_DRIVER_COCOA
501 "Validate error message, expected: '%s', got: '%s'", expectedError, error);
530 SDLTest_AssertCheck(scancode == 0,
"Validate return value from SDL_GetScancodeFromKey, expected: 0, got: %i", scancode);
595 const char *expectedError =
"Parameter 'name' is invalid";
602 "Validate error message, expected: '%s', got: '%s'", expectedError, error);
#define SDL_GetKeyFromName
#define SDL_GetScancodeName
#define SDL_GetKeyboardFocus
#define SDL_GetKeyFromScancode
#define SDL_SetTextInputRect
#define SDL_StartTextInput
#define SDL_StopTextInput
#define SDL_GetScancodeFromName
#define SDL_GetKeyboardState
#define SDL_GetScancodeFromKey
Sint32 SDL_Keycode
The SDL virtual key representation.
SDL_Keymod
Enumeration of valid key mods (possibly OR'd together).
GLuint const GLchar * name
SDL_Scancode
The SDL keyboard scancode representation.
void SDLTest_AssertPass(SDL_PRINTF_FORMAT_STRING const char *assertDescription,...) SDL_PRINTF_VARARG_FUNC(1)
Explicitly pass without checking an assertion condition. Updates assertion counter.
void SDLTest_Assert(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription,...) SDL_PRINTF_VARARG_FUNC(2)
Assert that logs and break execution flow on failures.
int SDLTest_AssertCheck(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription,...) SDL_PRINTF_VARARG_FUNC(2)
Assert for test cases that logs but does not break execution flow on failures. Updates assertion coun...
Sint32 SDLTest_RandomIntegerInRange(Sint32 min, Sint32 max)
char * SDLTest_RandomAsciiStringOfSize(int size)
int(* SDLTest_TestCaseFp)(void *arg)
EGLSurface EGLNativeWindowType * window
A rectangle, with the origin at the upper left (integer).
The type used to identify a window.
int keyboard_setTextInputRect(void *arg)
Check call to SDL_SetTextInputRect.
int keyboard_getKeyFromScancode(void *arg)
Check call to SDL_GetKeyFromScancode.
int keyboard_getKeyFromName(void *arg)
Check call to SDL_GetKeyFromName for known, unknown and invalid name.
int keyboard_getKeyNameNegative(void *arg)
SDL_GetKeyName negative cases.
static const SDLTest_TestCaseReference keyboardTest6
int keyboard_getScancodeFromKey(void *arg)
Check call to SDL_GetScancodeFromKey.
static const SDLTest_TestCaseReference keyboardTest5
static const SDLTest_TestCaseReference keyboardTest2
static const SDLTest_TestCaseReference keyboardTest8
static const SDLTest_TestCaseReference keyboardTest4
SDLTest_TestSuiteReference keyboardTestSuite
void _checkInvalidScancodeError()
int keyboard_getKeyName(void *arg)
Check call to SDL_GetKeyName.
static const SDLTest_TestCaseReference keyboardTest9
static const SDLTest_TestCaseReference keyboardTest3
int keyboard_getSetModState(void *arg)
Check call to SDL_GetModState and SDL_SetModState.
void _testSetTextInputRect(SDL_Rect refRect)
static const SDLTest_TestCaseReference keyboardTest10
int keyboard_getScancodeNameNegative(void *arg)
SDL_GetScancodeName negative cases.
int keyboard_getKeyboardState(void *arg)
Check call to SDL_GetKeyboardState with and without numkeys reference.
int keyboard_startStopTextInput(void *arg)
Check call to SDL_StartTextInput and SDL_StopTextInput.
int keyboard_getScancodeFromNameNegative(void *arg)
Check call to SDL_GetScancodeFromName with invalid data.
static const SDLTest_TestCaseReference keyboardTest14
static const SDLTest_TestCaseReference keyboardTest7
static const SDLTest_TestCaseReference keyboardTest11
void _checkInvalidNameError()
int keyboard_setTextInputRectNegative(void *arg)
Check call to SDL_SetTextInputRect with invalid data.
static const SDLTest_TestCaseReference keyboardTest13
int keyboard_getScancodeFromName(void *arg)
Check call to SDL_GetScancodeFromName.
int keyboard_getKeyboardFocus(void *arg)
Check call to SDL_GetKeyboardFocus.
static const SDLTest_TestCaseReference keyboardTest12
static const SDLTest_TestCaseReference * keyboardTests[]
static const SDLTest_TestCaseReference keyboardTest1