testautomation_pixels.c File Reference
`#include <stdio.h>`
`#include "SDL.h"`
`#include "SDL_test.h"`
Include dependency graph for testautomation_pixels.c:

Go to the source code of this file.

## Functions

int | pixels_allocFreeFormat (void *arg)
| Call to SDL_AllocFormat and SDL_FreeFormat. More...
int | pixels_getPixelFormatName (void *arg)
| Call to SDL_GetPixelFormatName. More...
int | pixels_allocFreePalette (void *arg)
| Call to SDL_AllocPalette and SDL_FreePalette. More...
int | pixels_calcGammaRamp (void *arg)
| Call to SDL_CalculateGammaRamp. More...

## Variables

const int | _numRGBPixelFormats = 30
Uint32 | _RGBPixelFormats []
char * | _RGBPixelFormatsVerbose []
const int | _numNonRGBPixelFormats = 7
Uint32 | _nonRGBPixelFormats []
char * | _nonRGBPixelFormatsVerbose []
const int | _numInvalidPixelFormats = 2
Uint32 | _invalidPixelFormats []
char * | _invalidPixelFormatsVerbose []
static const SDLTest_TestCaseReference | pixelsTest1
static const SDLTest_TestCaseReference | pixelsTest2
static const SDLTest_TestCaseReference | pixelsTest3
static const SDLTest_TestCaseReference | pixelsTest4
static const SDLTest_TestCaseReference * | pixelsTests []
SDLTest_TestSuiteReference | pixelsTestSuite

## Function Documentation

## pixels_allocFreeFormat()

int pixels_allocFreeFormat | ( | void * | arg | ) |

Call to SDL_AllocFormat and SDL_FreeFormat.

See also
  http://wiki.libsdl.org/moin.fcg/SDL_AllocFormat
  http://wiki.libsdl.org/moin.fcg/SDL_FreeFormat

Definition at line 126 of file testautomation_pixels.c.

{
const char *unknownFormat = "SDL_PIXELFORMAT_UNKNOWN";
const char *expectedError = "Parameter 'format' is invalid";
const char *error;
int i;
Uint32 format;
Uint32 masks;
SDL_PixelFormat* result;
/* Blank/unknown format */
format = 0;
SDLTest_Log("RGB Format: %s (%u)", unknownFormat, format);
/* Allocate format */
result = SDL_AllocFormat(format);
SDLTest_AssertPass("Call to SDL_AllocFormat()");
SDLTest_AssertCheck(result != NULL, "Verify result is not NULL");
if (result != NULL) {
SDLTest_AssertCheck(result->format == format, "Verify value of result.format; expected: %u, got %u", format, result->format);
SDLTest_AssertCheck(result->BitsPerPixel == 0, "Verify value of result.BitsPerPixel; expected: 0, got %u", result->BitsPerPixel);
SDLTest_AssertCheck(result->BytesPerPixel == 0, "Verify value of result.BytesPerPixel; expected: 0, got %u", result->BytesPerPixel);
masks = result->Rmask | result->Gmask | result->Bmask | result->Amask;
SDLTest_AssertCheck(masks == 0, "Verify value of result.[RGBA]mask combined; expected: 0, got %u", masks);
/* Deallocate again */
SDL_FreeFormat(result);
SDLTest_AssertPass("Call to SDL_FreeFormat()");
}
/* RGB formats */
for (i = 0; i < _numRGBPixelFormats; i++) {
format = _RGBPixelFormats[i];
SDLTest_Log("RGB Format: %s (%u)", _RGBPixelFormatsVerbose[i], format);
/* Allocate format */
result = SDL_AllocFormat(format);
SDLTest_AssertPass("Call to SDL_AllocFormat()");
SDLTest_AssertCheck(result != NULL, "Verify result is not NULL");
if (result != NULL) {
SDLTest_AssertCheck(result->format == format, "Verify value of result.format; expected: %u, got %u", format, result->format);
SDLTest_AssertCheck(result->BitsPerPixel > 0, "Verify value of result.BitsPerPixel; expected: >0, got %u", result->BitsPerPixel);
SDLTest_AssertCheck(result->BytesPerPixel > 0, "Verify value of result.BytesPerPixel; expected: >0, got %u", result->BytesPerPixel);
if (result->palette != NULL) {
masks = result->Rmask | result->Gmask | result->Bmask | result->Amask;
SDLTest_AssertCheck(masks > 0, "Verify value of result.[RGBA]mask combined; expected: >0, got %u", masks);
}
/* Deallocate again */
SDL_FreeFormat(result);
SDLTest_AssertPass("Call to SDL_FreeFormat()");
}
}
/* Non-RGB formats */
for (i = 0; i < _numNonRGBPixelFormats; i++) {
format = _nonRGBPixelFormats[i];
SDLTest_Log("non-RGB Format: %s (%u)", _nonRGBPixelFormatsVerbose[i], format);
/* Try to allocate format */
result = SDL_AllocFormat(format);
SDLTest_AssertPass("Call to SDL_AllocFormat()");
SDLTest_AssertCheck(result == NULL, "Verify result is NULL");
}
/* Negative cases */
/* Invalid Formats */
for (i = 0; i < _numInvalidPixelFormats; i++) {
SDL_ClearError();
SDLTest_AssertPass("Call to SDL_ClearError()");
format = _invalidPixelFormats[i];
result = SDL_AllocFormat(format);
SDLTest_AssertPass("Call to SDL_AllocFormat(%u)", format);
SDLTest_AssertCheck(result == NULL, "Verify result is NULL");
error = SDL_GetError();
SDLTest_AssertPass("Call to SDL_GetError()");
SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL");
if (error != NULL) {
SDLTest_AssertCheck(SDL_strcmp(error, expectedError) == 0,
"Validate error message, expected: '%s', got: '%s'", expectedError, error);
}
}
/* Invalid free pointer */
SDL_ClearError();
SDLTest_AssertPass("Call to SDL_ClearError()");
SDL_FreeFormat(NULL);
SDLTest_AssertPass("Call to SDL_FreeFormat(NULL)");
error = SDL_GetError();
SDLTest_AssertPass("Call to SDL_GetError()");
SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL");
if (error != NULL) {
SDLTest_AssertCheck(SDL_strcmp(error, expectedError) == 0,
"Validate error message, expected: '%s', got: '%s'", expectedError, error);
}
return TEST_COMPLETED;
}

