MCPcopy
hub / github.com/duke-git/lancet / TestRandString

Function TestRandString

random/random_test.go:15–26  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

13)
14
15func TestRandString(t *testing.T) {
16 t.Parallel()
17
18 pattern := `^[a-zA-Z]+$`
19 reg := regexp.MustCompile(pattern)
20
21 randStr := RandString(6)
22
23 assert := internal.NewAssert(t, "TestRandString")
24 assert.Equal(6, len(randStr))
25 assert.Equal(true, reg.MatchString(randStr))
26}
27
28func TestRandUpper(t *testing.T) {
29 t.Parallel()

Callers

nothing calls this directly

Calls 3

EqualMethod · 0.95
NewAssertFunction · 0.92
RandStringFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…