Skip to content

test(shapes): isolate the ShapeContainer outline-fill render surface#201

Merged
DemchaAV merged 1 commit into
developfrom
test/shape-outline-fill-surface-coverage
Jun 16, 2026
Merged

test(shapes): isolate the ShapeContainer outline-fill render surface#201
DemchaAV merged 1 commit into
developfrom
test/shape-outline-fill-surface-coverage

Conversation

@DemchaAV

Copy link
Copy Markdown
Owner

Why

ShapeOutlineRenderCoverageTest is the exhaustiveness guard that stops a new
ShapeOutline permit from silently missing a render branch. It covered two of
the three outline-consuming surfaces — the shape-container clip path and the
inline-shape run — but not the container's own outline fill/stroke geometry as
a standalone case. That geometry, built by ShapeContainerDefinition's
instanceof chain (ending in IllegalStateException), was only covered
transitively: the clip test emits the outline fragment whether or not the
container clips, so a missing fill branch would fail it — but the coverage was
implicit and would vanish if the clip surface ever changed.

What changed

Added everyOutlineFillsAContainerWithoutThrowing, which renders each permit
as a container with ClipPolicy.OVERFLOW_VISIBLE (fill emitted, no clip),
isolating the fill surface. Updated the class Javadoc to name all three
surfaces and the everyPermittedOutlineHasARepresentative hint accordingly.
Test-only; no production change.

Verification

  • ./mvnw test -pl . → BUILD SUCCESS, 1385 tests, 0 failures.
  • Mutation-checked: disabling the ShapeOutline.Path branch in
    ShapeContainerDefinition turns the new fill case AND the clip case red while
    the inline case (a different render handler) stays green — confirming the new
    test independently drives the fill chain.

Lane: canonical (document.architecture guard). No public API change.

ShapeOutlineRenderCoverageTest exercised two of the three surfaces a new
ShapeOutline permit must satisfy — the clip path and the inline-shape run.
The container's own outline fill/stroke geometry, built by
ShapeContainerDefinition's instanceof chain, was only covered transitively
through the clip test (the outline fragment is emitted whether or not the
container clips). Add everyOutlineFillsAContainerWithoutThrowing, which
renders each permit with ClipPolicy.OVERFLOW_VISIBLE so the fill is emitted
without a clip, isolating that surface. Mutation-checked: disabling the Path
branch in ShapeContainerDefinition fails the fill and clip cases while the
inline case (a different handler) stays green.
@DemchaAV DemchaAV merged commit 7129911 into develop Jun 16, 2026
11 checks passed
@DemchaAV DemchaAV deleted the test/shape-outline-fill-surface-coverage branch June 16, 2026 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant