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

Function TestRandUpper

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

Source from the content-addressed store, hash-verified

26}
27
28func TestRandUpper(t *testing.T) {
29 t.Parallel()
30
31 pattern := `^[A-Z]+$`
32 reg := regexp.MustCompile(pattern)
33
34 randStr := RandUpper(6)
35
36 assert := internal.NewAssert(t, "TestRandUpper")
37 assert.Equal(6, len(randStr))
38 assert.Equal(true, reg.MatchString(randStr))
39}
40
41func TestRandLower(t *testing.T) {
42 t.Parallel()

Callers

nothing calls this directly

Calls 3

EqualMethod · 0.95
NewAssertFunction · 0.92
RandUpperFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…