Skip to content

test: add comprehensive CRC32C checksum coverage - #3378

Merged
oferchen merged 2 commits into
masterfrom
test/crc32c-coverage
Apr 25, 2026
Merged

oferchen merged 2 commits into
masterfrom
test/crc32c-coverage

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Expand CRC32C test coverage from 12 to 37 tests covering all public APIs and edge cases
  • Add known test vectors with verified CRC32C values (32 zeros, 32 0xFF, ascending/descending bytes, "hello world", "123456789")
  • Add boundary tests for BUF_SIZE-exact and BUF_SIZE+1 file reads
  • Add single-byte uniqueness verification (all 256 values produce distinct checksums)
  • Cover edge cases: empty updates, clone divergence, Debug trait, with_initial semantics, order/length sensitivity, repeating patterns, 4 MiB large input

Test plan

  • All 37 tests pass with cargo nextest run -p checksums --all-features -E 'test(crc32c)'
  • CI passes on all platforms (Linux, macOS, Windows)

@github-actions github-actions Bot added the test label Apr 25, 2026
@oferchen
oferchen force-pushed the test/crc32c-coverage branch from 5c5ecfb to e930672 Compare April 25, 2026 15:14
@oferchen
oferchen force-pushed the test/crc32c-coverage branch from 163a994 to 675dac4 Compare April 25, 2026 18:07
@oferchen
oferchen merged commit 99a5bac into master Apr 25, 2026
40 of 41 checks passed
@oferchen
oferchen deleted the test/crc32c-coverage branch April 25, 2026 18:52
oferchen added a commit that referenced this pull request Apr 25, 2026
Mirrors the CRC32C test pattern from PR #3378: empty/known-vector
hashes, streaming-vs-one-shot parity, byte-at-a-time updates, large
1 MiB+ inputs, varied chunk sizes, determinism, default/clone state,
length-extension protection, hex format checks, and StrongDigest trait
parity. Each module now has 13 tests (1 original + 12 added) covering
the full public API without touching production code.
oferchen added a commit that referenced this pull request May 1, 2026
* test: add comprehensive CRC32C checksum coverage

* fix: clippy lints in crc32c tests (uninlined fmt args, needless borrow)
oferchen added a commit that referenced this pull request May 1, 2026
Mirrors the CRC32C test pattern from PR #3378: empty/known-vector
hashes, streaming-vs-one-shot parity, byte-at-a-time updates, large
1 MiB+ inputs, varied chunk sizes, determinism, default/clone state,
length-extension protection, hex format checks, and StrongDigest trait
parity. Each module now has 13 tests (1 original + 12 added) covering
the full public API without touching production code.
oferchen added a commit that referenced this pull request May 5, 2026
* test: add comprehensive CRC32C checksum coverage

* fix: clippy lints in crc32c tests (uninlined fmt args, needless borrow)
oferchen added a commit that referenced this pull request May 5, 2026
Mirrors the CRC32C test pattern from PR #3378: empty/known-vector
hashes, streaming-vs-one-shot parity, byte-at-a-time updates, large
1 MiB+ inputs, varied chunk sizes, determinism, default/clone state,
length-extension protection, hex format checks, and StrongDigest trait
parity. Each module now has 13 tests (1 original + 12 added) covering
the full public API without touching production code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant