Commit 0e9ee93c authored by Christopher Wedgwood's avatar Christopher Wedgwood Committed by David Symonds

archive/tar: (test) structure comparison not reflect.DeepEqual

R=dsymonds
CC=golang-dev
https://golang.org/cl/5487064
parent dd8dc6f0
...@@ -10,7 +10,6 @@ import ( ...@@ -10,7 +10,6 @@ import (
"fmt" "fmt"
"io" "io"
"os" "os"
"reflect"
"testing" "testing"
"time" "time"
) )
...@@ -127,7 +126,7 @@ testLoop: ...@@ -127,7 +126,7 @@ testLoop:
f.Close() f.Close()
continue testLoop continue testLoop
} }
if !reflect.DeepEqual(hdr, header) { if *hdr != *header {
t.Errorf("test %d, entry %d: Incorrect header:\nhave %+v\nwant %+v", t.Errorf("test %d, entry %d: Incorrect header:\nhave %+v\nwant %+v",
i, j, *hdr, *header) i, j, *hdr, *header)
} }
...@@ -201,7 +200,7 @@ func TestIncrementalRead(t *testing.T) { ...@@ -201,7 +200,7 @@ func TestIncrementalRead(t *testing.T) {
} }
// check the header // check the header
if !reflect.DeepEqual(hdr, headers[nread]) { if *hdr != *headers[nread] {
t.Errorf("Incorrect header:\nhave %+v\nwant %+v", t.Errorf("Incorrect header:\nhave %+v\nwant %+v",
*hdr, headers[nread]) *hdr, headers[nread])
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment