Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for deepEqual (0.18 sec)

  1. src/archive/zip/reader_test.go

    			}
    			if test.wantErr && !sawErr {
    				t.Error("succeeded but want error")
    			} else if !test.wantErr && sawErr {
    				t.Error("unexpected error")
    			}
    			if test.want != nil && !reflect.DeepEqual(files, test.want) {
    				t.Errorf("got %v want %v", files, test.want)
    			}
    		})
    	}
    }
    
    func TestFSModTime(t *testing.T) {
    	t.Parallel()
    	z, err := OpenReader("testdata/subdir.zip")
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Mar 27 18:23:49 GMT 2024
    - 55.3K bytes
    - Viewed (0)
  2. src/archive/tar/tar_test.go

    	}
    	f.pos += s
    	f.ops = f.ops[1:]
    	return f.pos, nil
    }
    
    func equalSparseEntries(x, y []sparseEntry) bool {
    	return (len(x) == 0 && len(y) == 0) || reflect.DeepEqual(x, y)
    }
    
    func TestSparseEntries(t *testing.T) {
    	vectors := []struct {
    		in   []sparseEntry
    		size int64
    
    		wantValid    bool          // Result of validateSparseEntries
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Mar 15 16:01:50 GMT 2024
    - 24K bytes
    - Viewed (0)
  3. src/archive/tar/common.go

    	case TypeXGlobalHeader:
    		h2 := Header{Name: h.Name, Typeflag: h.Typeflag, Xattrs: h.Xattrs, PAXRecords: h.PAXRecords, Format: h.Format}
    		if !reflect.DeepEqual(h, h2) {
    			return FormatUnknown, nil, headerError{"only PAXRecords should be set for TypeXGlobalHeader"}
    		}
    		whyOnlyPAX = "only PAX supports TypeXGlobalHeader"
    		format.mayOnlyBe(FormatPAX)
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Mar 15 16:01:50 GMT 2024
    - 24.7K bytes
    - Viewed (2)
  4. src/archive/tar/writer_test.go

    		t.Fatal(err)
    	}
    	// Test that we can get the xattrs back out of the archive.
    	reader := NewReader(&buf)
    	hdr, err = reader.Next()
    	if err != nil {
    		t.Fatal(err)
    	}
    	if !reflect.DeepEqual(hdr.Xattrs, xattrs) {
    		t.Fatalf("xattrs did not survive round trip: got %+v, want %+v",
    			hdr.Xattrs, xattrs)
    	}
    }
    
    func TestPaxHeadersSorted(t *testing.T) {
    	fileinfo, err := os.Stat("testdata/small.txt")
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Feb 27 16:39:23 GMT 2024
    - 38.7K bytes
    - Viewed (0)
Back to top