testautomation_platform.c
Go to the documentation of this file.
/**
* Original code: automated SDL platform test written by Edgar Simo "bobbens"
* Extended and updated by aschiffler at ferzkopp dot net
*/
#include <stdio.h>
#include "SDL.h"
#include "SDL_test.h"
/* ================= Test Case Implementation ================== */
/* Helper functions */
/**
* @brief Compare sizes of types.
*
* @note Watcom C flags these as Warning 201: "Unreachable code" if you just
* compare them directly, so we push it through a function to keep the
* compiler quiet. --ryan.
*/
static int _compareSizeOfType( size_t sizeoftype, size_t hardcodetype )
{
return sizeoftype != hardcodetype;
}
/* Test case functions */
/**
* @brief Tests type sizes.
*/
int platform_testTypes(void *arg)
{
int ret;
ret = _compareSizeOfType( sizeof(Uint8), 1 );
SDLTest_AssertCheck( ret == 0, "sizeof(Uint8) = %lu, expected 1", (unsigned long)sizeof(Uint8) );
ret = _compareSizeOfType( sizeof(Uint16), 2 );
SDLTest_AssertCheck( ret == 0, "sizeof(Uint16) = %lu, expected 2", (unsigned long)sizeof(Uint16) );
ret = _compareSizeOfType( sizeof(Uint32), 4 );
SDLTest_AssertCheck( ret == 0, "sizeof(Uint32) = %lu, expected 4", (unsigned long)sizeof(Uint32) );
ret = _compareSizeOfType( sizeof(Uint64), 8 );
SDLTest_AssertCheck( ret == 0, "sizeof(Uint64) = %lu, expected 8", (unsigned long)sizeof(Uint64) );
return TEST_COMPLETED;
}
/**
* @brief Tests platform endianness and SDL_SwapXY functions.
*/
int platform_testEndianessAndSwap(void *arg)
{
int real_byteorder;
Uint16 value = 0x1234;
Uint16 value16 = 0xCDAB;
Uint16 swapped16 = 0xABCD;
Uint32 value32 = 0xEFBEADDE;
Uint32 swapped32 = 0xDEADBEEF;
Uint64 value64, swapped64;
value64 = 0xEFBEADDE;
value64 <<= 32;
value64 |= 0xCDAB3412;
swapped64 = 0x1234ABCD;
swapped64 <<= 32;
swapped64 |= 0xDEADBEEF;
if ((*((char *) &value) >> 4) == 0x1) {
real_byteorder = SDL_BIG_ENDIAN;
} else {
real_byteorder = SDL_LIL_ENDIAN;
}
/* Test endianness. */
SDLTest_AssertCheck( real_byteorder == SDL_BYTEORDER,
"Machine detected as %s endian, appears to be %s endian.",
(SDL_BYTEORDER == SDL_LIL_ENDIAN) ? "little" : "big",
(real_byteorder == SDL_LIL_ENDIAN) ? "little" : "big" );
/* Test 16 swap. */
SDLTest_AssertCheck( SDL_Swap16(value16) == swapped16,
"SDL_Swap16(): 16 bit swapped: 0x%X => 0x%X",
value16, SDL_Swap16(value16) );
/* Test 32 swap. */
SDLTest_AssertCheck( SDL_Swap32(value32) == swapped32,
"SDL_Swap32(): 32 bit swapped: 0x%X => 0x%X",
value32, SDL_Swap32(value32) );
/* Test 64 swap. */
SDLTest_AssertCheck( SDL_Swap64(value64) == swapped64,
"SDL_Swap64(): 64 bit swapped: 0x%"SDL_PRIX64" => 0x%"SDL_PRIX64,
value64, SDL_Swap64(value64) );
return TEST_COMPLETED;
}
/* !
* \brief Tests SDL_GetXYZ() functions
* \sa
* http://wiki.libsdl.org/moin.cgi/SDL_GetPlatform
* http://wiki.libsdl.org/moin.cgi/SDL_GetCPUCount
* http://wiki.libsdl.org/moin.cgi/SDL_GetCPUCacheLineSize
* http://wiki.libsdl.org/moin.cgi/SDL_GetRevision
* http://wiki.libsdl.org/moin.cgi/SDL_GetRevisionNumber
*/
int platform_testGetFunctions (void *arg)
{
char *platform;
char *revision;
int ret;
int len;
platform = (char *)SDL_GetPlatform();
SDLTest_AssertPass("SDL_GetPlatform()");
SDLTest_AssertCheck(platform != NULL, "SDL_GetPlatform() != NULL");
if (platform != NULL) {
len = SDL_strlen(platform);
SDLTest_AssertCheck(len > 0,
"SDL_GetPlatform(): expected non-empty platform, was platform: '%s', len: %i",
platform,
len);
}
ret = SDL_GetCPUCount();
SDLTest_AssertPass("SDL_GetCPUCount()");
SDLTest_AssertCheck(ret > 0,
"SDL_GetCPUCount(): expected count > 0, was: %i",
ret);
ret = SDL_GetCPUCacheLineSize();
SDLTest_AssertPass("SDL_GetCPUCacheLineSize()");
SDLTest_AssertCheck(ret >= 0,
"SDL_GetCPUCacheLineSize(): expected size >= 0, was: %i",
ret);
revision = (char *)SDL_GetRevision();
SDLTest_AssertPass("SDL_GetRevision()");
SDLTest_AssertCheck(revision != NULL, "SDL_GetRevision() != NULL");
ret = SDL_GetRevisionNumber();
SDLTest_AssertPass("SDL_GetRevisionNumber()");
return TEST_COMPLETED;
}
/* !
* \brief Tests SDL_HasXYZ() functions
* \sa
* http://wiki.libsdl.org/moin.cgi/SDL_Has3DNow
* http://wiki.libsdl.org/moin.cgi/SDL_HasAltiVec
* http://wiki.libsdl.org/moin.cgi/SDL_HasMMX
* http://wiki.libsdl.org/moin.cgi/SDL_HasRDTSC
* http://wiki.libsdl.org/moin.cgi/SDL_HasSSE
* http://wiki.libsdl.org/moin.cgi/SDL_HasSSE2
* http://wiki.libsdl.org/moin.cgi/SDL_HasSSE3
* http://wiki.libsdl.org/moin.cgi/SDL_HasSSE41
* http://wiki.libsdl.org/moin.cgi/SDL_HasSSE42
* http://wiki.libsdl.org/moin.cgi/SDL_HasAVX
*/
int platform_testHasFunctions (void *arg)
{
int ret;
/* TODO: independently determine and compare values as well */
ret = SDL_HasRDTSC();
SDLTest_AssertPass("SDL_HasRDTSC()");
ret = SDL_HasAltiVec();
SDLTest_AssertPass("SDL_HasAltiVec()");
ret = SDL_HasMMX();
SDLTest_AssertPass("SDL_HasMMX()");
ret = SDL_Has3DNow();
SDLTest_AssertPass("SDL_Has3DNow()");
ret = SDL_HasSSE();
SDLTest_AssertPass("SDL_HasSSE()");
ret = SDL_HasSSE2();
SDLTest_AssertPass("SDL_HasSSE2()");
ret = SDL_HasSSE3();
SDLTest_AssertPass("SDL_HasSSE3()");
ret = SDL_HasSSE41();
SDLTest_AssertPass("SDL_HasSSE41()");
ret = SDL_HasSSE42();
SDLTest_AssertPass("SDL_HasSSE42()");
ret = SDL_HasAVX();
SDLTest_AssertPass("SDL_HasAVX()");
return TEST_COMPLETED;
}
/* !
* \brief Tests SDL_GetVersion
* \sa
* http://wiki.libsdl.org/moin.cgi/SDL_GetVersion
*/
int platform_testGetVersion(void *arg)
{
SDL_version linked;
int major = SDL_MAJOR_VERSION;
int minor = SDL_MINOR_VERSION;
SDL_GetVersion(&linked);
SDLTest_AssertCheck( linked.major >= major,
"SDL_GetVersion(): returned major %i (>= %i)",
linked.major,
major);
SDLTest_AssertCheck( linked.minor >= minor,
"SDL_GetVersion(): returned minor %i (>= %i)",
linked.minor,
minor);
return TEST_COMPLETED;
}
/* !
* \brief Tests SDL_VERSION macro
*/
int platform_testSDLVersion(void *arg)
{
SDL_version compiled;
int major = SDL_MAJOR_VERSION;
int minor = SDL_MINOR_VERSION;
SDL_VERSION(&compiled);
SDLTest_AssertCheck( compiled.major >= major,
"SDL_VERSION() returned major %i (>= %i)",
compiled.major,
major);
SDLTest_AssertCheck( compiled.minor >= minor,
"SDL_VERSION() returned minor %i (>= %i)",
compiled.minor,
minor);
return TEST_COMPLETED;
}
/* !
* \brief Tests default SDL_Init
*/
int platform_testDefaultInit(void *arg)
{
int ret;
int subsystem;
subsystem = SDL_WasInit(SDL_INIT_EVERYTHING);
SDLTest_AssertCheck( subsystem != 0,
"SDL_WasInit(0): returned %i, expected != 0",
subsystem);
ret = SDL_Init(SDL_WasInit(SDL_INIT_EVERYTHING));
SDLTest_AssertCheck( ret == 0,
"SDL_Init(0): returned %i, expected 0, error: %s",
ret,
SDL_GetError());
return TEST_COMPLETED;
}
/* !
* \brief Tests SDL_Get/Set/ClearError
* \sa
* http://wiki.libsdl.org/moin.cgi/SDL_GetError
* http://wiki.libsdl.org/moin.cgi/SDL_SetError
* http://wiki.libsdl.org/moin.cgi/SDL_ClearError
*/
int platform_testGetSetClearError(void *arg)
{
int result;
const char *testError = "Testing";
char *lastError;
int len;
SDL_ClearError();
SDLTest_AssertPass("SDL_ClearError()");
lastError = (char *)SDL_GetError();
SDLTest_AssertPass("SDL_GetError()");
SDLTest_AssertCheck(lastError != NULL,
"SDL_GetError() != NULL");
if (lastError != NULL)
{
len = SDL_strlen(lastError);
SDLTest_AssertCheck(len == 0,
"SDL_GetError(): no message expected, len: %i", len);
}
result = SDL_SetError("%s", testError);
SDLTest_AssertPass("SDL_SetError()");
SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result);
lastError = (char *)SDL_GetError();
SDLTest_AssertCheck(lastError != NULL,
"SDL_GetError() != NULL");
if (lastError != NULL)
{
len = SDL_strlen(lastError);
SDLTest_AssertCheck(len == SDL_strlen(testError),
"SDL_GetError(): expected message len %i, was len: %i",
SDL_strlen(testError),
len);
SDLTest_AssertCheck(SDL_strcmp(lastError, testError) == 0,
"SDL_GetError(): expected message %s, was message: %s",
testError,
lastError);
}
/* Clean up */
SDL_ClearError();
SDLTest_AssertPass("SDL_ClearError()");
return TEST_COMPLETED;
}
/* !
* \brief Tests SDL_SetError with empty input
* \sa
* http://wiki.libsdl.org/moin.cgi/SDL_SetError
*/
int platform_testSetErrorEmptyInput(void *arg)
{
int result;
const char *testError = "";
char *lastError;
int len;
result = SDL_SetError("%s", testError);
SDLTest_AssertPass("SDL_SetError()");
SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result);
lastError = (char *)SDL_GetError();
SDLTest_AssertCheck(lastError != NULL,
"SDL_GetError() != NULL");
if (lastError != NULL)
{
len = SDL_strlen(lastError);
SDLTest_AssertCheck(len == SDL_strlen(testError),
"SDL_GetError(): expected message len %i, was len: %i",
SDL_strlen(testError),
len);
SDLTest_AssertCheck(SDL_strcmp(lastError, testError) == 0,
"SDL_GetError(): expected message '%s', was message: '%s'",
testError,
lastError);
}
/* Clean up */
SDL_ClearError();
SDLTest_AssertPass("SDL_ClearError()");
return TEST_COMPLETED;
}
/* !
* \brief Tests SDL_SetError with invalid input
* \sa
* http://wiki.libsdl.org/moin.cgi/SDL_SetError
*/
int platform_testSetErrorInvalidInput(void *arg)
{
int result;
const char *invalidError = NULL;
const char *probeError = "Testing";
char *lastError;
int len;
/* Reset */
SDL_ClearError();
SDLTest_AssertPass("SDL_ClearError()");
/* Check for no-op */
result = SDL_SetError(invalidError);
SDLTest_AssertPass("SDL_SetError()");
SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result);
lastError = (char *)SDL_GetError();
SDLTest_AssertCheck(lastError != NULL,
"SDL_GetError() != NULL");
if (lastError != NULL)
{
len = SDL_strlen(lastError);
SDLTest_AssertCheck(len == 0,
"SDL_GetError(): expected message len 0, was len: %i",
len);
}
/* Set */
result = SDL_SetError(probeError);
SDLTest_AssertPass("SDL_SetError('%s')", probeError);
SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result);
/* Check for no-op */
result = SDL_SetError(invalidError);
SDLTest_AssertPass("SDL_SetError(NULL)");
SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result);
lastError = (char *)SDL_GetError();
SDLTest_AssertCheck(lastError != NULL,
"SDL_GetError() != NULL");
if (lastError != NULL)
{
len = SDL_strlen(lastError);
SDLTest_AssertCheck(len == 0,
"SDL_GetError(): expected message len 0, was len: %i",
len);
}
/* Reset */
SDL_ClearError();
SDLTest_AssertPass("SDL_ClearError()");
/* Set and check */
result = SDL_SetError(probeError);
SDLTest_AssertPass("SDL_SetError()");
SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result);
lastError = (char *)SDL_GetError();
SDLTest_AssertCheck(lastError != NULL,
"SDL_GetError() != NULL");
if (lastError != NULL)
{
len = SDL_strlen(lastError);
SDLTest_AssertCheck(len == SDL_strlen(probeError),
"SDL_GetError(): expected message len %i, was len: %i",
SDL_strlen(probeError),
len);
SDLTest_AssertCheck(SDL_strcmp(lastError, probeError) == 0,
"SDL_GetError(): expected message '%s', was message: '%s'",
probeError,
lastError);
}
/* Clean up */
SDL_ClearError();
SDLTest_AssertPass("SDL_ClearError()");
return TEST_COMPLETED;
}
/* !
* \brief Tests SDL_GetPowerInfo
* \sa
* http://wiki.libsdl.org/moin.cgi/SDL_GetPowerInfo
*/
int platform_testGetPowerInfo(void *arg)
{
SDL_PowerState state;
SDL_PowerState stateAgain;
int secs;
int secsAgain;
int pct;
int pctAgain;
state = SDL_GetPowerInfo(&secs, &pct);
SDLTest_AssertPass("SDL_GetPowerInfo()");
SDLTest_AssertCheck(
state==SDL_POWERSTATE_UNKNOWN ||
state==SDL_POWERSTATE_ON_BATTERY ||
state==SDL_POWERSTATE_NO_BATTERY ||
state==SDL_POWERSTATE_CHARGING ||
state==SDL_POWERSTATE_CHARGED,
"SDL_GetPowerInfo(): state %i is one of the expected values",
(int)state);
if (state==SDL_POWERSTATE_ON_BATTERY)
{
SDLTest_AssertCheck(
secs >= 0,
"SDL_GetPowerInfo(): on battery, secs >= 0, was: %i",
secs);
SDLTest_AssertCheck(
(pct >= 0) && (pct <= 100),
"SDL_GetPowerInfo(): on battery, pct=[0,100], was: %i",
pct);
}
if (state==SDL_POWERSTATE_UNKNOWN ||
state==SDL_POWERSTATE_NO_BATTERY)
{
SDLTest_AssertCheck(
secs == -1,
"SDL_GetPowerInfo(): no battery, secs == -1, was: %i",
secs);
SDLTest_AssertCheck(
pct == -1,
"SDL_GetPowerInfo(): no battery, pct == -1, was: %i",
pct);
}
/* Partial return value variations */
stateAgain = SDL_GetPowerInfo(&secsAgain, NULL);
SDLTest_AssertCheck(
state==stateAgain,
"State %i returned when only 'secs' requested",
stateAgain);
SDLTest_AssertCheck(
secs==secsAgain,
"Value %i matches when only 'secs' requested",
secsAgain);
stateAgain = SDL_GetPowerInfo(NULL, &pctAgain);
SDLTest_AssertCheck(
state==stateAgain,
"State %i returned when only 'pct' requested",
stateAgain);
SDLTest_AssertCheck(
pct==pctAgain,
"Value %i matches when only 'pct' requested",
pctAgain);
stateAgain = SDL_GetPowerInfo(NULL, NULL);
SDLTest_AssertCheck(
state==stateAgain,
"State %i returned when no value requested",
stateAgain);
return TEST_COMPLETED;
}
/* ================= Test References ================== */
/* Platform test cases */
static const SDLTest_TestCaseReference platformTest1 =
{ (SDLTest_TestCaseFp)platform_testTypes, "platform_testTypes", "Tests predefined types", TEST_ENABLED};
static const SDLTest_TestCaseReference platformTest2 =
{ (SDLTest_TestCaseFp)platform_testEndianessAndSwap, "platform_testEndianessAndSwap", "Tests endianess and swap functions", TEST_ENABLED};
static const SDLTest_TestCaseReference platformTest3 =
{ (SDLTest_TestCaseFp)platform_testGetFunctions, "platform_testGetFunctions", "Tests various SDL_GetXYZ functions", TEST_ENABLED};
static const SDLTest_TestCaseReference platformTest4 =
{ (SDLTest_TestCaseFp)platform_testHasFunctions, "platform_testHasFunctions", "Tests various SDL_HasXYZ functions", TEST_ENABLED};
static const SDLTest_TestCaseReference platformTest5 =
{ (SDLTest_TestCaseFp)platform_testGetVersion, "platform_testGetVersion", "Tests SDL_GetVersion function", TEST_ENABLED};
static const SDLTest_TestCaseReference platformTest6 =
{ (SDLTest_TestCaseFp)platform_testSDLVersion, "platform_testSDLVersion", "Tests SDL_VERSION macro", TEST_ENABLED};
static const SDLTest_TestCaseReference platformTest7 =
{ (SDLTest_TestCaseFp)platform_testDefaultInit, "platform_testDefaultInit", "Tests default SDL_Init", TEST_ENABLED};
static const SDLTest_TestCaseReference platformTest8 =
{ (SDLTest_TestCaseFp)platform_testGetSetClearError, "platform_testGetSetClearError", "Tests SDL_Get/Set/ClearError", TEST_ENABLED};
static const SDLTest_TestCaseReference platformTest9 =
{ (SDLTest_TestCaseFp)platform_testSetErrorEmptyInput, "platform_testSetErrorEmptyInput", "Tests SDL_SetError with empty input", TEST_ENABLED};
static const SDLTest_TestCaseReference platformTest10 =
{ (SDLTest_TestCaseFp)platform_testSetErrorInvalidInput, "platform_testSetErrorInvalidInput", "Tests SDL_SetError with invalid input", TEST_ENABLED};
static const SDLTest_TestCaseReference platformTest11 =
{ (SDLTest_TestCaseFp)platform_testGetPowerInfo, "platform_testGetPowerInfo", "Tests SDL_GetPowerInfo function", TEST_ENABLED };
/* Sequence of Platform test cases */
static const SDLTest_TestCaseReference *platformTests[] = {
&platformTest1,
&platformTest2,
&platformTest3,
&platformTest4,
&platformTest5,
&platformTest6,
&platformTest7,
&platformTest8,
&platformTest9,
&platformTest10,
&platformTest11,
NULL
};
/* Platform test suite (global) */
SDLTest_TestSuiteReference platformTestSuite = {
"Platform",
NULL,
platformTests,
NULL
};
SDL_test.h
SDL_MINOR_VERSION
#define SDL_MINOR_VERSION
Definition: SDL_version.h:61
platform_testGetVersion
int platform_testGetVersion(void *arg)
Definition: testautomation_platform.c:208
SDL_HasAltiVec
#define SDL_HasAltiVec
Definition: SDL_dynapi_overrides.h:110
SDL_ClearError
#define SDL_ClearError
Definition: SDL_dynapi_overrides.h:120
SDL_HasAVX
#define SDL_HasAVX
Definition: SDL_dynapi_overrides.h:575
SDL_GetError
#define SDL_GetError
Definition: SDL_dynapi_overrides.h:119
SDL_Has3DNow
#define SDL_Has3DNow
Definition: SDL_dynapi_overrides.h:112
x1
GLuint GLfloat GLfloat GLfloat x1
Definition: SDL_opengl_glext.h:8583
platform_testGetPowerInfo
int platform_testGetPowerInfo(void *arg)
Definition: testautomation_platform.c:453
result
GLuint64EXT * result
Definition: SDL_opengl_glext.h:9432
SDLTest_TestSuiteReference
Definition: SDL_test_harness.h:89
Uint32
uint32_t Uint32
An unsigned 32-bit integer type.
Definition: SDL_stdinc.h:157
platformTest9
static const SDLTest_TestCaseReference platformTest9
Definition: testautomation_platform.c:553
platform_testEndianessAndSwap
int platform_testEndianessAndSwap(void *arg)
Tests platform endianness and SDL_SwapXY functions.
Definition: testautomation_platform.c:54
SDL_MAJOR_VERSION
#define SDL_MAJOR_VERSION
Definition: SDL_version.h:60
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
state
struct xkb_state * state
Definition: SDL_waylandsym.h:97
SDL_version::major
Uint8 major
Definition: SDL_version.h:53
_compareSizeOfType
static int _compareSizeOfType(size_t sizeoftype, size_t hardcodetype)
Compare sizes of types.
Definition: testautomation_platform.c:22
SDL_POWERSTATE_UNKNOWN
Definition: SDL_power.h:44
SDL_LIL_ENDIAN
#define SDL_LIL_ENDIAN
Definition: SDL_endian.h:37
SDL_HasSSE3
#define SDL_HasSSE3
Definition: SDL_dynapi_overrides.h:115
SDL_POWERSTATE_CHARGED
Definition: SDL_power.h:48
SDL_POWERSTATE_NO_BATTERY
Definition: SDL_power.h:46
platform_testTypes
int platform_testTypes(void *arg)
Tests type sizes.
Definition: testautomation_platform.c:32
platformTests
static const SDLTest_TestCaseReference * platformTests[]
Definition: testautomation_platform.c:563
platformTest2
static const SDLTest_TestCaseReference platformTest2
Definition: testautomation_platform.c:532
platformTest11
static const SDLTest_TestCaseReference platformTest11
Definition: testautomation_platform.c:559
Uint64
uint64_t Uint64
An unsigned 64-bit integer type.
Definition: SDL_stdinc.h:166
len
GLenum GLsizei len
Definition: SDL_opengl_glext.h:2926
SDL_GetRevision
#define SDL_GetRevision
Definition: SDL_dynapi_overrides.h:498
SDL_HasRDTSC
#define SDL_HasRDTSC
Definition: SDL_dynapi_overrides.h:109
SDL_VERSION
#define SDL_VERSION(x)
Macro to determine SDL version program was compiled against.
Definition: SDL_version.h:79
SDL_Swap32
SDL_FORCE_INLINE Uint32 SDL_Swap32(Uint32 x)
Definition: SDL_endian.h:141
SDLTest_TestCaseFp
int(* SDLTest_TestCaseFp)(void *arg)
Definition: SDL_test_harness.h:67
platformTest6
static const SDLTest_TestCaseReference platformTest6
Definition: testautomation_platform.c:544
SDL_GetVersion
#define SDL_GetVersion
Definition: SDL_dynapi_overrides.h:497
SDL_version
Information the version of SDL in use.
Definition: SDL_version.h:51
platform_testGetFunctions
int platform_testGetFunctions(void *arg)
Definition: testautomation_platform.c:110
value
GLsizei const GLfloat * value
Definition: SDL_opengl_glext.h:698
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
platform_testSDLVersion
int platform_testSDLVersion(void *arg)
Definition: testautomation_platform.c:231
Uint8
uint8_t Uint8
An unsigned 8-bit integer type.
Definition: SDL_stdinc.h:139
SDL_GetRevisionNumber
#define SDL_GetRevisionNumber
Definition: SDL_dynapi_overrides.h:499
platform_testGetSetClearError
int platform_testGetSetClearError(void *arg)
Definition: testautomation_platform.c:280
platformTest10
static const SDLTest_TestCaseReference platformTest10
Definition: testautomation_platform.c:556
SDL_INIT_EVERYTHING
#define SDL_INIT_EVERYTHING
Definition: SDL.h:83
SDL_Swap16
SDL_FORCE_INLINE Uint16 SDL_Swap16(Uint16 x)
Definition: SDL_endian.h:101
platform_testHasFunctions
int platform_testHasFunctions(void *arg)
Definition: testautomation_platform.c:164
SDL_HasSSE42
#define SDL_HasSSE42
Definition: SDL_dynapi_overrides.h:117
SDL_version::minor
Uint8 minor
Definition: SDL_version.h:54
SDL_GetPlatform
#define SDL_GetPlatform
Definition: SDL_dynapi_overrides.h:297
SDL_GetPowerInfo
#define SDL_GetPowerInfo
Definition: SDL_dynapi_overrides.h:298
SDL_HasMMX
#define SDL_HasMMX
Definition: SDL_dynapi_overrides.h:111
platformTestSuite
SDLTest_TestSuiteReference platformTestSuite
Definition: testautomation_platform.c:579
platformTest1
static const SDLTest_TestCaseReference platformTest1
Definition: testautomation_platform.c:529
TEST_COMPLETED
#define TEST_COMPLETED
Definition: SDL_test_harness.h:53
platformTest4
static const SDLTest_TestCaseReference platformTest4
Definition: testautomation_platform.c:538
platformTest5
static const SDLTest_TestCaseReference platformTest5
Definition: testautomation_platform.c:541
SDL_GetCPUCacheLineSize
#define SDL_GetCPUCacheLineSize
Definition: SDL_dynapi_overrides.h:108
SDL_HasSSE41
#define SDL_HasSSE41
Definition: SDL_dynapi_overrides.h:116
TEST_ENABLED
#define TEST_ENABLED
Definition: SDL_test_harness.h:47
SDL_PRIX64
#define SDL_PRIX64
Definition: SDL_stdinc.h:210
SDL_POWERSTATE_CHARGING
Definition: SDL_power.h:47
NULL
#define NULL
Definition: begin_code.h:143
SDL_POWERSTATE_ON_BATTERY
Definition: SDL_power.h:45
SDL_PowerState
SDL_PowerState
The basic state for the system&#39;s power supply.
Definition: SDL_power.h:42
platformTest7
static const SDLTest_TestCaseReference platformTest7
Definition: testautomation_platform.c:547
SDL_GetCPUCount
#define SDL_GetCPUCount
Definition: SDL_dynapi_overrides.h:107
SDL_SetError
#define SDL_SetError
Definition: SDL_dynapi_overrides.h:36
SDL_strlen
#define SDL_strlen
Definition: SDL_dynapi_overrides.h:399
SDLTest_TestCaseReference
Definition: SDL_test_harness.h:75
SDL_BIG_ENDIAN
#define SDL_BIG_ENDIAN
Definition: SDL_endian.h:38
SDL_HasSSE2
#define SDL_HasSSE2
Definition: SDL_dynapi_overrides.h:114
platform_testDefaultInit
int platform_testDefaultInit(void *arg)
Definition: testautomation_platform.c:254
SDL_Swap64
SDL_FORCE_INLINE Uint64 SDL_Swap64(Uint64 x)
Definition: SDL_endian.h:175
Uint16
uint16_t Uint16
An unsigned 16-bit integer type.
Definition: SDL_stdinc.h:147
SDL_Init
#define SDL_Init
Definition: SDL_dynapi_overrides.h:60
platform_testSetErrorEmptyInput
int platform_testSetErrorEmptyInput(void *arg)
Definition: testautomation_platform.c:332
SDL_strcmp
#define SDL_strcmp
Definition: SDL_dynapi_overrides.h:423
SDL_WasInit
#define SDL_WasInit
Definition: SDL_dynapi_overrides.h:63
platformTest3
static const SDLTest_TestCaseReference platformTest3
Definition: testautomation_platform.c:535
SDL.h
SDL_HasSSE
#define SDL_HasSSE
Definition: SDL_dynapi_overrides.h:113
SDL_BYTEORDER
#define SDL_BYTEORDER
Definition: SDL_config_pandora.h:36
platform_testSetErrorInvalidInput
int platform_testSetErrorInvalidInput(void *arg)
Definition: testautomation_platform.c:370
platformTest8
static const SDLTest_TestCaseReference platformTest8
Definition: testautomation_platform.c:550