References _invalidPixelFormats, _nonRGBPixelFormats, _nonRGBPixelFormatsVerbose, _numInvalidPixelFormats, _numNonRGBPixelFormats, _numRGBPixelFormats, _RGBPixelFormats, _RGBPixelFormatsVerbose, i, NULL, SDL_AllocFormat, SDL_ClearError, SDL_FreeFormat, SDL_GetError, SDL_strcmp, SDLTest_AssertCheck(), SDLTest_AssertPass(), SDLTest_Log(), and TEST_COMPLETED.

## pixels_allocFreePalette()

int pixels_allocFreePalette | ( | void * | arg | ) |

Call to SDL_AllocPalette and SDL_FreePalette.

See also
  http://wiki.libsdl.org/moin.fcg/SDL_AllocPalette
  http://wiki.libsdl.org/moin.fcg/SDL_FreePalette

Definition at line 317 of file testautomation_pixels.c.

{
const char *expectedError1 = "Parameter 'ncolors' is invalid";
const char *expectedError2 = "Parameter 'palette' is invalid";
const char *error;
int variation;
int i;
int ncolors;
SDL_Palette* result;
/* Allocate palette */
for (variation = 1; variation <= 3; variation++) {
switch (variation) {
/* Just one color */
case 1:
ncolors = 1;
break;
/* Two colors */
case 2:
ncolors = 2;
break;
/* More than two colors */
case 3:
ncolors = SDLTest_RandomIntegerInRange(8, 16);
break;
}
result = SDL_AllocPalette(ncolors);
SDLTest_AssertPass("Call to SDL_AllocPalette(%d)", ncolors);
SDLTest_AssertCheck(result != NULL, "Verify result is not NULL");
if (result != NULL) {
SDLTest_AssertCheck(result->ncolors == ncolors, "Verify value of result.ncolors; expected: %u, got %u", ncolors, result->ncolors);
if (result->ncolors > 0) {
SDLTest_AssertCheck(result->colors != NULL, "Verify value of result.colors is not NULL");
if (result->colors != NULL) {
for(i = 0; i < result->ncolors; i++) {
SDLTest_AssertCheck(result->colors[i].r == 255, "Verify value of result.colors[%d].r; expected: 255, got %u", i, result->colors[i].r);
SDLTest_AssertCheck(result->colors[i].g == 255, "Verify value of result.colors[%d].g; expected: 255, got %u", i, result->colors[i].g);
SDLTest_AssertCheck(result->colors[i].b == 255, "Verify value of result.colors[%d].b; expected: 255, got %u", i, result->colors[i].b);
}
}
}
/* Deallocate again */
SDL_FreePalette(result);
SDLTest_AssertPass("Call to SDL_FreePalette()");
}
}
/* Negative cases */
/* Invalid number of colors */
for (ncolors = 0; ncolors > -3; ncolors--) {
SDL_ClearError();
SDLTest_AssertPass("Call to SDL_ClearError()");
result = SDL_AllocPalette(ncolors);
SDLTest_AssertPass("Call to SDL_AllocPalette(%d)", ncolors);
SDLTest_AssertCheck(result == NULL, "Verify result is NULL");
error = SDL_GetError();
SDLTest_AssertPass("Call to SDL_GetError()");
SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL");
if (error != NULL) {
SDLTest_AssertCheck(SDL_strcmp(error, expectedError1) == 0,
"Validate error message, expected: '%s', got: '%s'", expectedError1, error);
}
}
/* Invalid free pointer */
SDL_ClearError();
SDLTest_AssertPass("Call to SDL_ClearError()");
SDL_FreePalette(NULL);
SDLTest_AssertPass("Call to SDL_FreePalette(NULL)");
error = SDL_GetError();
SDLTest_AssertPass("Call to SDL_GetError()");
SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL");
if (error != NULL) {
SDLTest_AssertCheck(SDL_strcmp(error, expectedError2) == 0,
"Validate error message, expected: '%s', got: '%s'", expectedError2, error);
}
return TEST_COMPLETED;
}

