Add edge case tests (null, negative coords, zero dimensions) #13

Closed
opened 2026-03-27 15:01:29 +00:00 by thib8956 · 0 comments
Owner

Priority: P2 — Lower

Context: A testing audit identified that existing shape tests have no edge case coverage. Specific issues found:

  • No null handling — no tests verify behavior with null arguments
  • No negative coordinates — untested territory
  • No zero dimensions — shapes with width/height 0 untested
  • Reflection usage — SCircleTest uses reflection to check color (fragile, should be replaced)

Scope: All shape classes + SCollection + Selection

Goal: Harden existing tests with:

  • Null arguments handling
  • Negative coordinates
  • Zero-dimension shapes
  • Shapes at Integer.MAX_VALUE boundaries

Estimate: 2 hours
Dependencies: Benefits from #8 (ShapeContractTest) being done first for the parameterized pattern

**Priority:** P2 — Lower **Context:** A testing audit identified that existing shape tests have no edge case coverage. Specific issues found: - **No null handling** — no tests verify behavior with null arguments - **No negative coordinates** — untested territory - **No zero dimensions** — shapes with width/height 0 untested - **Reflection usage** — SCircleTest uses reflection to check color (fragile, should be replaced) **Scope:** All shape classes + SCollection + Selection **Goal:** Harden existing tests with: - Null arguments handling - Negative coordinates - Zero-dimension shapes - Shapes at Integer.MAX_VALUE boundaries **Estimate:** 2 hours **Dependencies:** Benefits from #8 (ShapeContractTest) being done first for the parameterized pattern
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: thib8956/new-shapes#13