mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 02:49:02 -04:00
Extend the CRC regression test
This commit is contained in:
parent
610c59e1d8
commit
2df022c38b
1 changed files with 5 additions and 1 deletions
|
|
@ -243,8 +243,12 @@ static void test_crc32c(void)
|
|||
|
||||
for (i = 0; TEST_CRC32C[i].data; ++i) {
|
||||
uint32_t digest;
|
||||
uint32_t digest_gen;
|
||||
|
||||
digest = crc32c(0, (const unsigned char*)TEST_CRC32C[i].data, TEST_CRC32C[i].len);
|
||||
if (digest != TEST_CRC32C[i].digest) {
|
||||
digest_gen = crc32c_gen(0, (const unsigned char*)TEST_CRC32C[i].data, TEST_CRC32C[i].len);
|
||||
|
||||
if (digest != TEST_CRC32C[i].digest || digest_gen != TEST_CRC32C[i].digest) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Failed CRC32C test\n");
|
||||
exit(EXIT_FAILURE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue