Add HTMLDraftmanTest — direct visitor tests #10

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

Priority: P1 — Medium

Context: Same rationale as #9 — direct visitor tests isolate failures better than the full HTMLExporter pipeline tests. Additionally, a bug was previously found and fixed in HTMLDraftman.visitTriangle() where this.hashCode() was used instead of sTriangle.hashCode() (commit edd5167). A direct visitor test would have caught this immediately. A regression test should be included.

Scope: src/main/java/ovh/gasser/newshapes/ui/visitors/HTMLDraftman.java

Goal: Test each visit*() method in isolation.

Edge cases to cover:

  • Text font styles (ITALIC, BOLD, ITALIC+BOLD)
  • Nested collections
  • Null ColorAttributes
  • Filled only / stroked only / both / neither
  • Regression test for visitTriangle() hashCode fix

Estimate: 2 hours
Dependencies: None

**Priority:** P1 — Medium **Context:** Same rationale as #9 — direct visitor tests isolate failures better than the full HTMLExporter pipeline tests. Additionally, a bug was previously found and fixed in `HTMLDraftman.visitTriangle()` where `this.hashCode()` was used instead of `sTriangle.hashCode()` (commit `edd5167`). A direct visitor test would have caught this immediately. A regression test should be included. **Scope:** `src/main/java/ovh/gasser/newshapes/ui/visitors/HTMLDraftman.java` **Goal:** Test each `visit*()` method in isolation. **Edge cases to cover:** - Text font styles (ITALIC, BOLD, ITALIC+BOLD) - Nested collections - Null ColorAttributes - Filled only / stroked only / both / neither - Regression test for `visitTriangle()` hashCode fix **Estimate:** 2 hours **Dependencies:** None
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#10