diff options
| author | Sam Russell <sam.h.russell@gmail.com> | 2025-12-02 20:12:17 +0100 |
|---|---|---|
| committer | Hans Kristian Rosbach <hk-github@circlestorm.org> | 2025-12-02 21:40:37 +0100 |
| commit | af3de94a0397752dfcbed24908f3e5857d5ad49c (patch) | |
| tree | 38e1de05df4bc9df91c0cbd8344e079a76062eaa | |
| parent | 0f729815718f63fac38205f84dcb6e635646b2e8 (diff) | |
| download | Project-Tick-af3de94a0397752dfcbed24908f3e5857d5ad49c.tar.gz Project-Tick-af3de94a0397752dfcbed24908f3e5857d5ad49c.zip | |
Chorba: Add test cases for #2029
Add test case from @KungFuJesus and a few others in similar data lengths
| -rw-r--r-- | test/crc32_test_strings_p.h | 17 | ||||
| -rw-r--r-- | test/test_crc32_fold_copy.cc | 2 |
2 files changed, 15 insertions, 4 deletions
diff --git a/test/crc32_test_strings_p.h b/test/crc32_test_strings_p.h index f6960b480a..c1a15f0b2f 100644 --- a/test/crc32_test_strings_p.h +++ b/test/crc32_test_strings_p.h @@ -1,10 +1,10 @@ #ifndef CRC32_TEST_STRINGS_P_H #define CRC32_TEST_STRINGS_P_H -ALIGNED_(16) static uint8_t crc32_fullwin_buf[32768]; +ALIGNED_(16) static uint8_t crc32_fullwin_buf[615336]; static uint8_t* crc32_setup_buf() { - for (int i = 0; i < 32768; ++i) { + for (int i = 0; i < 615336; ++i) { uint8_t ic = (uint8_t)(i % 256); crc32_fullwin_buf[i] = ic; } @@ -177,7 +177,18 @@ static const crc32_test crc32_tests[] = { "h{bcmdC+a;t+Cf{6Y_dFq-{X4Yu&7uNfVDh?q&_u.UWJU],-GiH7ADzb7-V.Q%4=+v!$L9W+T=bP]$_:]Vyg}A.ygD.r;h-D]m%&" "h{bcmdC+a;t+Cf{6Y_dFq-{X4Yu&7uNfVDh?q&_u.UWJU],-GiH7ADzb7-V.Q%4=+v!$L9W+T=bP]$_:]Vyg}A.ygD.r;h-D]m%&", 600, 0x888AFA5B}, {0x0, buf32k, 32768, 0x217726B2}, - {0x0, buf32k, 16384, 0xE81722F0} + {0x0, buf32k, 16384, 0xE81722F0}, + {0x0, buf32k, 118960+512, 0xF0D2C66F}, + {0x0, buf32k, 615078, 0x6A023677}, + {0x0, buf32k, 615142, 0x8A1B2FC5}, + {0x0, buf32k, 615270, 0xAF836355}, + {0x0, buf32k, 615302, 0x42E83C6C}, + {0x0, buf32k, 615318, 0x563BCB26}, + {0x0, buf32k, 615326, 0xD39DEA79}, + {0x0, buf32k, 615330, 0xEC355488}, + {0x0, buf32k, 615334, 0x391AB77C}, + {0x0, buf32k, 615335, 0xB43DCEF0}, + {0x0, buf32k, 615336, 0x27b91614} }; #endif /* CRC32_TEST_STRINGS_P_H */ diff --git a/test/test_crc32_fold_copy.cc b/test/test_crc32_fold_copy.cc index 8b489fbbe6..8330a4a6df 100644 --- a/test/test_crc32_fold_copy.cc +++ b/test/test_crc32_fold_copy.cc @@ -12,7 +12,7 @@ extern "C" { # include "crc32_test_strings_p.h" } -#define BUFSIZE 33792U +#define BUFSIZE 615336U class crc32_fc_variant : public ::testing::TestWithParam<crc32_test> { protected: |
