MCPcopy Create free account
hub / github.com/devfeel/dotweb / Test_GetRandString

Function Test_GetRandString

framework/crypto/cryptos_test.go:18–29  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

16}
17
18func Test_GetRandString(t *testing.T) {
19 randStr := GetRandString(12)
20 rand1 := GetRandString(12)
21 rand2 := GetRandString(12)
22 rand3 := GetRandString(12)
23 if rand1 == rand2 || rand2 == rand3 || rand1 == rand3 {
24 t.Error("rand result is same")
25 } else {
26 t.Log("GetRandString:", randStr)
27 test.Equal(t, 12, len(randStr))
28 }
29}

Callers

nothing calls this directly

Calls 3

EqualFunction · 0.92
GetRandStringFunction · 0.85
ErrorMethod · 0.65

Tested by

no test coverage detected