Commit bc23fbc
authored
Add unit tests for crc32_slice1 (#424)
Function `crc32_slice1` was a public function lacking test coverage.
This commit adds a `#[cfg(test)]` module to `src/crc32/mod.rs` with:
- `test_crc32_slice1_empty`: Verifies empty input handling.
- `test_crc32_slice1_basic`: Verifies against standard IEEE 802.3 CRC32 value for "Hello, World!".
- `test_crc32_slice1_vs_slice8`: Performs differential testing between the base implementation and the optimized slice8 implementation for various lengths and initial CRC values.1 parent 6615446 commit bc23fbc
1 file changed
Lines changed: 40 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
0 commit comments