mirror of
https://github.com/golang/go
synced 2024-09-05 16:04:50 +00:00
archive/zip: use correct test, fix 32-bit build
LGTM=dsymonds R=dsymonds CC=golang-codereviews https://golang.org/cl/61070047
This commit is contained in:
parent
413e28da0d
commit
c4b279ba5a
|
@ -371,11 +371,11 @@ func readTestFile(t *testing.T, zt ZipTest, ft ZipTestFile, f *File) {
|
|||
}
|
||||
r.Close()
|
||||
|
||||
size := int(f.UncompressedSize)
|
||||
if size == 1<<32-1 {
|
||||
size = int(f.UncompressedSize64)
|
||||
size := uint64(f.UncompressedSize)
|
||||
if size == uint32max {
|
||||
size = f.UncompressedSize64
|
||||
}
|
||||
if g := b.Len(); g != size {
|
||||
if g := uint64(b.Len()); g != size {
|
||||
t.Errorf("%v: read %v bytes but f.UncompressedSize == %v", f.Name, g, size)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue