diff --git a/template_test.go b/template_test.go index 89f5e35..bd5a9e3 100644 --- a/template_test.go +++ b/template_test.go @@ -316,7 +316,8 @@ func TestGrowIsALowerBound(t *testing.T) { t.Fatalf("format %q did not compile to a template", format) } for i := 0; i < 50; i++ { - if got := len(expand(f.rand, tmpl, renderScope{set: &holdSet{}})); got < tmpl.grow { + set := lazyHoldSet(f.rand) + if got := len(expand(f.rand, tmpl, renderScope{set: &set})); got < tmpl.grow { t.Errorf("format %q: expand emitted %d bytes, below grow %d", format, got, tmpl.grow) } }