]> Cypherpunks repositories - gostls13.git/commitdiff
archive/zip: use correct test, fix 32-bit build
authorAndrew Gerrand <adg@golang.org>
Tue, 11 Feb 2014 05:27:14 +0000 (16:27 +1100)
committerAndrew Gerrand <adg@golang.org>
Tue, 11 Feb 2014 05:27:14 +0000 (16:27 +1100)
LGTM=dsymonds
R=dsymonds
CC=golang-codereviews
https://golang.org/cl/61070047

src/pkg/archive/zip/reader_test.go

index 971fbedb5c882202e15e63161bcc7ff1d390bff2..5652f3a50074b6b2ebef61a87c729dca1fe77a8c 100644 (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)
        }