References i, NULL, SDL_AllocPalette, SDL_ClearError, SDL_FreePalette, SDL_GetError, SDL_strcmp, SDLTest_AssertCheck(), SDLTest_AssertPass(), SDLTest_RandomIntegerInRange(), and TEST_COMPLETED.

## pixels_calcGammaRamp()

int pixels_calcGammaRamp | ( | void * | arg | ) |

Call to SDL_CalculateGammaRamp.

See also
  http://wiki.libsdl.org/moin.fcg/SDL_CalculateGammaRamp

Definition at line 406 of file testautomation_pixels.c.

{
const char *expectedError1 = "Parameter 'gamma' is invalid";
const char *expectedError2 = "Parameter 'ramp' is invalid";
const char *error;
float gamma;
Uint16 *ramp;
int variation;
int i;
int changed;
Uint16 magic = 0xbeef;
/* Allocate temp ramp array and fill with some value */
ramp = (Uint16 *)SDL_malloc(256 * sizeof(Uint16));
SDLTest_AssertCheck(ramp != NULL, "Validate temp ramp array could be allocated");
if (ramp == NULL) return TEST_ABORTED;
/* Make call with different gamma values */
for (variation = 0; variation < 4; variation++) {
switch (variation) {
/* gamma = 0 all black */
case 0:
gamma = 0.0f;
break;
/* gamma = 1 identity */
case 1:
gamma = 1.0f;
break;
/* gamma = [0.2,0.8] normal range */
case 2:
gamma = 0.2f + 0.8f * SDLTest_RandomUnitFloat();
break;
/* gamma = >1.1 non-standard range */
case 3:
gamma = 1.1f + SDLTest_RandomUnitFloat();
break;
}
/* Make call and check that values were updated */
for (i = 0; i < 256; i++) ramp[i] = magic;
SDL_CalculateGammaRamp(gamma, ramp);
SDLTest_AssertPass("Call to SDL_CalculateGammaRamp(%f)", gamma);
changed = 0;
for (i = 0; i < 256; i++) if (ramp[i] != magic) changed++;
SDLTest_AssertCheck(changed > 250, "Validate that ramp was calculated; expected: >250 values changed, got: %d values changed", changed);
/* Additional value checks for some cases */
i = SDLTest_RandomIntegerInRange(64,192);
switch (variation) {
case 0:
SDLTest_AssertCheck(ramp[i] == 0, "Validate value at position %d; expected: 0, got: %d", i, ramp[i]);
break;
case 1:
SDLTest_AssertCheck(ramp[i] == ((i << 8) | i), "Validate value at position %d; expected: %d, got: %d", i, (i << 8) | i, ramp[i]);
break;
case 2:
case 3:
SDLTest_AssertCheck(ramp[i] > 0, "Validate value at position %d; expected: >0, got: %d", i, ramp[i]);
break;
}
}
/* Negative cases */
SDL_ClearError();
SDLTest_AssertPass("Call to SDL_ClearError()");
gamma = -1;
for (i=0; i<256; i++) ramp[i] = magic;
SDL_CalculateGammaRamp(gamma, ramp);
SDLTest_AssertPass("Call to SDL_CalculateGammaRamp(%f)", gamma);
error = SDL_GetError();
SDLTest_AssertPass("Call to SDL_GetError()");
SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL");
if (error != NULL) {
SDLTest_AssertCheck(SDL_strcmp(error, expectedError1) == 0,
"Validate error message, expected: '%s', got: '%s'", expectedError1, error);
}
changed = 0;
for (i = 0; i < 256; i++) if (ramp[i] != magic) changed++;
SDLTest_AssertCheck(changed ==0, "Validate that ramp unchanged; expected: 0 values changed got: %d values changed", changed);
SDL_CalculateGammaRamp(0.5f, NULL);
SDLTest_AssertPass("Call to SDL_CalculateGammaRamp(0.5,NULL)");
error = SDL_GetError();
SDLTest_AssertPass("Call to SDL_GetError()");
SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL");
if (error != NULL) {
SDLTest_AssertCheck(SDL_strcmp(error, expectedError2) == 0,
"Validate error message, expected: '%s', got: '%s'", expectedError2, error);
}
/* Cleanup */
SDL_free(ramp);
return TEST_COMPLETED;
}

