testplatform.c: move static asserts out of TestTypes().

This commit is contained in:
Ozkan Sezer 2022-03-17 14:56:50 +03:00 committed by Sam Lantinga
parent f0d2747df1
commit 01663238dc
1 changed files with 20 additions and 20 deletions

View File

@ -25,11 +25,6 @@ badsize(size_t sizeoftype, size_t 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_MIN_SINT8, SDL_MIN_SINT8 == -128);
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_MIN_UINT64, SDL_MIN_UINT64 == 0);
int
TestTypes(SDL_bool verbose)
{
int error = 0;
if (badsize(sizeof(Uint8), 1)) {
if (verbose)
SDL_Log("sizeof(Uint8) != 1, instead = %u\n",