Go to the source code of this file.
◆ SDLTest_CompareMemory()
| int SDLTest_CompareMemory |
( |
const void * | actual, |
|
|
size_t | size_actual, |
|
|
const void * | reference, |
|
|
size_t | size_reference ) |
Compares 2 memory blocks for equality
- Parameters
-
| actual | Memory used in comparison, displayed on the left |
| size_actual | Size of actual in bytes |
| reference | Reference memory, displayed on the right |
| size_reference | Size of reference in bytes |
- Returns
- 0 if the left and right memory block are equal, non-zero if they are non-equal.
- Since
- This function is available since SDL 3.2.0.
◆ SDLTest_CompareSurfaces()
Comparison function of SDL test framework.
This code is a part of the SDL test library, not the main SDL library. Compares a surface and with reference image data for equality
- Parameters
-
| surface | Surface used in comparison |
| referenceSurface | Test Surface used in comparison |
| allowable_error | Allowable difference (=sum of squared difference for each RGB component) in blending accuracy. |
- Returns
- 0 if comparison succeeded, >0 (=number of pixels for which the comparison failed) if comparison failed, -1 if any of the surfaces were NULL, -2 if the surface sizes differ.
◆ SDLTest_CompareSurfacesIgnoreTransparentPixels()
| int SDLTest_CompareSurfacesIgnoreTransparentPixels |
( |
SDL_Surface * | surface, |
|
|
SDL_Surface * | referenceSurface, |
|
|
int | allowable_error ) |