Commit c4b279ba authored by Andrew Gerrand's avatar Andrew Gerrand

archive/zip: use correct test, fix 32-bit build

LGTM=dsymonds
R=dsymonds
CC=golang-codereviews
https://golang.org/cl/61070047
parent 413e28da
...@@ -371,11 +371,11 @@ func readTestFile(t *testing.T, zt ZipTest, ft ZipTestFile, f *File) { ...@@ -371,11 +371,11 @@ func readTestFile(t *testing.T, zt ZipTest, ft ZipTestFile, f *File) {
} }
r.Close() r.Close()
size := int(f.UncompressedSize) size := uint64(f.UncompressedSize)
if size == 1<<32-1 { if size == uint32max {
size = int(f.UncompressedSize64) 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) t.Errorf("%v: read %v bytes but f.UncompressedSize == %v", f.Name, g, size)
} }
......
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