24 return sizeoftype != hardcodetype;
60 Uint32 value32 = 0xEFBEADDE;
61 Uint32 swapped32 = 0xDEADBEEF;
66 value64 |= 0xCDAB3412;
67 swapped64 = 0x1234ABCD;
69 swapped64 |= 0xDEADBEEF;
71 if ((*((
char *) &value) >> 4) == 0
x1) {
79 "Machine detected as %s endian, appears to be %s endian.",
85 "SDL_Swap16(): 16 bit swapped: 0x%X => 0x%X",
90 "SDL_Swap32(): 32 bit swapped: 0x%X => 0x%X",
120 if (platform !=
NULL) {
123 "SDL_GetPlatform(): expected non-empty platform, was platform: '%s', len: %i",
131 "SDL_GetCPUCount(): expected count > 0, was: %i",
137 "SDL_GetCPUCacheLineSize(): expected size >= 0, was: %i",
216 "SDL_GetVersion(): returned major %i (>= %i)",
220 "SDL_GetVersion(): returned minor %i (>= %i)",
239 "SDL_VERSION() returned major %i (>= %i)",
243 "SDL_VERSION() returned minor %i (>= %i)",
261 "SDL_WasInit(0): returned %i, expected != 0",
266 "SDL_Init(0): returned %i, expected 0, error: %s",
283 const char *testError =
"Testing";
293 "SDL_GetError() != NULL");
294 if (lastError !=
NULL)
298 "SDL_GetError(): no message expected, len: %i", (
int) len);
306 "SDL_GetError() != NULL");
307 if (lastError !=
NULL)
311 "SDL_GetError(): expected message len %i, was len: %i",
315 "SDL_GetError(): expected message %s, was message: %s",
335 const char *testError =
"";
344 "SDL_GetError() != NULL");
345 if (lastError !=
NULL)
349 "SDL_GetError(): expected message len %i, was len: %i",
353 "SDL_GetError(): expected message '%s', was message: '%s'",
373 const char *invalidError =
NULL;
374 const char *probeError =
"Testing";
388 "SDL_GetError() != NULL");
389 if (lastError !=
NULL)
393 "SDL_GetError(): expected message len 0, was len: %i",
408 "SDL_GetError() != NULL");
409 if (lastError !=
NULL)
413 "SDL_GetError(): expected message len 0, was len: %i",
427 "SDL_GetError() != NULL");
428 if (lastError !=
NULL)
432 "SDL_GetError(): expected message len %i, was len: %i",
436 "SDL_GetError(): expected message '%s', was message: '%s'",
470 "SDL_GetPowerInfo(): state %i is one of the expected values",
477 "SDL_GetPowerInfo(): on battery, secs >= 0, was: %i",
480 (pct >= 0) && (pct <= 100),
481 "SDL_GetPowerInfo(): on battery, pct=[0,100], was: %i",
490 "SDL_GetPowerInfo(): no battery, secs == -1, was: %i",
494 "SDL_GetPowerInfo(): no battery, pct == -1, was: %i",
502 "State %i returned when only 'secs' requested",
506 "Value %i matches when only 'secs' requested",
511 "State %i returned when only 'pct' requested",
515 "Value %i matches when only 'pct' requested",
520 "State %i returned when no value requested",
#define SDL_MINOR_VERSION
GLuint GLfloat GLfloat GLfloat x1
#define SDL_MAJOR_VERSION
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.
#define SDL_VERSION(x)
Macro to determine SDL version program was compiled against.
SDL_FORCE_INLINE Uint32 SDL_Swap32(Uint32 x)
int(* SDLTest_TestCaseFp)(void *arg)
Information the version of SDL in use.
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...
#define SDL_GetRevisionNumber
#define SDL_INIT_EVERYTHING
SDL_FORCE_INLINE Uint16 SDL_Swap16(Uint16 x)
GLsizei const GLfloat * value
#define SDL_GetCPUCacheLineSize
SDL_PowerState
The basic state for the system's power supply.
SDL_FORCE_INLINE Uint64 SDL_Swap64(Uint64 x)