Skip to content

Conversation

kamikkels
Copy link
Contributor

Just call resize with a negative key to trigger line 300 and actually improve the coverage
See issue #465

  • I have performed a self-review of my code
  • My code follows the style guidelines of this project
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Comments in areas I changed are up to date
  • I have added comments to hard-to-understand areas of my code
  • I have made corresponding changes to the README.md

@kamikkels kamikkels requested a review from siriak as a code owner October 3, 2025 09:30
@Copilot Copilot AI review requested due to automatic review settings October 3, 2025 09:30
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a test case to directly test the HashTable.Resize() method with negative hash values to improve code coverage, specifically targeting line 300 mentioned in issue #465.

  • Added a new test method Resize_HandlesNegativeIndexCorrectly() to explicitly call Resize() with a negative hash key

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

codecov bot commented Oct 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.22%. Comparing base (6c220ce) to head (25bbd6d).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #533   +/-   ##
=======================================
  Coverage   95.22%   95.22%           
=======================================
  Files         274      274           
  Lines       10910    10910           
  Branches     1535     1535           
=======================================
  Hits        10389    10389           
  Misses        397      397           
  Partials      124      124           

☔ View full report in Codecov by Sentry.
📢 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.

Copy link
Member

@siriak siriak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@siriak siriak merged commit b47cdc9 into TheAlgorithms:master Oct 3, 2025
4 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.

2 participants