9 #if defined(_MSC_VER) && _MSC_VER <= 1500 10 #define UINT8_MAX ~(Uint8)0 11 #define UINT16_MAX ~(Uint16)0 12 #define UINT32_MAX ~(Uint32)0 13 #define UINT64_MAX ~(Uint64)0 40 SDLTest_AssertPass(
"Call to SDL_CreateWindow('Title',%d,%d,%d,%d,%d)", x, y, w, h, flags);
119 const char* title =
"video_createWindowVariousPositions Test Window";
121 int xVariation, yVariation;
123 for (xVariation = 0; xVariation < 6; xVariation++) {
124 for (yVariation = 0; yVariation < 6; yVariation++) {
182 SDLTest_AssertPass(
"Call to SDL_CreateWindow('Title',%d,%d,%d,%d,SHOWN)", x, y, w, h);
200 const char* title =
"video_createWindowVariousSizes Test Window";
202 int wVariation, hVariation;
206 for (wVariation = 0; wVariation < 3; wVariation++) {
207 for (hVariation = 0; hVariation < 3; hVariation++) {
239 SDLTest_AssertPass(
"Call to SDL_CreateWindow('Title',%d,%d,%d,%d,SHOWN)", x, y, w, h);
257 const char* title =
"video_createWindowVariousFlags Test Window";
268 for (fVariation = 0; fVariation < 13; fVariation++) {
316 SDLTest_AssertPass(
"Call to SDL_CreateWindow('Title',%d,%d,%d,%d,%d)", x, y, w, h, flags);
334 const char* title =
"video_getWindowFlags Test Window";
343 if (window !=
NULL) {
346 SDLTest_AssertCheck((flags & actualFlags) == flags,
"Verify returned value has flags %d set, got: %d", flags, actualFlags);
370 for (i=0; i<displayNum; i++) {
373 SDLTest_AssertCheck(result >= 1,
"Validate returned value from function; expected: >=1; got: %d", result);
396 SDLTest_AssertPass(
"Call to SDL_GetNumDisplayModes(%d=out-of-bounds/boundary)", displayIndex);
397 SDLTest_AssertCheck(result < 0,
"Validate returned value from function; expected: <0; got: %d", result);
402 SDLTest_AssertPass(
"Call to SDL_GetNumDisplayModes(%d=out-of-bounds/large negative)", displayIndex);
403 SDLTest_AssertCheck(result < 0,
"Validate returned value from function; expected: <0; got: %d", result);
407 SDLTest_AssertPass(
"Call to SDL_GetNumDisplayModes(%d=out-of-bounds/large positive)", displayIndex);
408 SDLTest_AssertCheck(result < 0,
"Validate returned value from function; expected: <0; got: %d", result);
433 for (i=0; i<displayNum; i++) {
445 target.
w = current.
w;
446 target.
h = current.
h;
447 for (variation = 0; variation < 8; variation ++) {
455 SDLTest_AssertPass(
"Call to SDL_GetClosestDisplayMode(target=current/variation%d)", variation);
459 SDLTest_AssertCheck(closest.
w == current.
w,
"Verify returned width matches current width; expected: %d, got: %d", current.
w, closest.
w);
460 SDLTest_AssertCheck(closest.
h == current.
h,
"Verify returned height matches current height; expected: %d, got: %d", current.
h, closest.
h);
461 SDLTest_AssertCheck(closest.
w == dResult->
w,
"Verify return value matches assigned value; expected: %d, got: %d", closest.
w, dResult->
w);
462 SDLTest_AssertCheck(closest.
h == dResult->
h,
"Verify return value matches assigned value; expected: %d, got: %d", closest.
h, dResult->
h);
487 for (i=0; i<displayNum; i++) {
490 for (variation = 0; variation < 16; variation ++) {
501 SDLTest_AssertPass(
"Call to SDL_GetClosestDisplayMode(target=random/variation%d)", variation);
517 const char* title =
"video_getWindowBrightness Test Window";
522 if (window !=
NULL) {
525 SDLTest_AssertCheck(result >= 0.0 && result <= 1.0,
"Validate range of result value; expected: [0.0, 1.0], got: %f", result);
542 const char *invalidWindowError =
"Invalid window";
549 SDLTest_AssertCheck(result == 1.0,
"Validate result value; expected: 1.0, got: %f", result);
553 if (lastError !=
NULL) {
555 "SDL_GetError(): expected message '%s', was message: '%s'",
572 const char* title =
"video_getWindowDisplayMode Test Window";
583 if (window !=
NULL) {
601 const char *invalidWindowError =
"Invalid window";
607 if (lastError !=
NULL) {
609 "SDL_GetError(): expected message '%s', was message: '%s'",
625 const char *expectedError =
"Parameter 'mode' is invalid";
628 const char* title =
"video_getWindowDisplayModeNegative Test Window";
634 if (window !=
NULL) {
641 if (lastError !=
NULL) {
643 "SDL_GetError(): expected message '%s', was message: '%s'",
670 const char* title =
"video_getWindowGammaRamp Test Window";
761 currentState == desiredState,
762 "Validate returned state; expected: %s, got: %s",
763 (desiredState ==
SDL_FALSE) ?
"SDL_FALSE" :
"SDL_TRUE",
764 (currentState ==
SDL_FALSE) ?
"SDL_FALSE" :
"SDL_TRUE");
776 const char* title =
"video_getSetWindowGrab Test Window";
778 SDL_bool originalState, dummyState, currentState, desiredState;
821 currentState == desiredState,
822 "Validate returned state; expected: %s, got: %s",
823 (desiredState ==
SDL_FALSE) ?
"SDL_FALSE" :
"SDL_TRUE",
824 (currentState ==
SDL_FALSE) ?
"SDL_FALSE" :
"SDL_TRUE");
845 const char* title =
"video_getWindowId Test Window";
900 const char* title =
"video_getWindowPixelFormat Test Window";
935 const char* title =
"video_getSetWindowPosition Test Window";
937 int xVariation, yVariation;
938 int referenceX, referenceY;
939 int currentX, currentY;
940 int desiredX, desiredY;
946 for (xVariation = 0; xVariation < 4; xVariation++) {
947 for (yVariation = 0; yVariation < 4; yVariation++) {
991 currentX = desiredX + 1;
992 currentY = desiredY + 1;
995 SDLTest_AssertCheck(desiredX == currentX,
"Verify returned X position; expected: %d, got: %d", desiredX, currentX);
996 SDLTest_AssertCheck(desiredY == currentY,
"Verify returned Y position; expected: %d, got: %d", desiredY, currentY);
999 currentX = desiredX + 1;
1002 SDLTest_AssertCheck(desiredX == currentX,
"Verify returned X position; expected: %d, got: %d", desiredX, currentX);
1005 currentY = desiredY + 1;
1008 SDLTest_AssertCheck(desiredY == currentY,
"Verify returned Y position; expected: %d, got: %d", desiredY, currentY);
1022 currentX = referenceX;
1023 currentY = referenceY;
1033 currentX == referenceX && currentY == referenceY,
1034 "Verify that content of X and Y pointers has not been modified; expected: %d,%d; got: %d,%d",
1035 referenceX, referenceY,
1036 currentX, currentY);
1053 const char *invalidParameterError =
"Parameter";
1059 if (lastError !=
NULL) {
1061 "SDL_GetError(): expected message starts with '%s', was message: '%s'",
1062 invalidParameterError,
1078 const char* title =
"video_getSetWindowSize Test Window";
1082 int maxwVariation, maxhVariation;
1083 int wVariation, hVariation;
1084 int referenceW, referenceH;
1085 int currentW, currentH;
1086 int desiredW, desiredH;
1108 for (wVariation = 0; wVariation < maxwVariation; wVariation++) {
1109 for (hVariation = 0; hVariation < maxhVariation; hVariation++) {
1110 switch(wVariation) {
1121 desiredW = display.
w - 1;
1125 desiredW = display.
w;
1129 desiredW = display.
w + 1;
1133 switch(hVariation) {
1144 desiredH = display.
h - 1;
1148 desiredH = display.
h;
1152 desiredH = display.
h + 1;
1161 currentW = desiredW + 1;
1162 currentH = desiredH + 1;
1165 SDLTest_AssertCheck(desiredW == currentW,
"Verify returned width; expected: %d, got: %d", desiredW, currentW);
1166 SDLTest_AssertCheck(desiredH == currentH,
"Verify returned height; expected: %d, got: %d", desiredH, currentH);
1169 currentW = desiredW + 1;
1172 SDLTest_AssertCheck(desiredW == currentW,
"Verify returned width; expected: %d, got: %d", desiredW, currentW);
1175 currentH = desiredH + 1;
1178 SDLTest_AssertCheck(desiredH == currentH,
"Verify returned height; expected: %d, got: %d", desiredH, currentH);
1189 for (desiredH = -2; desiredH < 2; desiredH++) {
1190 for (desiredW = -2; desiredW < 2; desiredW++) {
1191 if (desiredW <= 0 || desiredH <= 0) {
1205 currentW = referenceW;
1206 currentH = referenceH;
1216 currentW == referenceW && currentH == referenceH,
1217 "Verify that content of W and H pointers has not been modified; expected: %d,%d; got: %d,%d",
1218 referenceW, referenceH,
1219 currentW, currentH);
1240 const char* title =
"video_getSetWindowMinimumSize Test Window";
1244 int wVariation, hVariation;
1245 int referenceW, referenceH;
1246 int currentW, currentH;
1247 int desiredW, desiredH;
1259 for (wVariation = 0; wVariation < 5; wVariation++) {
1260 for (hVariation = 0; hVariation < 5; hVariation++) {
1261 switch(wVariation) {
1272 desiredW = display.
w;
1276 switch(hVariation) {
1287 desiredH = display.
h;
1291 desiredH = display.
h + 1;
1297 SDLTest_AssertPass(
"Call to SDL_SetWindowMinimumSize(...,%d,%d)", desiredW, desiredH);
1300 currentW = desiredW + 1;
1301 currentH = desiredH + 1;
1304 SDLTest_AssertCheck(desiredW == currentW,
"Verify returned width; expected: %d, got: %d", desiredW, currentW);
1305 SDLTest_AssertCheck(desiredH == currentH,
"Verify returned height; expected: %d, got: %d", desiredH, currentH);
1308 currentW = desiredW + 1;
1311 SDLTest_AssertCheck(desiredW == currentW,
"Verify returned width; expected: %d, got: %d", desiredW, currentH);
1314 currentH = desiredH + 1;
1317 SDLTest_AssertCheck(desiredH == currentH,
"Verify returned height; expected: %d, got: %d", desiredW, currentH);
1328 for (desiredH = -2; desiredH < 2; desiredH++) {
1329 for (desiredW = -2; desiredW < 2; desiredW++) {
1330 if (desiredW <= 0 || desiredH <= 0) {
1332 SDLTest_AssertPass(
"Call to SDL_SetWindowMinimumSize(...,%d,%d)", desiredW, desiredH);
1344 currentW = referenceW;
1345 currentH = referenceH;
1355 currentW == referenceW && currentH == referenceH,
1356 "Verify that content of W and H pointers has not been modified; expected: %d,%d; got: %d,%d",
1357 referenceW, referenceH,
1358 currentW, currentH);
1379 const char* title =
"video_getSetWindowMaximumSize Test Window";
1383 int wVariation, hVariation;
1384 int referenceW, referenceH;
1385 int currentW, currentH;
1386 int desiredW, desiredH;
1398 for (wVariation = 0; wVariation < 3; wVariation++) {
1399 for (hVariation = 0; hVariation < 3; hVariation++) {
1400 switch(wVariation) {
1411 desiredW = display.
w;
1415 switch(hVariation) {
1426 desiredH = display.
h;
1432 SDLTest_AssertPass(
"Call to SDL_SetWindowMaximumSize(...,%d,%d)", desiredW, desiredH);
1435 currentW = desiredW + 1;
1436 currentH = desiredH + 1;
1439 SDLTest_AssertCheck(desiredW == currentW,
"Verify returned width; expected: %d, got: %d", desiredW, currentW);
1440 SDLTest_AssertCheck(desiredH == currentH,
"Verify returned height; expected: %d, got: %d", desiredH, currentH);
1443 currentW = desiredW + 1;
1446 SDLTest_AssertCheck(desiredW == currentW,
"Verify returned width; expected: %d, got: %d", desiredW, currentH);
1449 currentH = desiredH + 1;
1452 SDLTest_AssertCheck(desiredH == currentH,
"Verify returned height; expected: %d, got: %d", desiredW, currentH);
1463 for (desiredH = -2; desiredH < 2; desiredH++) {
1464 for (desiredW = -2; desiredW < 2; desiredW++) {
1465 if (desiredW <= 0 || desiredH <= 0) {
1467 SDLTest_AssertPass(
"Call to SDL_SetWindowMaximumSize(...,%d,%d)", desiredW, desiredH);
1479 currentW = referenceW;
1480 currentH = referenceH;
1490 currentW == referenceW && currentH == referenceH,
1491 "Verify that content of W and H pointers has not been modified; expected: %d,%d; got: %d,%d",
1492 referenceW, referenceH,
1493 currentW, currentH);
1518 const char* title =
"video_setGetWindowData Test Window";
1520 const char *referenceName =
"TestName";
1521 const char *
name =
"TestName";
1522 const char *referenceName2 =
"TestName2";
1523 const char *name2 =
"TestName2";
1525 char *referenceUserdata =
NULL;
1526 char *userdata =
NULL;
1527 char *referenceUserdata2 =
NULL;
1528 char *userdata2 =
NULL;
1539 if (referenceUserdata ==
NULL) {
1544 if (userdata ==
NULL) {
1550 if (referenceUserdata2 ==
NULL) {
1554 userdata2 = (
char *)
SDL_strdup(referenceUserdata2);
1555 if (userdata2 ==
NULL) {
1564 SDLTest_AssertCheck(
SDL_strcmp(referenceName, name) == 0,
"Validate that name was not changed, expected: %s, got: %s", referenceName, name);
1570 SDLTest_AssertCheck(
SDL_strcmp(referenceName, name) == 0,
"Validate that name was not changed, expected: %s, got: %s", referenceName, name);
1571 SDLTest_AssertCheck(
SDL_strcmp(referenceUserdata, userdata) == 0,
"Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata);
1574 for (iteration = 1; iteration <= 2; iteration++) {
1576 SDLTest_AssertPass(
"Call to SDL_GetWindowData(..,%s) [iteration %d]", name, iteration);
1577 SDLTest_AssertCheck(
SDL_strcmp(referenceUserdata, result) == 0,
"Validate that correct result was returned; expected: %s, got: %s", referenceUserdata, result);
1578 SDLTest_AssertCheck(
SDL_strcmp(referenceName, name) == 0,
"Validate that name was not changed, expected: %s, got: %s", referenceName, name);
1582 for (iteration = 1; iteration <= 2; iteration++) {
1584 SDLTest_AssertPass(
"Call to SDL_SetWindowData(...%s,%s) [iteration %d]", name, userdata, iteration);
1585 SDLTest_AssertCheck(
SDL_strcmp(referenceUserdata, result) == 0,
"Validate that correct result was returned; expected: %s, got: %s", referenceUserdata, result);
1586 SDLTest_AssertCheck(
SDL_strcmp(referenceName, name) == 0,
"Validate that name was not changed, expected: %s, got: %s", referenceName, name);
1587 SDLTest_AssertCheck(
SDL_strcmp(referenceUserdata, userdata) == 0,
"Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata);
1593 SDLTest_AssertCheck(
SDL_strcmp(referenceUserdata, result) == 0,
"Validate that correct result was returned; expected: %s, got: %s", referenceUserdata, result);
1594 SDLTest_AssertCheck(
SDL_strcmp(referenceName, name) == 0,
"Validate that name was not changed, expected: %s, got: %s", referenceName, name);
1598 SDLTest_AssertPass(
"Call to SDL_SetWindowData(...%s,%s) [new userdata]", name, userdata2);
1599 SDLTest_AssertCheck(
SDL_strcmp(referenceUserdata, result) == 0,
"Validate that correct result was returned; expected: %s, got: %s", referenceUserdata, result);
1600 SDLTest_AssertCheck(
SDL_strcmp(referenceName, name) == 0,
"Validate that name was not changed, expected: %s, got: %s", referenceName, name);
1601 SDLTest_AssertCheck(
SDL_strcmp(referenceUserdata, userdata) == 0,
"Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata);
1602 SDLTest_AssertCheck(
SDL_strcmp(referenceUserdata2, userdata2) == 0,
"Validate that userdata2 was not changed, expected: %s, got: %s", referenceUserdata2, userdata2);
1606 SDLTest_AssertPass(
"Call to SDL_SetWindowData(...%s,%s) [new userdata again]", name, userdata2);
1607 SDLTest_AssertCheck(
SDL_strcmp(referenceUserdata2, result) == 0,
"Validate that correct result was returned; expected: %s, got: %s", referenceUserdata2, result);
1608 SDLTest_AssertCheck(
SDL_strcmp(referenceName, name) == 0,
"Validate that name was not changed, expected: %s, got: %s", referenceName, name);
1609 SDLTest_AssertCheck(
SDL_strcmp(referenceUserdata, userdata) == 0,
"Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata);
1610 SDLTest_AssertCheck(
SDL_strcmp(referenceUserdata2, userdata2) == 0,
"Validate that userdata2 was not changed, expected: %s, got: %s", referenceUserdata2, userdata2);
1615 SDLTest_AssertCheck(
SDL_strcmp(referenceUserdata2, result) == 0,
"Validate that correct result was returned; expected: %s, got: %s", referenceUserdata2, result);
1616 SDLTest_AssertCheck(
SDL_strcmp(referenceName, name) == 0,
"Validate that name was not changed, expected: %s, got: %s", referenceName, name);
1621 SDLTest_AssertCheck(
SDL_strcmp(referenceUserdata2, result) == 0,
"Validate that correct result was returned; expected: %s, got: %s", referenceUserdata2, result);
1622 SDLTest_AssertCheck(
SDL_strcmp(referenceName, name) == 0,
"Validate that name was not changed, expected: %s, got: %s", referenceName, name);
1623 SDLTest_AssertCheck(
SDL_strcmp(referenceUserdata, userdata) == 0,
"Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata);
1624 SDLTest_AssertCheck(
SDL_strcmp(referenceUserdata2, userdata2) == 0,
"Validate that userdata2 was not changed, expected: %s, got: %s", referenceUserdata2, userdata2);
1630 SDLTest_AssertCheck(
SDL_strcmp(referenceName, name) == 0,
"Validate that name was not changed, expected: %s, got: %s", referenceName, name);
1631 SDLTest_AssertCheck(
SDL_strcmp(referenceUserdata, userdata) == 0,
"Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata);
1632 SDLTest_AssertCheck(
SDL_strcmp(referenceUserdata2, userdata2) == 0,
"Validate that userdata2 was not changed, expected: %s, got: %s", referenceUserdata2, userdata2);
1638 SDLTest_AssertCheck(
SDL_strcmp(referenceName, name) == 0,
"Validate that name was not changed, expected: %s, got: %s", referenceName, name);
1644 SDLTest_AssertCheck(
SDL_strcmp(referenceName2, name2) == 0,
"Validate that name2 was not changed, expected: %s, got: %s", referenceName2, name2);
1648 SDLTest_AssertPass(
"Call to SDL_SetWindowData(...%s,%s) [again, after clear]", name, userdata);
1650 SDLTest_AssertCheck(
SDL_strcmp(referenceName, name) == 0,
"Validate that name was not changed, expected: %s, got: %s", referenceName, name);
1651 SDLTest_AssertCheck(
SDL_strcmp(referenceUserdata, userdata) == 0,
"Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata);
1656 SDLTest_AssertCheck(
SDL_strcmp(referenceUserdata, result) == 0,
"Validate that correct result was returned; expected: %s, got: %s", referenceUserdata, result);
1657 SDLTest_AssertCheck(
SDL_strcmp(referenceName, name) == 0,
"Validate that name was not changed, expected: %s, got: %s", referenceName, name);
#define SDL_SetWindowMaximumSize
static const SDLTest_TestCaseReference videoTest10
static const SDLTest_TestCaseReference videoTest18
#define SDL_GetWindowData
int video_getClosestDisplayModeCurrentResolution(void *arg)
Tests the functionality of the SDL_GetClosestDisplayMode function against current resolution...
#define SDL_WINDOWPOS_CENTERED
SDL_WindowFlags
The flags on a window.
static const SDLTest_TestCaseReference videoTest9
#define SDL_GetDisplayMode
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro pixld1_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl else error unsupported endif endm macro pixld2_s mem_operand if mov asr add asl add asl mov asr sub UNIT_X add asl mov asr add asl add asl mov asr add UNIT_X add asl else pixld1_s mem_operand pixld1_s mem_operand endif endm macro pixld0_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl endif endm macro pixld_s_internal mem_operand if mem_operand pixld2_s mem_operand pixdeinterleave basereg elseif mem_operand elseif mem_operand elseif mem_operand elseif mem_operand pixld0_s mem_operand else pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else error unsupported mem_operand if bpp mem_operand endif endm macro vuzp8 reg2 vuzp d d ®2 endm macro vzip8 reg2 vzip d d ®2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld [DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld cleanup[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro fetch_mask_pixblock pixld mask_basereg pixblock_size MASK endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp local skip1 beq endif SRC MASK if dst_r_bpp DST_R else add endif PF add sub src_basereg pixdeinterleave mask_basereg pixdeinterleave dst_r_basereg process_pixblock_head pixblock_size cache_preload_simple process_pixblock_tail pixinterleave dst_w_basereg irp beq endif process_pixblock_tail_head tst beq irp if pixblock_size chunk_size tst beq pixld_src SRC pixld MASK if DST_R else pixld DST_R endif if src_basereg pixdeinterleave mask_basereg pixdeinterleave dst_r_basereg process_pixblock_head if pixblock_size cache_preload_simple endif process_pixblock_tail pixinterleave dst_w_basereg irp if pixblock_size chunk_size tst beq if DST_W else pixst DST_W else mov ORIG_W endif add lsl if lsl endif if lsl endif lsl endif lsl endif lsl endif subs mov DST_W if regs_shortage str endif bge start_of_loop_label endm macro generate_composite_function
#define SDL_IsScreenSaverEnabled
#define SDL_SetWindowMinimumSize
static const SDLTest_TestCaseReference videoTest5
GLint GLint GLint GLint GLint x
Sint32 SDLTest_RandomIntegerInRange(Sint32 min, Sint32 max)
static const SDLTest_TestCaseReference videoTest17
int video_getWindowGammaRamp(void *arg)
Tests call to SDL_GetWindowGammaRamp.
Sint32 SDLTest_RandomSint32(void)
static const SDLTest_TestCaseReference videoTest1
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.
static const SDLTest_TestCaseReference videoTest16
SDLTest_TestSuiteReference videoTestSuite
static const SDLTest_TestCaseReference videoTest19
GLfloat GLfloat GLfloat GLfloat h
#define SDL_SetWindowSize
int video_getNumDisplayModesNegative(void *arg)
Tests negative call to SDL_GetNumDisplayModes function.
int video_getWindowDisplayModeNegative(void *arg)
Tests call to SDL_GetWindowDisplayMode with invalid input.
int video_createWindowVariousFlags(void *arg)
Tests the functionality of the SDL_CreateWindow function using different flags.
The structure that defines a display mode.
#define SDL_GetWindowFlags
int video_createWindowVariousSizes(void *arg)
Tests the functionality of the SDL_CreateWindow function using different sizes.
#define SDL_WINDOWPOS_UNDEFINED
int video_getWindowBrightnessNegative(void *arg)
Tests call to SDL_GetWindowBrightness with invalid input.
int video_getNumDisplayModes(void *arg)
Tests the functionality of the SDL_GetNumDisplayModes function.
int video_getWindowFlags(void *arg)
Tests the functionality of the SDL_GetWindowFlags function.
static const SDLTest_TestCaseReference videoTest20
static const SDLTest_TestCaseReference videoTest6
#define SDL_GetWindowGammaRamp
GLuint const GLchar * name
int video_getSetWindowSize(void *arg)
Tests call to SDL_GetWindowSize and SDL_SetWindowSize.
static const SDLTest_TestCaseReference videoTest23
#define SDL_GetNumVideoDisplays
void _setAndCheckWindowGrabState(SDL_Window *window, SDL_bool desiredState)
#define SDL_SetWindowData
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
#define SDL_GetWindowSize
int(* SDLTest_TestCaseFp)(void *arg)
static const SDLTest_TestCaseReference videoTest4
int video_enableDisableScreensaver(void *arg)
Enable and disable screensaver while checking state.
void _checkInvalidWindowError()
char * SDLTest_RandomAsciiStringOfSize(int size)
#define SDL_GetWindowDisplayMode
#define SDL_SetWindowGrab
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...
static const SDLTest_TestCaseReference videoTest22
#define SDL_DisableScreenSaver
static const SDLTest_TestCaseReference * videoTests[]
static const SDLTest_TestCaseReference videoTest2
#define SDL_EnableScreenSaver
Sint32 SDLTest_RandomSint32BoundaryValue(Sint32 boundary1, Sint32 boundary2, SDL_bool validDomain)
static const SDLTest_TestCaseReference videoTest7
int video_getSetWindowMaximumSize(void *arg)
Tests call to SDL_GetWindowMaximumSize and SDL_SetWindowMaximumSize.
int video_createWindowVariousPositions(void *arg)
Tests the functionality of the SDL_CreateWindow function using different positions.
static const SDLTest_TestCaseReference videoTest21
static const SDLTest_TestCaseReference videoTest8
GLubyte GLubyte GLubyte GLubyte w
#define SDL_GetDisplayBounds
int video_getSetWindowMinimumSize(void *arg)
Tests call to SDL_GetWindowMinimumSize and SDL_SetWindowMinimumSize.
int video_getWindowDisplayMode(void *arg)
Tests call to SDL_GetWindowDisplayMode.
#define SDL_GetWindowPosition
GLint GLint GLint GLint GLint GLint y
#define SDL_GetWindowMinimumSize
#define SDL_GetWindowFromID
static const SDLTest_TestCaseReference videoTest13
void _destroyVideoSuiteTestWindow(SDL_Window *window)
#define SDL_GetWindowBrightness
int video_getWindowBrightness(void *arg)
Tests call to SDL_GetWindowBrightness.
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
int video_getWindowId(void *arg)
Tests call to SDL_GetWindowID and SDL_GetWindowFromID.
static const SDLTest_TestCaseReference videoTest14
EGLSurface EGLNativeWindowType * window
int video_getClosestDisplayModeRandomResolution(void *arg)
Tests the functionality of the SDL_GetClosestDisplayMode function against random resolution.
The type used to identify a window.
#define SDL_GetWindowGrab
#define SDL_GetWindowPixelFormat
static const SDLTest_TestCaseReference videoTest15
void SDLTest_Log(SDL_PRINTF_FORMAT_STRING const char *fmt,...) SDL_PRINTF_VARARG_FUNC(1)
Prints given message with a timestamp in the TEST category and INFO priority.
static const SDLTest_TestCaseReference videoTest12
#define SDL_GetWindowMaximumSize
#define SDL_GetNumDisplayModes
int video_getWindowGammaRampNegative(void *arg)
Tests call to SDL_GetWindowGammaRamp with invalid input.
void _checkInvalidParameterError()
int video_getSetWindowData(void *arg)
Tests call to SDL_SetWindowData and SDL_GetWindowData.
int video_getSetWindowGrab(void *arg)
Tests call to SDL_GetWindowGrab and SDL_SetWindowGrab.
#define SDL_GetClosestDisplayMode
int video_getWindowPixelFormat(void *arg)
Tests call to SDL_GetWindowPixelFormat.
static const SDLTest_TestCaseReference videoTest3
static const SDLTest_TestCaseReference videoTest11
#define SDL_DestroyWindow
int video_getSetWindowPosition(void *arg)
Tests call to SDL_GetWindowPosition and SDL_SetWindowPosition.
#define SDL_SetWindowPosition
A rectangle, with the origin at the upper left.
SDL_Window * _createVideoSuiteTestWindow(const char *title)