MCPcopy
hub / github.com/TarsCloud/TarsGo / TestHashNew

Function TestHashNew

tars/hash_func_test.go:5–29  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

3import "testing"
4
5func TestHashNew(t *testing.T) {
6 testCases := []struct {
7 name string
8 roomId string
9 wantHash uint32
10 }{
11 {
12 name: "#12723353",
13 roomId: "#12723353",
14 wantHash: 1476478819,
15 },
16 {
17 name: "#12723353_native",
18 roomId: "#12723353_native",
19 wantHash: 268793112,
20 },
21 }
22 for _, tt := range testCases {
23 t.Run(tt.name, func(t *testing.T) {
24 if code := HashNew(tt.roomId); code != tt.wantHash {
25 t.Errorf("HashNew() = %v, want %v", code, tt.wantHash)
26 }
27 })
28 }
29}

Callers

nothing calls this directly

Calls 3

HashNewFunction · 0.85
RunMethod · 0.45
ErrorfMethod · 0.45

Tested by

no test coverage detected