Repository navigation
feat(geometry): define supported boundaries and add regression tests … - #42
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
…for LineIntersection (R45-T002) - Document supported domain and boundary behavior in LineIntersection Javadoc - Add focused boundary test suite in LineIntersectionTest covering degenerate zero-length points, standard crossing, T-junction, touching endpoints, extreme coordinates, and null preconditions - Add automated verification check runner work/R45-T002/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 defines and documents the supported boundary contract of
LineIntersectionand introduces focused regression boundary tests covering degenerate zero-length segments, interior crossings, T-junctions, touching endpoints, extreme coordinates, and null precondition handling.Related Issue
Fixes: #2
Type of Change
Changes Made
src/main/java/com/thealgorithms/geometry/LineIntersection.javadetailing 32-bit integer coordinate bounds, degenerate point handling, interior and boundary intersections, collinear overlaps, and non-null preconditions.src/test/java/com/thealgorithms/geometry/LineIntersectionTest.javawith tests on both sides of each boundary:(0, 0)degenerate points intersecting, alongside disjoint degenerate points).(3.0, 3.0)).±1,000,000.NullPointerException.work/R45-T002/check.pyand saved verification evidence inwork/R45-T002/results.jsonandwork/R45-T002/evidence.md.Screenshots / Recordings
N/A (backend geometry utility and test changes only; non-UI)
Testing
All changes have been validated locally using JDK 21 and Maven:
mvn test -Dtest=LineIntersectionTest(Tests run: 14, Failures: 0, Errors: 0, Skipped: 0)mvn checkstyle:check(0 Checkstyle violations)python3 work/R45-T002/check.py(All checks and boundary assertions passed successfully)Checklist
mvn checkstyle:check.Additional Notes
work/R45-T002/evidence.md.python3 work/R45-T002/check.py.