aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/xml
diff options
context:
space:
mode:
Diffstat (limited to 'src/encoding/xml')
-rw-r--r--src/encoding/xml/xml_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/encoding/xml/xml_test.go b/src/encoding/xml/xml_test.go
index 8205ac3148..f5c7259cfb 100644
--- a/src/encoding/xml/xml_test.go
+++ b/src/encoding/xml/xml_test.go
@@ -1359,8 +1359,9 @@ func TestParseErrors(t *testing.T) {
}
continue
}
- if err == nil || err == io.EOF {
- t.Errorf("parse %s: have no error, expected a non-nil error", test.src)
+ // Inv: err != nil
+ if err == io.EOF {
+ t.Errorf("parse %s: unexpected EOF", test.src)
continue
}
if !strings.Contains(err.Error(), test.err) {