Tests for the real data-path error, an empty data path, and a crypto/rand failure
Tests / vet + fmt + tests (pull_request) Failing after 16s

This commit is contained in:
2026-09-02 19:09:19 +02:00
parent 4f9285ab5c
commit ae0527a26e
3 changed files with 36 additions and 3 deletions
+7 -1
View File
@@ -8,7 +8,13 @@ import (
)
// engine builds a seeded generator with no loaded categories, for rendering tests.
func engine(seed uint64) *Generator { return &Generator{rand: newRand(seed, true)} }
func engine(seed uint64) *Generator {
s, err := newRand(seed, true)
if err != nil {
panic(err)
}
return &Generator{rand: s}
}
// parse unmarshals a JSON template fragment into its dynamic form.
func parse(t *testing.T, s string) any {