MCPcopy Index your code
hub / github.com/cubefs/cubefs / TestRandomString

Function TestRandomString

util/string_test.go:25–29  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

23)
24
25func TestRandomString(t *testing.T) {
26 first := util.RandomString(256, util.UpperLetter|util.LowerLetter|util.Numeric)
27 second := util.RandomString(256, util.UpperLetter|util.LowerLetter|util.Numeric)
28 require.NotEqual(t, first, second)
29}
30
31func TestSubStr(t *testing.T) {
32 str := "abcd"

Callers

nothing calls this directly

Calls 1

RandomStringFunction · 0.92

Tested by

no test coverage detected