From d5d1e86b1c351973be9a6ae9fde8ae7e165fc6ae Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 30 Sep 2026 20:04:39 +0200 Subject: [PATCH] Draw a path's compiled steps through drawSteps in the tests --- path_test.go | 8 ++++---- table_test.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/path_test.go b/path_test.go index 9866f2f..2110263 100644 --- a/path_test.go +++ b/path_test.go @@ -36,13 +36,13 @@ func TestPathCoverStopsAtAChoice(t *testing.T) { } } -func TestDrawPathPanicsOnAnUnprovedPath(t *testing.T) { +func TestDrawStepsPanicsOnAStepItsNodeLacks(t *testing.T) { defer func() { - 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) + if r := recover(); r == nil || !strings.Contains(fmt.Sprint(r), `no field "f"`) { + t.Errorf("drawSteps(plain, f) recovered %v, want a panic naming the missing field", r) } }() - drawPath(compiled(t, `"plain"`), []string{"f"}, "plain", &pathDraw{s: engine(1).rand, pins: &pinSet{}}) + drawSteps(engine(1).rand, compiled(t, `"plain"`), []pathStep{{kind: stepField, name: "f"}}, &pinSet{}, nil, nil) } func TestDeepDottedPath(t *testing.T) { diff --git a/table_test.go b/table_test.go index 823ebea..cc3e23c 100644 --- a/table_test.go +++ b/table_test.go @@ -1095,7 +1095,7 @@ func TestTableReadReportsTheTablesADrawPins(t *testing.T) { selected, drawn := tr.pins, tr.drawn for i := 0; i < 20; i++ { var pins pinSet - drawPath(head, a.tail, a.head, &pathDraw{s: f.rand, pins: &pins}) + drawSteps(f.rand, head, a.steps, &pins, nil, nil) want := map[*table]bool{} pins.each(func(tbl *table, _ int) { if _, isSelected := selected.pinned(tbl); !isSelected {