Skip to content

Commit

Permalink
build: fix tests which were expecting to error
Browse files Browse the repository at this point in the history
  • Loading branch information
ncw committed Apr 13, 2024
1 parent 8db4462 commit b7a9fdb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions xml/read_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}

Expand Down
4 changes: 2 additions & 2 deletions xml/xml_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}

Expand Down

0 comments on commit b7a9fdb

Please # to comment.