1
0
mirror of https://github.com/golang/go synced 2024-11-19 14:44:40 -07: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:
Andrew Gerrand 2014-02-11 16:27:14 +11:00
parent 413e28da0d
commit c4b279ba5a

View File

@ -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)
}