Tests: a printed zero is no divisor and prints unsigned, int64 refusals say so, and CSVLine allocates twice

This commit is contained in:
2026-09-15 15:08:14 +02:00
parent 8ca887aa7d
commit 1ad9418a76
6 changed files with 34 additions and 5 deletions
+1
View File
@@ -18,6 +18,7 @@ func TestRepeatedChoiceItemIsRejected(t *testing.T) {
`["a", "a", "b"]`: `{ "format": "a", "weight": 2 }`,
`[{"format":"{x}","x":"1"},{"format":"{x}","x":"1"}]`: "repeats item",
`{"format":"{w}","w":["", "", "x"]}`: `{ "format": "", "weight": 2 }`,
`{"format":"","w":[null,null,"a"]}`: "a null takes no weight",
} {
if _, err := compile(parse(t, src)); err == nil || !strings.Contains(err.Error(), want) {
t.Errorf("compile(%s) = %v, want an error naming %s", src, err, want)