fix the int size check

This commit is contained in:
Kalamatee 2021-01-06 21:24:36 +00:00 committed by deadwood
parent a24f484685
commit da00e541c5
1 changed files with 8 additions and 0 deletions

View File

@ -44,11 +44,19 @@ void testSHORT(void)
void testINT(void)
{
#if (__WORDSIZE == 16)
CU_ASSERT(2 == sizeof(int));
CU_ASSERT(2 == sizeof(signed));
CU_ASSERT(2 == sizeof(signed int));
CU_ASSERT(2 == sizeof(unsigned));
CU_ASSERT(2 == sizeof(unsigned int));
#else
CU_ASSERT(4 == sizeof(int));
CU_ASSERT(4 == sizeof(signed));
CU_ASSERT(4 == sizeof(signed int));
CU_ASSERT(4 == sizeof(unsigned));
CU_ASSERT(4 == sizeof(unsigned int));
#endif
}
void testLONG(void)