mirror of https://github.com/golang/go.git
debug/elf: fix nil deref in test
LGTM=crawshaw R=golang-codereviews, crawshaw CC=golang-codereviews https://golang.org/cl/109470044
This commit is contained in:
parent
67afeac2ab
commit
735e38cace
|
|
@ -166,11 +166,11 @@ func TestOpen(t *testing.T) {
|
|||
} else {
|
||||
f, err = Open(tt.file)
|
||||
}
|
||||
defer f.Close()
|
||||
if err != nil {
|
||||
t.Errorf("cannot open file %s: %v", tt.file, err)
|
||||
continue
|
||||
}
|
||||
defer f.Close()
|
||||
if !reflect.DeepEqual(f.FileHeader, tt.hdr) {
|
||||
t.Errorf("open %s:\n\thave %#v\n\twant %#v\n", tt.file, f.FileHeader, tt.hdr)
|
||||
continue
|
||||
|
|
|
|||
Loading…
Reference in New Issue