References i, NULL, SDL_CalculateGammaRamp, SDL_ClearError, SDL_free, SDL_GetError, SDL_malloc, SDL_strcmp, SDLTest_AssertCheck(), SDLTest_AssertPass(), SDLTest_RandomIntegerInRange(), SDLTest_RandomUnitFloat(), TEST_ABORTED, and TEST_COMPLETED.

## pixels_getPixelFormatName()

int pixels_getPixelFormatName | ( | void * | arg | ) |

Call to SDL_GetPixelFormatName.

See also
  http://wiki.libsdl.org/moin.fcg/SDL_GetPixelFormatName

Definition at line 232 of file testautomation_pixels.c.

{
const char *unknownFormat = "SDL_PIXELFORMAT_UNKNOWN";
const char *error;
int i;
Uint32 format;
char* result;
/* Blank/undefined format */
format = 0;
SDLTest_Log("RGB Format: %s (%u)", unknownFormat, format);
/* Get name of format */
result = (char *)SDL_GetPixelFormatName(format);
SDLTest_AssertPass("Call to SDL_GetPixelFormatName()");
SDLTest_AssertCheck(result != NULL, "Verify result is not NULL");
if (result != NULL) {
SDLTest_AssertCheck(result[0] != '\0', "Verify result is non-empty");
SDLTest_AssertCheck(SDL_strcmp(result, unknownFormat) == 0,
"Verify result text; expected: %s, got %s", unknownFormat, result);
}
/* RGB formats */
for (i = 0; i < _numRGBPixelFormats; i++) {
format = _RGBPixelFormats[i];
SDLTest_Log("RGB Format: %s (%u)", _RGBPixelFormatsVerbose[i], format);
/* Get name of format */
result = (char *)SDL_GetPixelFormatName(format);
SDLTest_AssertPass("Call to SDL_GetPixelFormatName()");
SDLTest_AssertCheck(result != NULL, "Verify result is not NULL");
if (result != NULL) {
SDLTest_AssertCheck(result[0] != '\0', "Verify result is non-empty");
SDLTest_AssertCheck(SDL_strcmp(result, _RGBPixelFormatsVerbose[i]) == 0,
"Verify result text; expected: %s, got %s", _RGBPixelFormatsVerbose[i], result);
}
}
/* Non-RGB formats */
for (i = 0; i < _numNonRGBPixelFormats; i++) {
format = _nonRGBPixelFormats[i];
SDLTest_Log("non-RGB Format: %s (%u)", _nonRGBPixelFormatsVerbose[i], format);
/* Get name of format */
result = (char *)SDL_GetPixelFormatName(format);
SDLTest_AssertPass("Call to SDL_GetPixelFormatName()");
SDLTest_AssertCheck(result != NULL, "Verify result is not NULL");
if (result != NULL) {
SDLTest_AssertCheck(result[0] != '\0', "Verify result is non-empty");
SDLTest_AssertCheck(SDL_strcmp(result, _nonRGBPixelFormatsVerbose[i]) == 0,
"Verify result text; expected: %s, got %s", _nonRGBPixelFormatsVerbose[i], result);
}
}
/* Negative cases */
/* Invalid Formats */
SDL_ClearError();
SDLTest_AssertPass("Call to SDL_ClearError()");
for (i = 0; i < _numInvalidPixelFormats; i++) {
format = _invalidPixelFormats[i];
result = (char *)SDL_GetPixelFormatName(format);
SDLTest_AssertPass("Call to SDL_GetPixelFormatName(%u)", format);
SDLTest_AssertCheck(result != NULL, "Verify result is not NULL");
if (result != NULL) {
SDLTest_AssertCheck(result[0] != '\0',
"Verify result is non-empty; got: %s", result);
SDLTest_AssertCheck(SDL_strcmp(result, _invalidPixelFormatsVerbose[i]) == 0,
"Validate name is UNKNOWN, expected: '%s', got: '%s'", _invalidPixelFormatsVerbose[i], result);
}
error = SDL_GetError();
SDLTest_AssertPass("Call to SDL_GetError()");
SDLTest_AssertCheck(error == NULL || error[0] == '\0', "Validate that error message is empty");
}
return TEST_COMPLETED;
}

