mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-16 08:52:42 +00:00
Adv 2.0 D&D Phase 11 D11: GMNarrationType coverage test
Lock in the D6 audit conclusion that every GMNarrationType routes to a non-empty pool for every registered zone. New zones or types added without wiring their pool now fail TestNarrationCoverage_AllZonesAllTypes instead of silently rendering "". Audit confirmed all 12 types × 10 zones already covered (per-zone pools where they exist, generic fallback otherwise) — no flavor written. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -391,3 +391,23 @@ func TestRenderZoneMap_Empty(t *testing.T) {
|
|||||||
t.Errorf("empty seq: got %q", got)
|
t.Errorf("empty seq: got %q", got)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestNarrationCoverage_AllZonesAllTypes — D6 polish guarantee. Locks in
|
||||||
|
// that every GMNarrationType resolves to a non-empty pool for every
|
||||||
|
// registered zone. Adding a new zone or new GMNarrationType without
|
||||||
|
// wiring its pool will fail this test.
|
||||||
|
func TestNarrationCoverage_AllZonesAllTypes(t *testing.T) {
|
||||||
|
types := []GMNarrationType{
|
||||||
|
GMRoomEntry, GMCombatStart, GMCombatEnd, GMNat20, GMNat1,
|
||||||
|
GMBossEntry, GMBossDeath, GMPlayerDeath, GMZoneComplete,
|
||||||
|
GMTrapDetected, GMTrapTripped, GMLore,
|
||||||
|
}
|
||||||
|
for _, z := range allZones() {
|
||||||
|
for _, k := range types {
|
||||||
|
pool := pickPool(z.ID, k)
|
||||||
|
if len(pool) == 0 {
|
||||||
|
t.Errorf("zone %s × %s: empty pool — every (zone, type) must route to prewritten flavor", z.ID, k)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user