From: Christopher Wedgwood Date: Tue, 13 Dec 2011 21:08:49 +0000 (+1100) Subject: archive/tar: (test) structure comparison not reflect.DeepEqual X-Git-Tag: weekly.2011-12-14~51 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=0e9ee93cea231186c565ab10e3e5f3161cd4c769;p=gostls13.git archive/tar: (test) structure comparison not reflect.DeepEqual R=dsymonds CC=golang-dev https://golang.org/cl/5487064 --- diff --git a/src/pkg/archive/tar/reader_test.go b/src/pkg/archive/tar/reader_test.go index 5829d03faa..0a6513d0ca 100644 --- a/src/pkg/archive/tar/reader_test.go +++ b/src/pkg/archive/tar/reader_test.go @@ -10,7 +10,6 @@ import ( "fmt" "io" "os" - "reflect" "testing" "time" ) @@ -127,7 +126,7 @@ testLoop: f.Close() continue testLoop } - if !reflect.DeepEqual(hdr, header) { + if *hdr != *header { t.Errorf("test %d, entry %d: Incorrect header:\nhave %+v\nwant %+v", i, j, *hdr, *header) } @@ -201,7 +200,7 @@ func TestIncrementalRead(t *testing.T) { } // check the header - if !reflect.DeepEqual(hdr, headers[nread]) { + if *hdr != *headers[nread] { t.Errorf("Incorrect header:\nhave %+v\nwant %+v", *hdr, headers[nread]) }