Mercurial > hg > dmlib
comparison tests/fptest.c @ 2046:186cf6a7d634
Cosmetics.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 03 Dec 2018 10:53:32 +0200 |
parents | 61246926756a |
children | 88be5cf55caf |
comparison
equal
deleted
inserted
replaced
2045:1662730053d0 | 2046:186cf6a7d634 |
---|---|
41 { | 41 { |
42 case SDL_BIG_ENDIAN: s = "big endian"; break; | 42 case SDL_BIG_ENDIAN: s = "big endian"; break; |
43 case SDL_LIL_ENDIAN: s = "little endian"; break; | 43 case SDL_LIL_ENDIAN: s = "little endian"; break; |
44 default: s = "unknown?"; break; | 44 default: s = "unknown?"; break; |
45 } | 45 } |
46 | 46 |
47 printf( | 47 printf( |
48 "SDL byte order = %s (%d)\n\n", s, SDL_BYTEORDER); | 48 "SDL byte order = %s (%d)\n\n", s, SDL_BYTEORDER); |
49 | 49 |
50 printf( | 50 printf( |
51 "sizeof(DMFixedPoint) = %" DM_PRId64 " bytes\n" | 51 "sizeof(DMFixedPoint) = %" DM_PRId64 " bytes\n" |
52 "sizeof(DMFixedPoint.dw) = %" DM_PRId64 " bytes (should be %d)\n" | 52 "sizeof(DMFixedPoint.dw) = %" DM_PRId64 " bytes (should be %d)\n" |
53 "sizeof(DMFixedPoint.w[0]) = %" DM_PRId64 " bytes (should be %d)\n", | 53 "sizeof(DMFixedPoint.w[0]) = %" DM_PRId64 " bytes (should be %d)\n", |
54 sizeof(a), sizeof(a.dw), FP_DW_SIZE, | 54 sizeof(a), sizeof(a.dw), FP_DW_SIZE, |
55 sizeof(a.w[0]), FP_W0_SIZE); | 55 sizeof(a.w[0]), FP_W0_SIZE); |
56 | 56 |
57 if (sizeof(a.dw) != FP_DW_SIZE || sizeof(a.w[0]) != FP_W0_SIZE) | 57 if (sizeof(a.dw) != FP_DW_SIZE || sizeof(a.w[0]) != FP_W0_SIZE) |
58 { | 58 { |
59 printf("ERROR! Some type sizes DO NOT MATCH!\n"); | 59 printf("ERROR! Some type sizes DO NOT MATCH!\n"); |
60 return -1; | 60 return -1; |
61 } | 61 } |
62 | 62 |
63 //----------------------------------------------- | 63 //----------------------------------------------- |
64 header("set initial values"); | 64 header("set initial values"); |
65 FP_SETHL(a, 55, 0); | 65 FP_SETHL(a, 55, 0); |
66 check("a", a, 0x0000003700000000ULL); | 66 check("a", a, 0x0000003700000000ULL); |
67 | 67 |