mirror of
https://github.com/encounter/SDL.git
synced 2025-05-21 14:51:27 +00:00
testplatform.c: move static asserts out of TestTypes().
This commit is contained in:
parent
f0d2747df1
commit
01663238dc
@ -25,11 +25,6 @@ badsize(size_t sizeoftype, size_t hardcodetype)
|
|||||||
return sizeoftype != hardcodetype;
|
return sizeoftype != hardcodetype;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
|
||||||
TestTypes(SDL_bool verbose)
|
|
||||||
{
|
|
||||||
int error = 0;
|
|
||||||
|
|
||||||
SDL_COMPILE_TIME_ASSERT(SDL_MAX_SINT8, SDL_MAX_SINT8 == 127);
|
SDL_COMPILE_TIME_ASSERT(SDL_MAX_SINT8, SDL_MAX_SINT8 == 127);
|
||||||
SDL_COMPILE_TIME_ASSERT(SDL_MIN_SINT8, SDL_MIN_SINT8 == -128);
|
SDL_COMPILE_TIME_ASSERT(SDL_MIN_SINT8, SDL_MIN_SINT8 == -128);
|
||||||
SDL_COMPILE_TIME_ASSERT(SDL_MAX_UINT8, SDL_MAX_UINT8 == 255);
|
SDL_COMPILE_TIME_ASSERT(SDL_MAX_UINT8, SDL_MAX_UINT8 == 255);
|
||||||
@ -50,6 +45,11 @@ TestTypes(SDL_bool verbose)
|
|||||||
SDL_COMPILE_TIME_ASSERT(SDL_MAX_UINT64, SDL_MAX_UINT64 == 18446744073709551615ull);
|
SDL_COMPILE_TIME_ASSERT(SDL_MAX_UINT64, SDL_MAX_UINT64 == 18446744073709551615ull);
|
||||||
SDL_COMPILE_TIME_ASSERT(SDL_MIN_UINT64, SDL_MIN_UINT64 == 0);
|
SDL_COMPILE_TIME_ASSERT(SDL_MIN_UINT64, SDL_MIN_UINT64 == 0);
|
||||||
|
|
||||||
|
int
|
||||||
|
TestTypes(SDL_bool verbose)
|
||||||
|
{
|
||||||
|
int error = 0;
|
||||||
|
|
||||||
if (badsize(sizeof(Uint8), 1)) {
|
if (badsize(sizeof(Uint8), 1)) {
|
||||||
if (verbose)
|
if (verbose)
|
||||||
SDL_Log("sizeof(Uint8) != 1, instead = %u\n",
|
SDL_Log("sizeof(Uint8) != 1, instead = %u\n",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user