Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9 (0.39 sec)

  1. src/cmd/go/internal/cache/hash_test.go

    	oldSalt := hashSalt
    	hashSalt = nil
    	defer func() {
    		hashSalt = oldSalt
    	}()
    
    	h := NewHash("alice")
    	h.Write([]byte("hello world"))
    	sum := fmt.Sprintf("%x", h.Sum())
    	want := "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9"
    	if sum != want {
    		t.Errorf("hash(hello world) = %v, want %v", sum, want)
    	}
    }
    
    func TestHashFile(t *testing.T) {
    	f, err := os.CreateTemp("", "cmd-go-test-")
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 09 19:12:23 UTC 2020
    - 1.1K bytes
    - Viewed (0)
Back to top