test: add edge case tests (null, negative coords, zero dimensions) #23

Merged
thib8956 merged 1 commits from issue-13/edge-case-tests into master 2026-03-27 23:24:12 +00:00
Owner

Summary

  • Add 19 edge case tests organized in 5 @Nested classes covering gaps identified in the testing audit.
  • Negative coordinates: SRectangle, SCircle, STriangle at negative coords; translate to negative position.
  • Zero dimensions: Zero-width/height rectangle; zero-radius circle.
  • Resize clamping: Verify AbstractShape clamps to 1, SCircle clamps to 2 on extreme negative resize.
  • Null handling: Null/blank text normalization to placeholder; unknown attribute key returns null; empty collection creation.
  • Large values: Shapes at Integer.MAX_VALUE/2 coords; translate with MAX_VALUE/MIN_VALUE.

Closes #13

## Summary - Add 19 edge case tests organized in 5 `@Nested` classes covering gaps identified in the testing audit. - **Negative coordinates:** SRectangle, SCircle, STriangle at negative coords; translate to negative position. - **Zero dimensions:** Zero-width/height rectangle; zero-radius circle. - **Resize clamping:** Verify AbstractShape clamps to 1, SCircle clamps to 2 on extreme negative resize. - **Null handling:** Null/blank text normalization to placeholder; unknown attribute key returns null; empty collection creation. - **Large values:** Shapes at `Integer.MAX_VALUE/2` coords; translate with `MAX_VALUE`/`MIN_VALUE`. Closes #13
thib8956 added 1 commit 2026-03-27 23:23:18 +00:00
test: add edge case tests for shapes
All checks were successful
CI / build-and-test (pull_request) Successful in 17s
6cc6fbbfe8
Add 19 tests covering edge cases across all shape types:
- Negative coordinates: SRectangle, SCircle, STriangle, translate
- Zero dimensions: zero width/height rectangle, zero radius circle
- Resize clamping: verify width/height minimum enforcement
- Null handling: null/blank text normalization, unknown attribute key, empty collection
- Large values: Integer.MAX_VALUE/2 coords, MAX/MIN_VALUE translate

Closes #13
thib8956 force-pushed issue-13/edge-case-tests from fc0c1b4db9 to 6cc6fbbfe8 2026-03-27 23:23:18 +00:00 Compare
thib8956 merged commit e8cb0810de into master 2026-03-27 23:24:12 +00:00
thib8956 deleted branch issue-13/edge-case-tests 2026-03-27 23:24:12 +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#23