References _invalidPixelFormats, _invalidPixelFormatsVerbose, _nonRGBPixelFormats, _nonRGBPixelFormatsVerbose, _numInvalidPixelFormats, _numNonRGBPixelFormats, _numRGBPixelFormats, _RGBPixelFormats, _RGBPixelFormatsVerbose, i, NULL, SDL_ClearError, SDL_GetError, SDL_GetPixelFormatName, SDL_strcmp, SDLTest_AssertCheck(), SDLTest_AssertPass(), SDLTest_Log(), and TEST_COMPLETED.

## Variable Documentation

## _invalidPixelFormats

Uint32 _invalidPixelFormats[]

Initial value:
=
{
0xfffffffe,
0xffffffff
}

Definition at line 106 of file testautomation_pixels.c.

Referenced by pixels_allocFreeFormat(), and pixels_getPixelFormatName().

## _invalidPixelFormatsVerbose

char* _invalidPixelFormatsVerbose[]

Initial value:
=
{
"SDL_PIXELFORMAT_UNKNOWN",
"SDL_PIXELFORMAT_UNKNOWN"
}

Definition at line 111 of file testautomation_pixels.c.

Referenced by pixels_getPixelFormatName().

## _nonRGBPixelFormats

Uint32 _nonRGBPixelFormats[]

Initial value:
=
{
SDL_PIXELFORMAT_YV12,
SDL_PIXELFORMAT_IYUV,
SDL_PIXELFORMAT_YUY2,
SDL_PIXELFORMAT_UYVY,
SDL_PIXELFORMAT_YVYU,
SDL_PIXELFORMAT_NV12,
SDL_PIXELFORMAT_NV21
}

Definition at line 83 of file testautomation_pixels.c.

Referenced by pixels_allocFreeFormat(), and pixels_getPixelFormatName().

## _nonRGBPixelFormatsVerbose

char* _nonRGBPixelFormatsVerbose[]

Initial value:
=
{
"SDL_PIXELFORMAT_YV12",
"SDL_PIXELFORMAT_IYUV",
"SDL_PIXELFORMAT_YUY2",
"SDL_PIXELFORMAT_UYVY",
"SDL_PIXELFORMAT_YVYU",
"SDL_PIXELFORMAT_NV12",
"SDL_PIXELFORMAT_NV21"
}

Definition at line 93 of file testautomation_pixels.c.

Referenced by pixels_allocFreeFormat(), and pixels_getPixelFormatName().

## _numInvalidPixelFormats

const int _numInvalidPixelFormats = 2

Definition at line 105 of file testautomation_pixels.c.

Referenced by pixels_allocFreeFormat(), and pixels_getPixelFormatName().

## _numNonRGBPixelFormats

const int _numNonRGBPixelFormats = 7

Definition at line 82 of file testautomation_pixels.c.

Referenced by pixels_allocFreeFormat(), and pixels_getPixelFormatName().

