test: add contains(Point) hit-testing tests for all shapes #21

Merged
thib8956 merged 1 commits from issue-11/contains-point-tests into master 2026-03-27 23:28:59 +00:00
Owner

Summary

  • Add 36 unit tests covering bounds-based hit-testing (getBounds().contains(Point)) for all five shape types: SRectangle, SCircle, STriangle, SText, SCollection.
  • Tests cover: point inside, outside, on boundary (inclusive top-left, exclusive bottom-right per java.awt.Rectangle semantics), and point after translate.
  • SCollection tests verify union bounds, gap between children, and single-child bounds equality.

Closes #11

## Summary - Add 36 unit tests covering bounds-based hit-testing (`getBounds().contains(Point)`) for all five shape types: SRectangle, SCircle, STriangle, SText, SCollection. - Tests cover: point inside, outside, on boundary (inclusive top-left, exclusive bottom-right per `java.awt.Rectangle` semantics), and point after translate. - SCollection tests verify union bounds, gap between children, and single-child bounds equality. Closes #11
thib8956 added 1 commit 2026-03-27 23:25:32 +00:00
test: add contains(Point) hit-testing tests for all shapes
All checks were successful
CI / build-and-test (pull_request) Successful in 16s
740572bfb7
Add 36 tests covering bounds-based hit-testing (getBounds().contains(Point))
for SRectangle, SCircle, STriangle, SText, and SCollection:
- Point inside, outside, on boundary (inclusive top-left, exclusive bottom-right)
- Point after translate to verify position update
- SCollection union bounds, gap between children, single-child bounds

Closes #11
thib8956 force-pushed issue-11/contains-point-tests from b87deecf40 to 740572bfb7 2026-03-27 23:25:32 +00:00 Compare
thib8956 merged commit bf01bae17f into master 2026-03-27 23:28:59 +00:00
thib8956 deleted branch issue-11/contains-point-tests 2026-03-27 23:28:59 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: thib8956/new-shapes#21