mirror of
				https://github.com/libsdl-org/SDL.git
				synced 2025-11-04 09:44:35 +00:00 
			
		
		
		
	testplatform.c: move static asserts out of TestTypes().
This commit is contained in:
		
				
					committed by
					
						
						Sam Lantinga
					
				
			
			
				
	
			
			
			
						parent
						
							f0d2747df1
						
					
				
				
					commit
					01663238dc
				
			@@ -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",
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user