소스 검색

testplatform: make sure bool is 1 byte

Sam Lantinga 1 년 전
부모
커밋
1834c83d5a
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      test/testplatform.c

+ 6 - 0
test/testplatform.c

@@ -48,6 +48,12 @@ static int TestTypes(bool verbose)
 {
     int error = 0;
 
+    if (badsize(sizeof(bool), 1)) {
+        if (verbose) {
+            SDL_Log("sizeof(bool) != 1, instead = %u\n", (unsigned int)sizeof(bool));
+        }
+        ++error;
+    }
     if (badsize(sizeof(Uint8), 1)) {
         if (verbose) {
             SDL_Log("sizeof(Uint8) != 1, instead = %u\n", (unsigned int)sizeof(Uint8));