Repository navigation
feat(hashmap): lock down contract and add regression tests for MainCu… - #41
Open
Sapna2007-sst wants to merge 1 commit into
Open
Sapna2007-sst wants to merge 1 commit into
Sapna2007-sst wants to merge 1 commit into
Conversation
…ckooHashing (R45-T001) - Add input/output contract Javadoc to MainCuckooHashing - Add regression test suite MainCuckooHashingTest covering smallest valid input, ordinary input workflow, duplicate key boundary, unexpected menu choice, and observable mutation - Add automated verification check runner work/R45-T001/check.py and verification evidence
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request locks down the input/output contract for
MainCuckooHashingand introduces focused contract regression tests covering the smallest valid input, ordinary workflow input, domain boundaries (repeated key insertion and invalid choice), and observable mutation.Related Issue
Fixes: #1
Type of Change
Changes Made
MainCuckooHashinginsrc/main/java/com/thealgorithms/datastructures/hashmap/hashing/MainCuckooHashing.java.src/test/java/com/thealgorithms/datastructures/hashmap/hashing/MainCuckooHashingTest.javaverifying:4\nExit directly).1 42 5 42 6 4\nAdd, Find, Load Factor, Exit).1 10 1 10\nthrowsIllegalArgumentException).8\nthrowsIllegalArgumentException).1 5 3 4\n).work/R45-T001/check.pyand saved execution evidence inwork/R45-T001/results.jsonandwork/R45-T001/evidence.md.Screenshots / Recordings
N/A (backend CLI driver and unit test changes only; non-UI)
Testing
All changes have been validated locally using JDK 21 and Maven:
mvn test -Dtest=MainCuckooHashingTest(Tests run: 6, Failures: 0, Errors: 0, Skipped: 0)mvn checkstyle:check(0 Checkstyle violations)python3 work/R45-T001/check.py(All checks and assertions passed successfully)Checklist
mvn checkstyle:check.Additional Notes
work/R45-T001/evidence.md.python3 work/R45-T001/check.py.