Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Test lib updates: updated harness to support filtering, added surface…

… comparer, updated interface to test images; added Render test suite from GSOC project
  • Loading branch information
ferzkopp committed Dec 23, 2012
1 parent 1b949cc commit cd4b36e51d8975af198f84b2b29f83918d2c196c

File 11 of 17 in cd4b36e

@@ -575,6 +575,32 @@ const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendAdd = {
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",
};

/**
* \brief Returns the BlitBlendAdd test image as SDL_Surface.
*/
SDL_Surface *SDLTest_ImageBlitBlendAdd()
{
SDL_Surface *surface = SDL_CreateRGBSurfaceFrom(
(void*)SDLTest_imageBlitBlendAdd.pixel_data,
SDLTest_imageBlitBlendAdd.width,
SDLTest_imageBlitBlendAdd.height,
SDLTest_imageBlitBlendAdd.bytes_per_pixel * 8,
SDLTest_imageBlitBlendAdd.width * SDLTest_imageBlitBlendAdd.bytes_per_pixel,
#if (SDL_BYTEORDER == SDL_BIG_ENDIAN)
0xff000000, /* Red bit mask. */
0x00ff0000, /* Green bit mask. */
0x0000ff00, /* Blue bit mask. */
0x000000ff /* Alpha bit mask. */
#else
0x000000ff, /* Red bit mask. */
0x0000ff00, /* Green bit mask. */
0x00ff0000, /* Blue bit mask. */
0xff000000 /* Alpha bit mask. */
#endif
);
return surface;
}

const SDLTest_SurfaceImage_t SDLTest_imageBlitBlend = {
80, 60, 3,
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
@@ -1079,6 +1105,32 @@ const SDLTest_SurfaceImage_t SDLTest_imageBlitBlend = {
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",
};

/**
* \brief Returns the BlitBlend test image as SDL_Surface.
*/
SDL_Surface *SDLTest_ImageBlitBlend()
{
SDL_Surface *surface = SDL_CreateRGBSurfaceFrom(
(void*)SDLTest_imageBlitBlend.pixel_data,
SDLTest_imageBlitBlend.width,
SDLTest_imageBlitBlend.height,
SDLTest_imageBlitBlend.bytes_per_pixel * 8,
SDLTest_imageBlitBlend.width * SDLTest_imageBlitBlend.bytes_per_pixel,
#if (SDL_BYTEORDER == SDL_BIG_ENDIAN)
0xff000000, /* Red bit mask. */
0x00ff0000, /* Green bit mask. */
0x0000ff00, /* Blue bit mask. */
0x000000ff /* Alpha bit mask. */
#else
0x000000ff, /* Red bit mask. */
0x0000ff00, /* Green bit mask. */
0x00ff0000, /* Blue bit mask. */
0xff000000 /* Alpha bit mask. */
#endif
);
return surface;
}

const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendMod = {
80, 60, 3,
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
@@ -1483,6 +1535,32 @@ const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendMod = {
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",
};

/**
* \brief Returns the BlitBlendMod test image as SDL_Surface.
*/
SDL_Surface *SDLTest_ImageBlitBlendMod()
{
SDL_Surface *surface = SDL_CreateRGBSurfaceFrom(
(void*)SDLTest_imageBlitBlendMod.pixel_data,
SDLTest_imageBlitBlendMod.width,
SDLTest_imageBlitBlendMod.height,
SDLTest_imageBlitBlendMod.bytes_per_pixel * 8,
SDLTest_imageBlitBlendMod.width * SDLTest_imageBlitBlendMod.bytes_per_pixel,
#if (SDL_BYTEORDER == SDL_BIG_ENDIAN)
0xff000000, /* Red bit mask. */
0x00ff0000, /* Green bit mask. */
0x0000ff00, /* Blue bit mask. */
0x000000ff /* Alpha bit mask. */
#else
0x000000ff, /* Red bit mask. */
0x0000ff00, /* Green bit mask. */
0x00ff0000, /* Blue bit mask. */
0xff000000 /* Alpha bit mask. */
#endif
);
return surface;
}

const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendNone = {
80, 60, 3,
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
@@ -2270,6 +2348,32 @@ const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendNone = {
"\377\377\377\377\377\377\377\377",
};

/**
* \brief Returns the BlitBlendNone test image as SDL_Surface.
*/
SDL_Surface *SDLTest_ImageBlitBlendNone()
{
SDL_Surface *surface = SDL_CreateRGBSurfaceFrom(
(void*)SDLTest_imageBlitBlendNone.pixel_data,
SDLTest_imageBlitBlendNone.width,
SDLTest_imageBlitBlendNone.height,
SDLTest_imageBlitBlendNone.bytes_per_pixel * 8,
SDLTest_imageBlitBlendNone.width * SDLTest_imageBlitBlendNone.bytes_per_pixel,
#if (SDL_BYTEORDER == SDL_BIG_ENDIAN)
0xff000000, /* Red bit mask. */
0x00ff0000, /* Green bit mask. */
0x0000ff00, /* Blue bit mask. */
0x000000ff /* Alpha bit mask. */
#else
0x000000ff, /* Red bit mask. */
0x0000ff00, /* Green bit mask. */
0x00ff0000, /* Blue bit mask. */
0xff000000 /* Alpha bit mask. */
#endif
);
return surface;
}

const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendAll = {
80, 60, 3,
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
@@ -2712,3 +2816,28 @@ const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendAll = {
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",
};

/**
* \brief Returns the BlitBlendAll test image as SDL_Surface.
*/
SDL_Surface *SDLTest_ImageBlitBlendAll()
{
SDL_Surface *surface = SDL_CreateRGBSurfaceFrom(
(void*)SDLTest_imageBlitBlendAll.pixel_data,
SDLTest_imageBlitBlendAll.width,
SDLTest_imageBlitBlendAll.height,
SDLTest_imageBlitBlendAll.bytes_per_pixel * 8,
SDLTest_imageBlitBlendAll.width * SDLTest_imageBlitBlendAll.bytes_per_pixel,
#if (SDL_BYTEORDER == SDL_BIG_ENDIAN)
0xff000000, /* Red bit mask. */
0x00ff0000, /* Green bit mask. */
0x0000ff00, /* Blue bit mask. */
0x000000ff /* Alpha bit mask. */
#else
0x000000ff, /* Red bit mask. */
0x0000ff00, /* Green bit mask. */
0x00ff0000, /* Blue bit mask. */
0xff000000 /* Alpha bit mask. */
#endif
);
return surface;
}

0 comments on commit cd4b36e

Please sign in to comment.