## _numRGBPixelFormats

const int _numRGBPixelFormats = 30

Pixels test suite

Definition at line 13 of file testautomation_pixels.c.

Referenced by pixels_allocFreeFormat(), and pixels_getPixelFormatName().

## _RGBPixelFormats

Uint32 _RGBPixelFormats[]

Definition at line 14 of file testautomation_pixels.c.

Referenced by pixels_allocFreeFormat(), and pixels_getPixelFormatName().

## _RGBPixelFormatsVerbose

char* _RGBPixelFormatsVerbose[]

Definition at line 47 of file testautomation_pixels.c.

Referenced by pixels_allocFreeFormat(), and pixels_getPixelFormatName().

## pixelsTest1

const SDLTest_TestCaseReference pixelsTest1

static

Initial value:
=
{ (SDLTest_TestCaseFp)pixels_allocFreeFormat, "pixels_allocFreeFormat", "Call to SDL_AllocFormat and SDL_FreeFormat", TEST_ENABLED }

Definition at line 506 of file testautomation_pixels.c.

## pixelsTest2

const SDLTest_TestCaseReference pixelsTest2

static

Initial value:
=
{ (SDLTest_TestCaseFp)pixels_allocFreePalette, "pixels_allocFreePalette", "Call to SDL_AllocPalette and SDL_FreePalette", TEST_ENABLED }

Definition at line 509 of file testautomation_pixels.c.

## pixelsTest3

const SDLTest_TestCaseReference pixelsTest3

static

Initial value:
=
{ (SDLTest_TestCaseFp)pixels_calcGammaRamp, "pixels_calcGammaRamp", "Call to SDL_CalculateGammaRamp", TEST_ENABLED }

Definition at line 512 of file testautomation_pixels.c.

## pixelsTest4

const SDLTest_TestCaseReference pixelsTest4

static

Initial value:
=
{ (SDLTest_TestCaseFp)pixels_getPixelFormatName, "pixels_getPixelFormatName", "Call to SDL_GetPixelFormatName", TEST_ENABLED }

Definition at line 515 of file testautomation_pixels.c.

## pixelsTests

const SDLTest_TestCaseReference* pixelsTests[]

static

Initial value:
= {
&pixelsTest1, &pixelsTest2, &pixelsTest3, &pixelsTest4, NULL
}

Definition at line 519 of file testautomation_pixels.c.

## pixelsTestSuite

SDLTest_TestSuiteReference pixelsTestSuite

Initial value:
= {
"Pixels",
NULL,
pixelsTests,
NULL
}

Definition at line 524 of file testautomation_pixels.c.

