From 8f904ddd7409916fd337e14538085d016367a251 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 25 Sep 2026 08:07:04 +0200 Subject: [PATCH] Want drawPath's panic to name the path as written --- path_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/path_test.go b/path_test.go index 2f7e058..805551f 100644 --- a/path_test.go +++ b/path_test.go @@ -59,11 +59,11 @@ func TestWalkCoverStopsAtAChoice(t *testing.T) { func TestDrawPathPanicsOnAnUnprovedPath(t *testing.T) { defer func() { - if r := recover(); r == nil || !strings.Contains(fmt.Sprint(r), `no field "f"`) { - t.Errorf("drawPath(plain, f) recovered %v, want a panic naming the missing field", r) + if r := recover(); r == nil || !strings.Contains(fmt.Sprint(r), `plain.f: no field "f"`) { + t.Errorf("drawPath(plain, f) recovered %v, want a panic naming the path and the missing field", r) } }() - drawPath(compiled(t, `"plain"`), []string{"f"}, &pinSet{}, &pathDraws{s: engine(1).rand}) + drawPath(compiled(t, `"plain"`), []string{"f"}, "plain.f", &pinSet{}, &pathDraws{s: engine(1).rand}) } func TestDeepDottedPath(t *testing.T) {