diff --git a/perf_test.go b/perf_test.go index 5864b55..8392447 100644 --- a/perf_test.go +++ b/perf_test.go @@ -38,6 +38,10 @@ func TestNoRenderAllocRegression(t *testing.T) { {"nested depth 25", nestedJSON(25), 27}, {"nested depth 100", nestedJSON(100), 102}, {"wide 500 tokens", wideTokenJSON(500), 9}, + {"two paths from one held draw", `{"format":"{p.a} {p.b}","p":[{"format":"x","a":"1","b":"2"},{"format":"y","a":"A","b":"B"}]}`, 2}, + {"ten paths from one held draw", `{"format":"{r.a}{r.b}{r.c}{r.d}{r.e}{r.f}{r.g}{r.h}{r.i}{r.j}","r":[ + {"format":"x","a":"1","b":"2","c":"3","d":"4","e":"5","f":"6","g":"7","h":"8","i":"9","j":"0"}, + {"format":"y","a":"A","b":"B","c":"C","d":"D","e":"E","f":"F","g":"G","h":"H","i":"I","j":"J"}]}`, 6}, } for _, s := range shapes { f, err := New(WithoutShippedData(), WithDataFS(fstest.MapFS{"x.json": {Data: []byte(s.json)}})) diff --git a/table_test.go b/table_test.go index f3d9cd8..e5460ab 100644 --- a/table_test.go +++ b/table_test.go @@ -990,8 +990,8 @@ func TestEnteredRowsAgreeWithPinning(t *testing.T) { for _, cand := range tables { for i := 0; i < 20; i++ { drawing := s.clone() - if r := drawing.rowOf(f.rand, cand); s.clash(cand, r) != nil { - t.Errorf("rowOf draws %s beside %s, which pinning it there refuses", cand.selectorSpelling(r), entered.selectorSpelling(row)) + if r := (&pathDraws{s: f.rand}).row(&drawing, cand); s.clash(cand, r) != nil { + t.Errorf("a render draws %s beside %s, which pinning it there refuses", cand.selectorSpelling(r), entered.selectorSpelling(row)) } } for cr := 0; cr < cand.rows(); cr++ {