SDL
2.0
|
Go to the source code of this file.
Macros | |
#define | _CRT_SECURE_NO_DEPRECATE |
#define | _CRT_NONSTDC_NO_DEPRECATE |
#define | TEST_SURFACE_WIDTH testSurface->w |
#define | TEST_SURFACE_HEIGHT testSurface->h |
Functions | |
void | _surfaceSetUp (void *arg) |
void | _surfaceTearDown (void *arg) |
void | _clearTestSurface () |
void | _testBlitBlendMode (int mode) |
void | _AssertFileExist (const char *filename) |
int | surface_testSaveLoadBitmap (void *arg) |
Tests sprite saving and loading. More... | |
int | surface_testSurfaceConversion (void *arg) |
int | surface_testCompleteSurfaceConversion (void *arg) |
int | surface_testLoadFailure (void *arg) |
Tests sprite loading. A failure case. More... | |
int | surface_testBlit (void *arg) |
Tests some blitting routines. More... | |
int | surface_testBlitColorMod (void *arg) |
Tests some blitting routines with color mod. More... | |
int | surface_testBlitAlphaMod (void *arg) |
Tests some blitting routines with alpha mod. More... | |
int | surface_testBlitBlendNone (void *arg) |
Tests some more blitting routines. More... | |
int | surface_testBlitBlendBlend (void *arg) |
Tests some more blitting routines. More... | |
int | surface_testBlitBlendAdd (void *arg) |
Tests some more blitting routines. More... | |
int | surface_testBlitBlendMod (void *arg) |
Tests some more blitting routines. More... | |
int | surface_testBlitBlendLoop (void *arg) |
Tests some more blitting routines with loop. More... | |
Variables | |
static SDL_Surface * | referenceSurface = NULL |
static SDL_Surface * | testSurface = NULL |
static const SDLTest_TestCaseReference | surfaceTest1 |
static const SDLTest_TestCaseReference | surfaceTest2 |
static const SDLTest_TestCaseReference | surfaceTest3 |
static const SDLTest_TestCaseReference | surfaceTest4 |
static const SDLTest_TestCaseReference | surfaceTest5 |
static const SDLTest_TestCaseReference | surfaceTest6 |
static const SDLTest_TestCaseReference | surfaceTest7 |
static const SDLTest_TestCaseReference | surfaceTest8 |
static const SDLTest_TestCaseReference | surfaceTest9 |
static const SDLTest_TestCaseReference | surfaceTest10 |
static const SDLTest_TestCaseReference | surfaceTest11 |
static const SDLTest_TestCaseReference | surfaceTest12 |
static const SDLTest_TestCaseReference * | surfaceTests [] |
SDLTest_TestSuiteReference | surfaceTestSuite |
#define _CRT_NONSTDC_NO_DEPRECATE |
Definition at line 8 of file testautomation_surface.c.
#define _CRT_SECURE_NO_DEPRECATE |
Original code: automated SDL surface test written by Edgar Simo "bobbens" Adapted/rewritten for test lib by Andreas Schiffler
Definition at line 7 of file testautomation_surface.c.
#define TEST_SURFACE_HEIGHT testSurface->h |
Definition at line 33 of file testautomation_surface.c.
#define TEST_SURFACE_WIDTH testSurface->w |
Definition at line 32 of file testautomation_surface.c.
void _AssertFileExist | ( | const char * | filename | ) |
Definition at line 205 of file testautomation_surface.c.
References SDLTest_AssertCheck().
Referenced by surface_testSaveLoadBitmap().
void _clearTestSurface | ( | ) |
Helper that clears the test surface
Definition at line 82 of file testautomation_surface.c.
References SDL_Surface::format, NULL, SDL_FillRect, SDL_MapRGBA, SDLTest_AssertCheck(), and SDLTest_AssertPass().
Referenced by _testBlitBlendMode().
Definition at line 39 of file testautomation_surface.c.
References blendMode, SDL_Surface::h, NULL, SDL_BLENDMODE_NONE, SDL_CreateRGBSurface, SDL_GetSurfaceBlendMode, SDL_SetSurfaceBlendMode, SDL_SWSURFACE, SDLTest_AssertCheck(), SDLTest_ImageBlit(), and SDL_Surface::w.
void _testBlitBlendMode | ( | int | mode | ) |
Helper that blits in a specific blend mode, -1 for basic blitting, -2 for color mod, -3 for alpha mod, -4 for mixed blend modes.
Definition at line 98 of file testautomation_surface.c.
References _clearTestSurface(), SDL_Rect::h, SDL_Surface::h, i, j, NULL, rect, SDL_BLENDMODE_ADD, SDL_BLENDMODE_BLEND, SDL_BLENDMODE_MOD, SDL_BLENDMODE_NONE, SDL_BlitSurface, SDL_FALSE, SDL_FreeSurface, SDL_SetColorKey, SDL_SetSurfaceAlphaMod, SDL_SetSurfaceBlendMode, SDL_SetSurfaceColorMod, SDLTest_AssertCheck(), SDLTest_AssertPass(), SDLTest_ImageFace(), SDL_Rect::w, SDL_Surface::w, SDL_Rect::x, and SDL_Rect::y.
Referenced by surface_testBlit(), surface_testBlitAlphaMod(), surface_testBlitBlendAdd(), surface_testBlitBlendBlend(), surface_testBlitBlendLoop(), surface_testBlitBlendMod(), surface_testBlitBlendNone(), and surface_testBlitColorMod().
int surface_testBlit | ( | void * | arg | ) |
Tests some blitting routines.
Definition at line 409 of file testautomation_surface.c.
References _testBlitBlendMode(), SDL_FreeSurface, SDLTest_AssertCheck(), SDLTest_CompareSurfaces(), SDLTest_ImageBlit(), and TEST_COMPLETED.
int surface_testBlitAlphaMod | ( | void * | arg | ) |
Tests some blitting routines with alpha mod.
Definition at line 455 of file testautomation_surface.c.
References _testBlitBlendMode(), SDL_FreeSurface, SDLTest_AssertCheck(), SDLTest_CompareSurfaces(), SDLTest_ImageBlitAlpha(), and TEST_COMPLETED.
int surface_testBlitBlendAdd | ( | void * | arg | ) |
Tests some more blitting routines.
Definition at line 525 of file testautomation_surface.c.
References _testBlitBlendMode(), SDL_BLENDMODE_ADD, SDL_FreeSurface, SDLTest_AssertCheck(), SDLTest_CompareSurfaces(), SDLTest_ImageBlitBlendAdd(), and TEST_COMPLETED.
int surface_testBlitBlendBlend | ( | void * | arg | ) |
Tests some more blitting routines.
Definition at line 502 of file testautomation_surface.c.
References _testBlitBlendMode(), SDL_BLENDMODE_BLEND, SDL_FreeSurface, SDLTest_AssertCheck(), SDLTest_CompareSurfaces(), SDLTest_ImageBlitBlend(), and TEST_COMPLETED.
int surface_testBlitBlendLoop | ( | void * | arg | ) |
Tests some more blitting routines with loop.
Definition at line 571 of file testautomation_surface.c.
References _testBlitBlendMode(), SDL_FreeSurface, SDLTest_AssertCheck(), SDLTest_CompareSurfaces(), SDLTest_ImageBlitBlendAll(), and TEST_COMPLETED.
int surface_testBlitBlendMod | ( | void * | arg | ) |
Tests some more blitting routines.
Definition at line 548 of file testautomation_surface.c.
References _testBlitBlendMode(), SDL_BLENDMODE_MOD, SDL_FreeSurface, SDLTest_AssertCheck(), SDLTest_CompareSurfaces(), SDLTest_ImageBlitBlendMod(), and TEST_COMPLETED.
int surface_testBlitBlendNone | ( | void * | arg | ) |
Tests some more blitting routines.
Definition at line 479 of file testautomation_surface.c.
References _testBlitBlendMode(), SDL_BLENDMODE_NONE, SDL_FreeSurface, SDLTest_AssertCheck(), SDLTest_CompareSurfaces(), SDLTest_ImageBlitBlendNone(), and TEST_COMPLETED.
int surface_testBlitColorMod | ( | void * | arg | ) |
Tests some blitting routines with color mod.
Definition at line 432 of file testautomation_surface.c.
References _testBlitBlendMode(), SDL_FreeSurface, SDLTest_AssertCheck(), SDLTest_CompareSurfaces(), SDLTest_ImageBlitColor(), and TEST_COMPLETED.
int surface_testCompleteSurfaceConversion | ( | void * | arg | ) |
Definition at line 307 of file testautomation_surface.c.
References SDL_PixelFormat::Amask, SDL_PixelFormat::BytesPerPixel, SDL_Surface::format, i, j, NULL, SDL_PixelFormat::palette, SDL_Surface::pixels, SDL_AllocFormat, SDL_arraysize, SDL_assert, SDL_ConvertSurface, SDL_FreeFormat, SDL_FreeSurface, SDL_PIXELFORMAT_ABGR1555, SDL_PIXELFORMAT_ABGR4444, SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_ARGB1555, SDL_PIXELFORMAT_ARGB2101010, SDL_PIXELFORMAT_ARGB4444, SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGR24, SDL_PIXELFORMAT_BGR555, SDL_PIXELFORMAT_BGR565, SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_BGRA4444, SDL_PIXELFORMAT_BGRA5551, SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_BGRX8888, SDL_PIXELFORMAT_INDEX8, SDL_PIXELFORMAT_RGB24, SDL_PIXELFORMAT_RGB332, SDL_PIXELFORMAT_RGB444, SDL_PIXELFORMAT_RGB555, SDL_PIXELFORMAT_RGB565, SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_RGBA4444, SDL_PIXELFORMAT_RGBA5551, SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_RGBX8888, SDL_RLEACCEL, SDL_SetColorKey, SDLTest_AssertCheck(), SDLTest_AssertPass(), SDLTest_CompareSurfaces(), SDLTest_ImageFace(), TEST_ABORTED, and TEST_COMPLETED.
int surface_testLoadFailure | ( | void * | arg | ) |
Tests sprite loading. A failure case.
Definition at line 397 of file testautomation_surface.c.
References NULL, SDL_LoadBMP, SDLTest_AssertCheck(), and TEST_COMPLETED.
int surface_testSaveLoadBitmap | ( | void * | arg | ) |
Tests sprite saving and loading.
Definition at line 220 of file testautomation_surface.c.
References _AssertFileExist(), SDL_Surface::h, NULL, SDL_FreeSurface, SDL_LoadBMP, SDL_SaveBMP, SDLTest_AssertCheck(), SDLTest_AssertPass(), SDLTest_ImageFace(), TEST_ABORTED, TEST_COMPLETED, and SDL_Surface::w.
int surface_testSurfaceConversion | ( | void * | arg | ) |
Definition at line 266 of file testautomation_surface.c.
References SDL_Surface::format, NULL, SDL_ConvertSurface, SDL_FreeSurface, SDL_RLEACCEL, SDL_SetColorKey, SDLTest_AssertCheck(), SDLTest_AssertPass(), SDLTest_CompareSurfaces(), SDLTest_ImageFace(), TEST_ABORTED, and TEST_COMPLETED.
|
static |
Definition at line 27 of file testautomation_surface.c.
Referenced by render_testBlit(), render_testBlitAlpha(), render_testBlitBlend(), render_testBlitColor(), render_testPrimitives(), and render_testPrimitivesBlend().
|
static |
Definition at line 594 of file testautomation_surface.c.
|
static |
Definition at line 623 of file testautomation_surface.c.
|
static |
Definition at line 627 of file testautomation_surface.c.
|
static |
Definition at line 630 of file testautomation_surface.c.
|
static |
Definition at line 597 of file testautomation_surface.c.
|
static |
Definition at line 600 of file testautomation_surface.c.
|
static |
Definition at line 603 of file testautomation_surface.c.
|
static |
Definition at line 606 of file testautomation_surface.c.
|
static |
Definition at line 609 of file testautomation_surface.c.
|
static |
Definition at line 612 of file testautomation_surface.c.
|
static |
Definition at line 615 of file testautomation_surface.c.
|
static |
Definition at line 619 of file testautomation_surface.c.
|
static |
Definition at line 634 of file testautomation_surface.c.
SDLTest_TestSuiteReference surfaceTestSuite |
Definition at line 641 of file testautomation_surface.c.
|
static |
Definition at line 28 of file testautomation_surface.c.
Referenced by _compare().