Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. src/archive/tar/reader_test.go

    			}
    
    			for i, hdr := range hdrs {
    				if i >= len(v.headers) {
    					t.Fatalf("entry %d: unexpected header:\ngot %+v", i, *hdr)
    				}
    				if !reflect.DeepEqual(*hdr, *v.headers[i]) {
    					t.Fatalf("entry %d: incorrect header:\ngot  %+v\nwant %+v", i, *hdr, *v.headers[i])
    				}
    			}
    			if len(hdrs) != len(v.headers) {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Nov 21 21:14:38 GMT 2022
    - 47.1K 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