Skip to content

Commit

Permalink
added DATA32VALUES to CRC32 test
Browse files Browse the repository at this point in the history
  • Loading branch information
ilevyor committed Apr 14, 2021
1 parent e1ceb55 commit 98320c7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/crc_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ static const uint32_t KNOWN_CRC32C_32_ZEROES = 0x8A9136AA;

static const uint8_t DATA_32_VALUES[32] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31};
static const uint32_t KNOWN_CRC32_32_VALUES = 0x91267E8A;
static const uint32_t KNOWN_CRC32C_32_VALUES = 0x46DD794E;

static const uint8_t TEST_VECTOR[] = {'1', '2', '3', '4', '5', '6', '7', '8', '9'};
Expand Down Expand Up @@ -56,6 +57,7 @@ static int s_test_known_crc(
static int s_test_known_crc32(const char *func_name, crc_fn *func) {
int res = 0;
res |= s_test_known_crc(func_name, func, DATA_NAME(DATA_32_ZEROS), KNOWN_CRC32_32_ZEROES);
res |= s_test_known_crc(func_name, func, DATA_NAME(DATA_32_VALUES), KNOWN_CRC32_32_VALUES);
res |= s_test_known_crc(func_name, func, DATA_NAME(TEST_VECTOR), KNOWN_CRC32_TEST_VECTOR);
return res;
}
Expand Down

0 comments on commit 98320c7

Please sign in to comment.