Skip to content

Add tests for CRC32 - #7790

Merged
DenizAltunkapan merged 2 commits into
TheAlgorithms:masterfrom
denizsev:add-crc32-test
Dec 1, 2026
Merged

DenizAltunkapan merged 2 commits into
TheAlgorithms:masterfrom
denizsev:add-crc32-test

Conversation

@denizsev

@denizsev denizsev commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Adds the missing unit tests for CRC32 (others/CRC32.java). The class had no test class.

The tests check the standard CRC-32 values:

Input Expected
"" 0x00000000
"a" 0xE8B7BE43
"123456789" 0xCBF43926 (the usual check value for CRC-32)
"The quick brown fox jumps over the lazy dog" 0x414FA339

Checked locally: mvn -Dtest=CRC32Test test (4 tests, 0 failures), mvn checkstyle:check (0 violations) and clang-format 16 with --style=file.

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized it.
  • All filenames are in PascalCase.
  • All functions and variable names follow Java naming conventions.
  • All new code is formatted with clang-format -i --style=file path/to/your/file.java

The two checklist items about new algorithms do not apply: this PR adds a test class only.

@codecov-commenter

codecov-commenter commented Nov 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.63%. Comparing base (a91cd7b) to head (d1d5246).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #7790      +/-   ##
============================================
+ Coverage     82.60%   82.63%   +0.02%     
- Complexity     8609     8614       +5     
============================================
  Files           848      848              
  Lines         26470    26470              
  Branches       5185     5185              
============================================
+ Hits          21866    21873       +7     
+ Misses         3822     3814       -8     
- Partials        782      783       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@denizsev
denizsev marked this pull request as ready for review November 30, 2026 23:30
@DenizAltunkapan
DenizAltunkapan enabled auto-merge (squash) December 1, 2026 08:56
@DenizAltunkapan
DenizAltunkapan merged commit fb8fa32 into TheAlgorithms:master Dec 1, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants