Tests for finite float bounds, plain integer args, constant samples and divisors, the default separator, binding keys in paths, DEL in ascii, and an unheld path
Tests / vet + fmt + tests (pull_request) Failing after 42s
Tests / vet + fmt + tests (pull_request) Failing after 42s
This commit is contained in:
@@ -30,11 +30,12 @@ func TestRepeatedChoiceItemIsRejected(t *testing.T) {
|
||||
|
||||
func TestInertObjectIsRejected(t *testing.T) {
|
||||
for src, want := range map[string]string{
|
||||
`{"format":"Malmö"}`: `write "Malmö"`,
|
||||
`{"format":"{digits(3)}"}`: `write "{digits(3)}"`,
|
||||
`[{"format":"a","weight":1},"b"]`: "weight 1",
|
||||
`{"format":"{x}","x":"v","repeat":1}`: "repeat 1",
|
||||
`{"format":"{x}","x":"v","separator":","}`: "separator",
|
||||
`{"format":"Malmö"}`: `write "Malmö"`,
|
||||
`{"format":"{digits(3)}"}`: `write "{digits(3)}"`,
|
||||
`[{"format":"a","weight":1},"b"]`: "weight 1",
|
||||
`{"format":"{x}","x":"v","repeat":1}`: "repeat 1",
|
||||
`{"format":"{x}","x":"v","separator":","}`: "separator",
|
||||
`{"format":"{x}","x":"v","repeat":2,"separator":""}`: "default",
|
||||
} {
|
||||
if _, err := compile(parse(t, src)); err == nil || !strings.Contains(err.Error(), want) {
|
||||
t.Errorf("compile(%s) = %v, want an error mentioning %s", src, err, want)
|
||||
|
||||
Reference in New Issue
Block a user