Update directorySize check in TestZip64P7ZipRecords

With ag/20611145, the dir size is not uint32max by default. Update the
value in the test accordingly.

(The test was not discovered in CI because gotestrunner
runs the tests using `-test.short` flag, and skips this test)

Test: go test ./third_party/zip -run  TestZip64P7ZipRecords
Change-Id: I47885f23fe32ff5ed30c44d52561cd11d59020ec
This commit is contained in:
Spandan Das 2023-06-22 03:18:16 +00:00
parent dff96c65b3
commit ce7cbbe788

View file

@ -190,7 +190,9 @@ func TestZip64P7ZipRecords(t *testing.T) {
t.Errorf("wanted directoryRecords %d, got %d", w, g) t.Errorf("wanted directoryRecords %d, got %d", w, g)
} }
if g, w := d.directorySize, uint64(uint32max); g != w { zip64ExtraBuf := 48 // 4x uint16 + 5x uint64
expectedDirSize := directoryHeaderLen + zip64ExtraBuf + len("large") // name of header
if g, w := d.directorySize, uint64(expectedDirSize); g != w {
t.Errorf("wanted directorySize %d, got %d", w, g) t.Errorf("wanted directorySize %d, got %d", w, g)
} }