github.com/glide-im/glide@v1.6.0/pkg/hash/hash_test.go (about) 1 package hash 2 3 import "testing" 4 5 func TestHash(t *testing.T) { 6 type args struct { 7 data []byte 8 seed uint32 9 } 10 tests := []struct { 11 name string 12 args args 13 want uint32 14 }{ 15 { 16 name: "", 17 args: struct { 18 data []byte 19 seed uint32 20 }{ 21 data: []byte("ABCD"), 22 seed: 1, 23 }, 24 want: 3027734286, 25 }, 26 } 27 for _, tt := range tests { 28 t.Run(tt.name, func(t *testing.T) { 29 if got := Hash(tt.args.data, tt.args.seed); got != tt.want { 30 t.Errorf("Hash() = %v, want %v", got, tt.want) 31 } 32 }) 33 } 34 }