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

Function TestRandSymbolChar

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

Source from the content-addressed store, hash-verified

160}
161
162func TestRandSymbolChar(t *testing.T) {
163 t.Parallel()
164
165 pattern := `^[\W|_]+$`
166 reg := regexp.MustCompile(pattern)
167
168 symbolChars := RandSymbolChar(10)
169
170 assert := internal.NewAssert(t, "TestRandSymbolChar")
171 assert.Equal(10, len(symbolChars))
172 assert.Equal(true, reg.MatchString(symbolChars))
173}
174
175func TestRandFloat(t *testing.T) {
176 t.Parallel()

Callers

nothing calls this directly

Calls 3

EqualMethod · 0.95
NewAssertFunction · 0.92
RandSymbolCharFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…