]> Cypherpunks repositories - gostls13.git/commitdiff
archive/tar: (test) structure comparison not reflect.DeepEqual
authorChristopher Wedgwood <cw@f00f.org>
Tue, 13 Dec 2011 21:08:49 +0000 (08:08 +1100)
committerDavid Symonds <dsymonds@golang.org>
Tue, 13 Dec 2011 21:08:49 +0000 (08:08 +1100)
R=dsymonds
CC=golang-dev
https://golang.org/cl/5487064

src/pkg/archive/tar/reader_test.go

index 5829d03faa63072e7c5a638796b33aed957bc213..0a6513d0cac01a8bf6cb8d9bef16db439e47b959 100644 (file)
@@ -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])
                }