Create ShapeContractTest (parameterized) #8
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Priority: P0 — High
Context: A testing audit identified these issues in the existing test suite:
A parameterized contract test would catch violations across all Shape implementations at once.
Scope: All Shape implementations (SRectangle, SCircle, STriangle, SText, SCollection)
Goal: Verify Shape interface invariants across all implementations using
@ParameterizedTest+@MethodSource:clone()returns independent copygetBounds()returns a copy (not internal state)translate()mutates in placeRecommended pattern:
Estimate: 2 hours
Dependencies: None
Work in progress on branch
issue-8/shape-contract-test. Commit2ff811eadds parameterized contract tests for clone(), getBounds(), and translate() across all Shape implementations. All 15 new tests pass.