• Home
  • Raw
  • Download

Lines Matching refs:t

21 func TestOver65kFiles(t *testing.T) {
23 t.Skip("skipping in short mode")
34 t.Fatalf("creating file %d: %v", i, err)
38 t.Fatalf("Writer.Close: %v", err)
43 t.Fatalf("NewReader: %v", err)
46 t.Fatalf("File contains %d files, want %d", got, nFiles)
51 t.Fatalf("File(%d) = %q, want %q", i, zr.File[i].Name, want)
56 func TestModTime(t *testing.T) {
62 t.Errorf("times don't match: got %s, want %s", outTime, testTime)
66 …undTrip(fh *FileHeader, wantUncompressedSize uint32, wantUncompressedSize64 uint64, t *testing.T) {
70 t.Fatal(err)
73 t.Errorf("Name: got %s, want %s\n", got, want)
76 t.Errorf("UncompressedSize: got %d, want %d\n", got, want)
79 t.Errorf("UncompressedSize64: got %d, want %d\n", got, want)
82 t.Errorf("ModifiedTime: got %d, want %d\n", got, want)
85 t.Errorf("ModifiedDate: got %d, want %d\n", got, want)
89 t.Errorf("Sys didn't return original *FileHeader")
93 func TestFileHeaderRoundTrip(t *testing.T) {
100 testHeaderRoundTrip(fh, fh.UncompressedSize, uint64(fh.UncompressedSize), t)
103 func TestFileHeaderRoundTrip64(t *testing.T) {
110 testHeaderRoundTrip(fh, uint32max, fh.UncompressedSize64, t)
196 func TestRLEBuffer(t *testing.T) {
205 t.Fatalf("len(b.buf) = %d; want 10", len(b.buf))
213 t.Errorf("ReadAt(%d, %d) = %d, %v; want %d, nil", i, j, n, err, len(buf))
216 t.Errorf("ReadAt(%d, %d) = %q; want %q", i, j, buf, all[i:i+j])
230 func TestZip64(t *testing.T) {
232 t.Skip("slow test; skipping")
235 buf := testZip64(t, size)
236 testZip64DirectoryRecordLength(buf, t)
239 func TestZip64EdgeCase(t *testing.T) {
241 t.Skip("slow test; skipping")
249 buf := testZip64(t, size)
250 testZip64DirectoryRecordLength(buf, t)
253 func testZip64(t testing.TB, size int64) *rleBuffer {
264 t.Fatal(err)
274 t.Fatal("write chunk:", err)
280 t.Fatal("write chunk:", err)
286 t.Fatal("write end:", err)
289 t.Fatal(err)
295 t.Fatal("reader:", err)
300 t.Fatal("opening:", err)
306 t.Fatal("read:", err)
312 t.Fatal("read:", err)
317 t.Fatal("read end:", err)
320 t.Errorf("End of zip64 archive %q, want %q", gotEnd, end)
324 t.Fatal("closing:", err)
328 t.Errorf("UncompressedSize %#x, want %#x", got, want)
333 t.Errorf("UncompressedSize64 %#x, want %#x", got, want)
340 func testZip64DirectoryRecordLength(buf *rleBuffer, t *testing.T) {
343 t.Fatal("read:", err)
349 t.Fatal("findDirectory64End:", err)
354 t.Fatal("read:", err)
359 t.Fatalf("Expected directory64EndSignature (%d), got %d", directory64EndSignature, sig)
364 t.Fatalf("Expected length of %d, got %d", directory64EndLen-12, size)
368 func testValidHeader(h *FileHeader, t *testing.T) {
374 t.Fatalf("error creating header: %v", err)
377 t.Fatalf("error writing content: %v", err)
380 t.Fatalf("error closing zip writer: %v", err)
386 t.Fatalf("got %v, expected nil", err)
390t.Fatalf("got %q/%d/%d expected %q/%d/%d", zh.Name, zh.Method, zh.UncompressedSize64, h.Name, h.Me…
395 func TestHeaderInvalidTagAndSize(t *testing.T) {
408 testValidHeader(&h, t)
411 func TestHeaderTooShort(t *testing.T) {
417 testValidHeader(&h, t)
420 func TestHeaderIgnoredSize(t *testing.T) {
426 testValidHeader(&h, t)
431 func TestZeroLengthHeader(t *testing.T) {
440 testValidHeader(&h, t)