SDL 2.0
testautomation_pixels.c
Go to the documentation of this file.
1/**
2 * Pixels test suite
3 */
4
5#include <stdio.h>
6
7#include "SDL.h"
8#include "SDL_test.h"
9
10/* Test case functions */
11
12/* Definition of all RGB formats used to test pixel conversions */
13const int _numRGBPixelFormats = 30;
15 {
46 };
48 {
49 "SDL_PIXELFORMAT_INDEX1LSB",
50 "SDL_PIXELFORMAT_INDEX1MSB",
51 "SDL_PIXELFORMAT_INDEX4LSB",
52 "SDL_PIXELFORMAT_INDEX4MSB",
53 "SDL_PIXELFORMAT_INDEX8",
54 "SDL_PIXELFORMAT_RGB332",
55 "SDL_PIXELFORMAT_RGB444",
56 "SDL_PIXELFORMAT_RGB555",
57 "SDL_PIXELFORMAT_BGR555",
58 "SDL_PIXELFORMAT_ARGB4444",
59 "SDL_PIXELFORMAT_RGBA4444",
60 "SDL_PIXELFORMAT_ABGR4444",
61 "SDL_PIXELFORMAT_BGRA4444",
62 "SDL_PIXELFORMAT_ARGB1555",
63 "SDL_PIXELFORMAT_RGBA5551",
64 "SDL_PIXELFORMAT_ABGR1555",
65 "SDL_PIXELFORMAT_BGRA5551",
66 "SDL_PIXELFORMAT_RGB565",
67 "SDL_PIXELFORMAT_BGR565",
68 "SDL_PIXELFORMAT_RGB24",
69 "SDL_PIXELFORMAT_BGR24",
70 "SDL_PIXELFORMAT_RGB888",
71 "SDL_PIXELFORMAT_RGBX8888",
72 "SDL_PIXELFORMAT_BGR888",
73 "SDL_PIXELFORMAT_BGRX8888",
74 "SDL_PIXELFORMAT_ARGB8888",
75 "SDL_PIXELFORMAT_RGBA8888",
76 "SDL_PIXELFORMAT_ABGR8888",
77 "SDL_PIXELFORMAT_BGRA8888",
78 "SDL_PIXELFORMAT_ARGB2101010"
79 };
80
81/* Definition of all Non-RGB formats used to test pixel conversions */
84 {
92 };
94 {
95 "SDL_PIXELFORMAT_YV12",
96 "SDL_PIXELFORMAT_IYUV",
97 "SDL_PIXELFORMAT_YUY2",
98 "SDL_PIXELFORMAT_UYVY",
99 "SDL_PIXELFORMAT_YVYU",
100 "SDL_PIXELFORMAT_NV12",
101 "SDL_PIXELFORMAT_NV21"
102 };
103
104/* Definition of some invalid formats for negative tests */
107 {
108 0xfffffffe,
109 0xffffffff
110 };
112 {
113 "SDL_PIXELFORMAT_UNKNOWN",
114 "SDL_PIXELFORMAT_UNKNOWN"
115 };
116
117/* Test case functions */
118
119/**
120 * @brief Call to SDL_AllocFormat and SDL_FreeFormat
121 *
122 * @sa http://wiki.libsdl.org/moin.fcg/SDL_AllocFormat
123 * @sa http://wiki.libsdl.org/moin.fcg/SDL_FreeFormat
124 */
125int
127{
128 const char *unknownFormat = "SDL_PIXELFORMAT_UNKNOWN";
129 const char *expectedError = "Parameter 'format' is invalid";
130 const char *error;
131 int i;
133 Uint32 masks;
135
136 /* Blank/unknown format */
137 format = 0;
138 SDLTest_Log("RGB Format: %s (%u)", unknownFormat, format);
139
140 /* Allocate format */
142 SDLTest_AssertPass("Call to SDL_AllocFormat()");
143 SDLTest_AssertCheck(result != NULL, "Verify result is not NULL");
144 if (result != NULL) {
145 SDLTest_AssertCheck(result->format == format, "Verify value of result.format; expected: %u, got %u", format, result->format);
146 SDLTest_AssertCheck(result->BitsPerPixel == 0, "Verify value of result.BitsPerPixel; expected: 0, got %u", result->BitsPerPixel);
147 SDLTest_AssertCheck(result->BytesPerPixel == 0, "Verify value of result.BytesPerPixel; expected: 0, got %u", result->BytesPerPixel);
148 masks = result->Rmask | result->Gmask | result->Bmask | result->Amask;
149 SDLTest_AssertCheck(masks == 0, "Verify value of result.[RGBA]mask combined; expected: 0, got %u", masks);
150
151 /* Deallocate again */
153 SDLTest_AssertPass("Call to SDL_FreeFormat()");
154 }
155
156 /* RGB formats */
157 for (i = 0; i < _numRGBPixelFormats; i++) {
159 SDLTest_Log("RGB Format: %s (%u)", _RGBPixelFormatsVerbose[i], format);
160
161 /* Allocate format */
163 SDLTest_AssertPass("Call to SDL_AllocFormat()");
164 SDLTest_AssertCheck(result != NULL, "Verify result is not NULL");
165 if (result != NULL) {
166 SDLTest_AssertCheck(result->format == format, "Verify value of result.format; expected: %u, got %u", format, result->format);
167 SDLTest_AssertCheck(result->BitsPerPixel > 0, "Verify value of result.BitsPerPixel; expected: >0, got %u", result->BitsPerPixel);
168 SDLTest_AssertCheck(result->BytesPerPixel > 0, "Verify value of result.BytesPerPixel; expected: >0, got %u", result->BytesPerPixel);
169 if (result->palette != NULL) {
170 masks = result->Rmask | result->Gmask | result->Bmask | result->Amask;
171 SDLTest_AssertCheck(masks > 0, "Verify value of result.[RGBA]mask combined; expected: >0, got %u", masks);
172 }
173
174 /* Deallocate again */
176 SDLTest_AssertPass("Call to SDL_FreeFormat()");
177 }
178 }
179
180 /* Non-RGB formats */
181 for (i = 0; i < _numNonRGBPixelFormats; i++) {
183 SDLTest_Log("non-RGB Format: %s (%u)", _nonRGBPixelFormatsVerbose[i], format);
184
185 /* Try to allocate format */
187 SDLTest_AssertPass("Call to SDL_AllocFormat()");
188 SDLTest_AssertCheck(result == NULL, "Verify result is NULL");
189 }
190
191 /* Negative cases */
192
193 /* Invalid Formats */
194 for (i = 0; i < _numInvalidPixelFormats; i++) {
196 SDLTest_AssertPass("Call to SDL_ClearError()");
199 SDLTest_AssertPass("Call to SDL_AllocFormat(%u)", format);
200 SDLTest_AssertCheck(result == NULL, "Verify result is NULL");
201 error = SDL_GetError();
202 SDLTest_AssertPass("Call to SDL_GetError()");
203 SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL");
204 if (error != NULL) {
205 SDLTest_AssertCheck(SDL_strcmp(error, expectedError) == 0,
206 "Validate error message, expected: '%s', got: '%s'", expectedError, error);
207 }
208 }
209
210 /* Invalid free pointer */
212 SDLTest_AssertPass("Call to SDL_ClearError()");
214 SDLTest_AssertPass("Call to SDL_FreeFormat(NULL)");
215 error = SDL_GetError();
216 SDLTest_AssertPass("Call to SDL_GetError()");
217 SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL");
218 if (error != NULL) {
219 SDLTest_AssertCheck(SDL_strcmp(error, expectedError) == 0,
220 "Validate error message, expected: '%s', got: '%s'", expectedError, error);
221 }
222
223 return TEST_COMPLETED;
224}
225
226/**
227 * @brief Call to SDL_GetPixelFormatName
228 *
229 * @sa http://wiki.libsdl.org/moin.fcg/SDL_GetPixelFormatName
230 */
231int
233{
234 const char *unknownFormat = "SDL_PIXELFORMAT_UNKNOWN";
235 const char *error;
236 int i;
238 char* result;
239
240 /* Blank/undefined format */
241 format = 0;
242 SDLTest_Log("RGB Format: %s (%u)", unknownFormat, format);
243
244 /* Get name of format */
246 SDLTest_AssertPass("Call to SDL_GetPixelFormatName()");
247 SDLTest_AssertCheck(result != NULL, "Verify result is not NULL");
248 if (result != NULL) {
249 SDLTest_AssertCheck(result[0] != '\0', "Verify result is non-empty");
250 SDLTest_AssertCheck(SDL_strcmp(result, unknownFormat) == 0,
251 "Verify result text; expected: %s, got %s", unknownFormat, result);
252 }
253
254 /* RGB formats */
255 for (i = 0; i < _numRGBPixelFormats; i++) {
257 SDLTest_Log("RGB Format: %s (%u)", _RGBPixelFormatsVerbose[i], format);
258
259 /* Get name of format */
261 SDLTest_AssertPass("Call to SDL_GetPixelFormatName()");
262 SDLTest_AssertCheck(result != NULL, "Verify result is not NULL");
263 if (result != NULL) {
264 SDLTest_AssertCheck(result[0] != '\0', "Verify result is non-empty");
266 "Verify result text; expected: %s, got %s", _RGBPixelFormatsVerbose[i], result);
267 }
268 }
269
270 /* Non-RGB formats */
271 for (i = 0; i < _numNonRGBPixelFormats; i++) {
273 SDLTest_Log("non-RGB Format: %s (%u)", _nonRGBPixelFormatsVerbose[i], format);
274
275 /* Get name of format */
277 SDLTest_AssertPass("Call to SDL_GetPixelFormatName()");
278 SDLTest_AssertCheck(result != NULL, "Verify result is not NULL");
279 if (result != NULL) {
280 SDLTest_AssertCheck(result[0] != '\0', "Verify result is non-empty");
282 "Verify result text; expected: %s, got %s", _nonRGBPixelFormatsVerbose[i], result);
283 }
284 }
285
286 /* Negative cases */
287
288 /* Invalid Formats */
290 SDLTest_AssertPass("Call to SDL_ClearError()");
291 for (i = 0; i < _numInvalidPixelFormats; i++) {
294 SDLTest_AssertPass("Call to SDL_GetPixelFormatName(%u)", format);
295 SDLTest_AssertCheck(result != NULL, "Verify result is not NULL");
296 if (result != NULL) {
297 SDLTest_AssertCheck(result[0] != '\0',
298 "Verify result is non-empty; got: %s", result);
300 "Validate name is UNKNOWN, expected: '%s', got: '%s'", _invalidPixelFormatsVerbose[i], result);
301 }
302 error = SDL_GetError();
303 SDLTest_AssertPass("Call to SDL_GetError()");
304 SDLTest_AssertCheck(error == NULL || error[0] == '\0', "Validate that error message is empty");
305 }
306
307 return TEST_COMPLETED;
308}
309
310/**
311 * @brief Call to SDL_AllocPalette and SDL_FreePalette
312 *
313 * @sa http://wiki.libsdl.org/moin.fcg/SDL_AllocPalette
314 * @sa http://wiki.libsdl.org/moin.fcg/SDL_FreePalette
315 */
316int
318{
319 const char *expectedError1 = "Parameter 'ncolors' is invalid";
320 const char *expectedError2 = "Parameter 'palette' is invalid";
321 const char *error;
322 int variation;
323 int i;
324 int ncolors;
326
327 /* Allocate palette */
328 for (variation = 1; variation <= 3; variation++) {
329 switch (variation) {
330 /* Just one color */
331 case 1:
332 ncolors = 1;
333 break;
334 /* Two colors */
335 case 2:
336 ncolors = 2;
337 break;
338 /* More than two colors */
339 case 3:
340 ncolors = SDLTest_RandomIntegerInRange(8, 16);
341 break;
342 }
343
344 result = SDL_AllocPalette(ncolors);
345 SDLTest_AssertPass("Call to SDL_AllocPalette(%d)", ncolors);
346 SDLTest_AssertCheck(result != NULL, "Verify result is not NULL");
347 if (result != NULL) {
348 SDLTest_AssertCheck(result->ncolors == ncolors, "Verify value of result.ncolors; expected: %u, got %u", ncolors, result->ncolors);
349 if (result->ncolors > 0) {
350 SDLTest_AssertCheck(result->colors != NULL, "Verify value of result.colors is not NULL");
351 if (result->colors != NULL) {
352 for(i = 0; i < result->ncolors; i++) {
353 SDLTest_AssertCheck(result->colors[i].r == 255, "Verify value of result.colors[%d].r; expected: 255, got %u", i, result->colors[i].r);
354 SDLTest_AssertCheck(result->colors[i].g == 255, "Verify value of result.colors[%d].g; expected: 255, got %u", i, result->colors[i].g);
355 SDLTest_AssertCheck(result->colors[i].b == 255, "Verify value of result.colors[%d].b; expected: 255, got %u", i, result->colors[i].b);
356 }
357 }
358 }
359
360 /* Deallocate again */
362 SDLTest_AssertPass("Call to SDL_FreePalette()");
363 }
364 }
365
366 /* Negative cases */
367
368 /* Invalid number of colors */
369 for (ncolors = 0; ncolors > -3; ncolors--) {
371 SDLTest_AssertPass("Call to SDL_ClearError()");
372 result = SDL_AllocPalette(ncolors);
373 SDLTest_AssertPass("Call to SDL_AllocPalette(%d)", ncolors);
374 SDLTest_AssertCheck(result == NULL, "Verify result is NULL");
375 error = SDL_GetError();
376 SDLTest_AssertPass("Call to SDL_GetError()");
377 SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL");
378 if (error != NULL) {
379 SDLTest_AssertCheck(SDL_strcmp(error, expectedError1) == 0,
380 "Validate error message, expected: '%s', got: '%s'", expectedError1, error);
381 }
382 }
383
384 /* Invalid free pointer */
386 SDLTest_AssertPass("Call to SDL_ClearError()");
388 SDLTest_AssertPass("Call to SDL_FreePalette(NULL)");
389 error = SDL_GetError();
390 SDLTest_AssertPass("Call to SDL_GetError()");
391 SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL");
392 if (error != NULL) {
393 SDLTest_AssertCheck(SDL_strcmp(error, expectedError2) == 0,
394 "Validate error message, expected: '%s', got: '%s'", expectedError2, error);
395 }
396
397 return TEST_COMPLETED;
398}
399
400/**
401 * @brief Call to SDL_CalculateGammaRamp
402 *
403 * @sa http://wiki.libsdl.org/moin.fcg/SDL_CalculateGammaRamp
404 */
405int
407{
408 const char *expectedError1 = "Parameter 'gamma' is invalid";
409 const char *expectedError2 = "Parameter 'ramp' is invalid";
410 const char *error;
411 float gamma;
412 Uint16 *ramp;
413 int variation;
414 int i;
415 int changed;
416 Uint16 magic = 0xbeef;
417
418 /* Allocate temp ramp array and fill with some value */
419 ramp = (Uint16 *)SDL_malloc(256 * sizeof(Uint16));
420 SDLTest_AssertCheck(ramp != NULL, "Validate temp ramp array could be allocated");
421 if (ramp == NULL) return TEST_ABORTED;
422
423 /* Make call with different gamma values */
424 for (variation = 0; variation < 4; variation++) {
425 switch (variation) {
426 /* gamma = 0 all black */
427 case 0:
428 gamma = 0.0f;
429 break;
430 /* gamma = 1 identity */
431 case 1:
432 gamma = 1.0f;
433 break;
434 /* gamma = [0.2,0.8] normal range */
435 case 2:
436 gamma = 0.2f + 0.8f * SDLTest_RandomUnitFloat();
437 break;
438 /* gamma = >1.1 non-standard range */
439 case 3:
440 gamma = 1.1f + SDLTest_RandomUnitFloat();
441 break;
442 }
443
444 /* Make call and check that values were updated */
445 for (i = 0; i < 256; i++) ramp[i] = magic;
446 SDL_CalculateGammaRamp(gamma, ramp);
447 SDLTest_AssertPass("Call to SDL_CalculateGammaRamp(%f)", gamma);
448 changed = 0;
449 for (i = 0; i < 256; i++) if (ramp[i] != magic) changed++;
450 SDLTest_AssertCheck(changed > 250, "Validate that ramp was calculated; expected: >250 values changed, got: %d values changed", changed);
451
452 /* Additional value checks for some cases */
454 switch (variation) {
455 case 0:
456 SDLTest_AssertCheck(ramp[i] == 0, "Validate value at position %d; expected: 0, got: %d", i, ramp[i]);
457 break;
458 case 1:
459 SDLTest_AssertCheck(ramp[i] == ((i << 8) | i), "Validate value at position %d; expected: %d, got: %d", i, (i << 8) | i, ramp[i]);
460 break;
461 case 2:
462 case 3:
463 SDLTest_AssertCheck(ramp[i] > 0, "Validate value at position %d; expected: >0, got: %d", i, ramp[i]);
464 break;
465 }
466 }
467
468 /* Negative cases */
470 SDLTest_AssertPass("Call to SDL_ClearError()");
471 gamma = -1;
472 for (i=0; i<256; i++) ramp[i] = magic;
473 SDL_CalculateGammaRamp(gamma, ramp);
474 SDLTest_AssertPass("Call to SDL_CalculateGammaRamp(%f)", gamma);
475 error = SDL_GetError();
476 SDLTest_AssertPass("Call to SDL_GetError()");
477 SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL");
478 if (error != NULL) {
479 SDLTest_AssertCheck(SDL_strcmp(error, expectedError1) == 0,
480 "Validate error message, expected: '%s', got: '%s'", expectedError1, error);
481 }
482 changed = 0;
483 for (i = 0; i < 256; i++) if (ramp[i] != magic) changed++;
484 SDLTest_AssertCheck(changed ==0, "Validate that ramp unchanged; expected: 0 values changed got: %d values changed", changed);
485
487 SDLTest_AssertPass("Call to SDL_CalculateGammaRamp(0.5,NULL)");
488 error = SDL_GetError();
489 SDLTest_AssertPass("Call to SDL_GetError()");
490 SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL");
491 if (error != NULL) {
492 SDLTest_AssertCheck(SDL_strcmp(error, expectedError2) == 0,
493 "Validate error message, expected: '%s', got: '%s'", expectedError2, error);
494 }
495
496 /* Cleanup */
497 SDL_free(ramp);
498
499
500 return TEST_COMPLETED;
501}
502
503/* ================= Test References ================== */
504
505/* Pixels test cases */
507 { (SDLTest_TestCaseFp)pixels_allocFreeFormat, "pixels_allocFreeFormat", "Call to SDL_AllocFormat and SDL_FreeFormat", TEST_ENABLED };
508
510 { (SDLTest_TestCaseFp)pixels_allocFreePalette, "pixels_allocFreePalette", "Call to SDL_AllocPalette and SDL_FreePalette", TEST_ENABLED };
511
513 { (SDLTest_TestCaseFp)pixels_calcGammaRamp, "pixels_calcGammaRamp", "Call to SDL_CalculateGammaRamp", TEST_ENABLED };
514
516 { (SDLTest_TestCaseFp)pixels_getPixelFormatName, "pixels_getPixelFormatName", "Call to SDL_GetPixelFormatName", TEST_ENABLED };
517
518/* Sequence of Pixels test cases */
521};
522
523/* Pixels test suite (global) */
525 "Pixels",
526 NULL,
528 NULL
529};
#define SDL_GetError
#define SDL_AllocPalette
#define SDL_FreePalette
#define SDL_FreeFormat
#define SDL_CalculateGammaRamp
#define SDL_GetPixelFormatName
#define SDL_AllocFormat
#define SDL_malloc
#define SDL_ClearError
#define SDL_free
#define SDL_strcmp
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: SDL_opengl.h:1572
GLuint64EXT * result
@ SDL_PIXELFORMAT_BGR565
Definition: SDL_pixels.h:227
@ SDL_PIXELFORMAT_YVYU
Definition: SDL_pixels.h:285
@ SDL_PIXELFORMAT_RGB332
Definition: SDL_pixels.h:188
@ SDL_PIXELFORMAT_INDEX1LSB
Definition: SDL_pixels.h:174
@ SDL_PIXELFORMAT_ABGR4444
Definition: SDL_pixels.h:206
@ SDL_PIXELFORMAT_BGRA4444
Definition: SDL_pixels.h:209
@ SDL_PIXELFORMAT_BGR24
Definition: SDL_pixels.h:233
@ SDL_PIXELFORMAT_INDEX4MSB
Definition: SDL_pixels.h:183
@ SDL_PIXELFORMAT_RGB555
Definition: SDL_pixels.h:194
@ SDL_PIXELFORMAT_RGB444
Definition: SDL_pixels.h:191
@ SDL_PIXELFORMAT_RGBA8888
Definition: SDL_pixels.h:251
@ SDL_PIXELFORMAT_RGBA5551
Definition: SDL_pixels.h:215
@ SDL_PIXELFORMAT_ARGB1555
Definition: SDL_pixels.h:212
@ SDL_PIXELFORMAT_INDEX8
Definition: SDL_pixels.h:186
@ SDL_PIXELFORMAT_UYVY
Definition: SDL_pixels.h:283
@ SDL_PIXELFORMAT_BGR888
Definition: SDL_pixels.h:242
@ SDL_PIXELFORMAT_YV12
Definition: SDL_pixels.h:277
@ SDL_PIXELFORMAT_BGRX8888
Definition: SDL_pixels.h:245
@ SDL_PIXELFORMAT_RGB24
Definition: SDL_pixels.h:230
@ SDL_PIXELFORMAT_RGB888
Definition: SDL_pixels.h:236
@ SDL_PIXELFORMAT_ABGR8888
Definition: SDL_pixels.h:254
@ SDL_PIXELFORMAT_YUY2
Definition: SDL_pixels.h:281
@ SDL_PIXELFORMAT_NV12
Definition: SDL_pixels.h:287
@ SDL_PIXELFORMAT_BGRA8888
Definition: SDL_pixels.h:257
@ SDL_PIXELFORMAT_ABGR1555
Definition: SDL_pixels.h:218
@ SDL_PIXELFORMAT_NV21
Definition: SDL_pixels.h:289
@ SDL_PIXELFORMAT_IYUV
Definition: SDL_pixels.h:279
@ SDL_PIXELFORMAT_ARGB8888
Definition: SDL_pixels.h:248
@ SDL_PIXELFORMAT_ARGB4444
Definition: SDL_pixels.h:200
@ SDL_PIXELFORMAT_INDEX1MSB
Definition: SDL_pixels.h:177
@ SDL_PIXELFORMAT_INDEX4LSB
Definition: SDL_pixels.h:180
@ SDL_PIXELFORMAT_RGBX8888
Definition: SDL_pixels.h:239
@ SDL_PIXELFORMAT_BGRA5551
Definition: SDL_pixels.h:221
@ SDL_PIXELFORMAT_RGB565
Definition: SDL_pixels.h:224
@ SDL_PIXELFORMAT_ARGB2101010
Definition: SDL_pixels.h:260
@ SDL_PIXELFORMAT_BGR555
Definition: SDL_pixels.h:197
@ SDL_PIXELFORMAT_RGBA4444
Definition: SDL_pixels.h:203
uint32_t Uint32
Definition: SDL_stdinc.h:203
uint16_t Uint16
Definition: SDL_stdinc.h:191
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.
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...
float SDLTest_RandomUnitFloat(void)
Sint32 SDLTest_RandomIntegerInRange(Sint32 min, Sint32 max)
#define TEST_ENABLED
#define TEST_COMPLETED
#define TEST_ABORTED
int(* SDLTest_TestCaseFp)(void *arg)
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.
Definition: SDL_test_log.c:85
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)
Definition: SDL_x11sym.h:50
#define NULL
Definition: begin_code.h:167
const int _numInvalidPixelFormats
int pixels_calcGammaRamp(void *arg)
Call to SDL_CalculateGammaRamp.
int pixels_getPixelFormatName(void *arg)
Call to SDL_GetPixelFormatName.
int pixels_allocFreeFormat(void *arg)
Call to SDL_AllocFormat and SDL_FreeFormat.
char * _invalidPixelFormatsVerbose[]
static const SDLTest_TestCaseReference pixelsTest3
Uint32 _invalidPixelFormats[]
char * _nonRGBPixelFormatsVerbose[]
static const SDLTest_TestCaseReference pixelsTest1
char * _RGBPixelFormatsVerbose[]
const int _numRGBPixelFormats
SDLTest_TestSuiteReference pixelsTestSuite
static const SDLTest_TestCaseReference pixelsTest4
Uint32 _nonRGBPixelFormats[]
const int _numNonRGBPixelFormats
Uint32 _RGBPixelFormats[]
static const SDLTest_TestCaseReference pixelsTest2
int pixels_allocFreePalette(void *arg)
Call to SDL_AllocPalette and SDL_FreePalette.
static const SDLTest_TestCaseReference * pixelsTests[]