diff --git a/crc32/test.c b/crc32/test.c index b3778d1..6d11be8 100644 --- a/crc32/test.c +++ b/crc32/test.c @@ -1,4 +1,5 @@ #include "crc32.h" +#include "crc32_nolookup.h" #include #include @@ -19,6 +20,14 @@ int main(void) { assert(crc == crc32("a", 1)); assert(crc == 0xE8B7BE43); + assert(crc32_ieee("123456789", 9) == 0xCBF43926); + assert(crc32_ieee("", 0) == 0x00000000); + assert(crc32_ieee("a", 1) == 0xE8B7BE43); + assert(crc32_ieee("A", 1) == 0xD3D99E8B); + assert(crc32_ieee("hello", 5) == 0x3610A686); + assert(crc32_ieee("The quick brown fox jumps over the lazy dog", 43) == 0x414FA339); + assert(crc32_ieee("The quick brown fox jumps over the lazy dog.", 44) == 0x519025E9); + printf("All good!\n"); return 0; }