Mercurial > crc32
comparison crc32-test.c @ 2:ead9f84d11db
*: make it work on non-x86 too
| author | Paper <paper@tflc.us> |
|---|---|
| date | Mon, 09 Feb 2026 01:21:00 -0500 |
| parents | 90cb48b87dcc |
| children | 6483683ac857 |
comparison
equal
deleted
inserted
replaced
| 1:90cb48b87dcc | 2:ead9f84d11db |
|---|---|
| 20 | 20 |
| 21 for (i = 0; i < ARRAY_SIZE(crc); i++) { | 21 for (i = 0; i < ARRAY_SIZE(crc); i++) { |
| 22 uint32_t thiscrc = ~crc[i](0xFFFFFFFF, testdata, sizeof(testdata)); | 22 uint32_t thiscrc = ~crc[i](0xFFFFFFFF, testdata, sizeof(testdata)); |
| 23 | 23 |
| 24 if (thiscrc != crcc) { | 24 if (thiscrc != crcc) { |
| 25 fprintf(stderr, "%zu, mismatch: %08x, %08x\n", i, crcc, thiscrc); | 25 fprintf(stderr, "%zu, mismatch: %08" PRIX32 ", %08" PRIx32 "\n", i, crcc, thiscrc); |
| 26 return -1; | 26 return -1; |
| 27 } | 27 } |
| 28 } | 28 } |
| 29 | 29 |
| 30 return 0; | 30 return 0; |
