Answer architecture round 1: read the module path from go.mod, keep the randomness behind State's methods, rename the field drawState and the counter Seq, and file items 108 and 109

This commit is contained in:
2026-10-05 11:52:10 +02:00
committed by Lillem4n
parent ddc3193593
commit 1d0fe9f555
16 changed files with 78 additions and 52 deletions
+2 -2
View File
@@ -98,7 +98,7 @@ func fakeTemplate(t *testing.T, f *Generator, s string) string {
// engine builds a seeded generator with no loaded categories, for rendering tests.
func engine(seed uint64) *Generator {
return &Generator{draws: drawstate.New(seed)}
return &Generator{drawState: drawstate.New(seed)}
}
// parse unmarshals a JSON template fragment into its dynamic form.
@@ -133,5 +133,5 @@ func compiled(t *testing.T, s string) node {
func mustRender(t *testing.T, f *Generator, s string) string {
t.Helper()
return renderOnce(f.draws, compiled(t, s))
return renderOnce(f.drawState, compiled(t, s))
}