format
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: SDL_opengl.h:1572
SDL_GetError
#define SDL_GetError
Definition: SDL_dynapi_overrides.h:113
pixels_getPixelFormatName
int pixels_getPixelFormatName(void *arg)
Call to SDL_GetPixelFormatName.
Definition: testautomation_pixels.c:232
_numRGBPixelFormats
const int _numRGBPixelFormats
Definition: testautomation_pixels.c:13
Uint32
uint32_t Uint32
Definition: SDL_stdinc.h:203
SDL_GetPixelFormatName
#define SDL_GetPixelFormatName
Definition: SDL_dynapi_overrides.h:277
SDL_ClearError
#define SDL_ClearError
Definition: SDL_dynapi_overrides.h:114
SDL_PIXELFORMAT_NV21
@ SDL_PIXELFORMAT_NV21
Definition: SDL_pixels.h:289
SDL_PIXELFORMAT_UYVY
@ SDL_PIXELFORMAT_UYVY
Definition: SDL_pixels.h:283
NULL
#define NULL
Definition: begin_code.h:167
_numNonRGBPixelFormats
const int _numNonRGBPixelFormats
Definition: testautomation_pixels.c:82
pixels_allocFreeFormat
int pixels_allocFreeFormat(void *arg)
Call to SDL_AllocFormat and SDL_FreeFormat.
Definition: testautomation_pixels.c:126
SDL_PIXELFORMAT_YUY2
@ SDL_PIXELFORMAT_YUY2
Definition: SDL_pixels.h:281
SDLTest_Log
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
TEST_ENABLED
#define TEST_ENABLED
Definition: SDL_test_harness.h:47
_invalidPixelFormatsVerbose
char * _invalidPixelFormatsVerbose[]
Definition: testautomation_pixels.c:111
pixelsTest4
static const SDLTest_TestCaseReference pixelsTest4
Definition: testautomation_pixels.c:515
pixelsTests
static const SDLTest_TestCaseReference * pixelsTests[]
Definition: testautomation_pixels.c:519
_nonRGBPixelFormats
Uint32 _nonRGBPixelFormats[]
Definition: testautomation_pixels.c:83
result
GLuint64EXT * result
Definition: SDL_opengl_glext.h:9432
SDL_PIXELFORMAT_IYUV
@ SDL_PIXELFORMAT_IYUV
Definition: SDL_pixels.h:279
SDL_AllocFormat
#define SDL_AllocFormat
Definition: SDL_dynapi_overrides.h:280
_nonRGBPixelFormatsVerbose
char * _nonRGBPixelFormatsVerbose[]
Definition: testautomation_pixels.c:93
SDL_PIXELFORMAT_YVYU
@ SDL_PIXELFORMAT_YVYU
Definition: SDL_pixels.h:285
_invalidPixelFormats
Uint32 _invalidPixelFormats[]
Definition: testautomation_pixels.c:106
SDLTest_TestCaseFp
int(* SDLTest_TestCaseFp)(void *arg)
Definition: SDL_test_harness.h:67
SDLTest_AssertPass
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.
Definition: SDL_test_assert.c:94
SDL_free
#define SDL_free
Definition: SDL_dynapi_overrides.h:377
pixelsTest1
static const SDLTest_TestCaseReference pixelsTest1
Definition: testautomation_pixels.c:506
f
GLfloat f
Definition: SDL_opengl_glext.h:1870
TEST_ABORTED
#define TEST_ABORTED
Definition: SDL_test_harness.h:51
_numInvalidPixelFormats
const int _numInvalidPixelFormats
Definition: testautomation_pixels.c:105
_RGBPixelFormats
Uint32 _RGBPixelFormats[]
Definition: testautomation_pixels.c:14
pixels_calcGammaRamp
int pixels_calcGammaRamp(void *arg)
Call to SDL_CalculateGammaRamp.
Definition: testautomation_pixels.c:406
Uint16
uint16_t Uint16
Definition: SDL_stdinc.h:191
SDLTest_AssertCheck
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...
Definition: SDL_test_assert.c:65
TEST_COMPLETED
#define TEST_COMPLETED
Definition: SDL_test_harness.h:53
SDL_FreeFormat
#define SDL_FreeFormat
Definition: SDL_dynapi_overrides.h:281
SDL_PixelFormat
Definition: SDL_pixels.h:315
pixelsTest2
static const SDLTest_TestCaseReference pixelsTest2
Definition: testautomation_pixels.c:509
SDL_FreePalette
#define SDL_FreePalette
Definition: SDL_dynapi_overrides.h:285
pixels_allocFreePalette
int pixels_allocFreePalette(void *arg)
Call to SDL_AllocPalette and SDL_FreePalette.
Definition: testautomation_pixels.c:317
SDL_AllocPalette
#define SDL_AllocPalette
Definition: SDL_dynapi_overrides.h:282
_RGBPixelFormatsVerbose
char * _RGBPixelFormatsVerbose[]
Definition: testautomation_pixels.c:47
SDL_Palette
Definition: SDL_pixels.h:304
SDL_PIXELFORMAT_NV12
@ SDL_PIXELFORMAT_NV12
Definition: SDL_pixels.h:287
pixelsTest3
static const SDLTest_TestCaseReference pixelsTest3
Definition: testautomation_pixels.c:512
SDLTest_RandomUnitFloat
float SDLTest_RandomUnitFloat(void)
Definition: SDL_test_fuzzer.c:452
SDL_CalculateGammaRamp
#define SDL_CalculateGammaRamp
Definition: SDL_dynapi_overrides.h:290
SDL_malloc
#define SDL_malloc
Definition: SDL_dynapi_overrides.h:374
SDL_strcmp
#define SDL_strcmp
Definition: SDL_dynapi_overrides.h:417
SDL_PIXELFORMAT_YV12
@ SDL_PIXELFORMAT_YV12
Definition: SDL_pixels.h:277
i
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
SDLTest_RandomIntegerInRange
Sint32 SDLTest_RandomIntegerInRange(Sint32 min, Sint32 max)
Definition: SDL_test_fuzzer.c:163