build: fix tests which were expecting to error

This commit is contained in:
Nick Craig-Wood
2024-04-13 18:10:58 +01:00
parent 8db446289d
commit b7a9fdb78d
2 changed files with 4 additions and 4 deletions

View File

@@ -1097,8 +1097,8 @@ func TestCVE202230633(t *testing.T) {
Things []string
}
err := Unmarshal(bytes.Repeat([]byte("<a>"), 17_000_000), &example)
if err != nil {
t.Error(err)
if err == nil {
t.Errorf("Expecting an error here")
}
}

View File

@@ -1054,8 +1054,8 @@ func TestTokenUnmarshaler(t *testing.T) {
d := NewTokenDecoder(tokReader{})
err := d.Decode(&Failure{})
if err != nil {
t.Error(err)
if err == nil {
t.Error("Expecting an error here")
}
}