MCPcopy Create free account
hub / github.com/Pallinder/go-randomdata / TestAlphanumeric

Function TestAlphanumeric

random_data_test.go:207–217  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

205}
206
207func TestAlphanumeric(t *testing.T) {
208 t.Log("TestAlphanumeric")
209 alphanumric := Alphanumeric(10)
210 if len(alphanumric) != 10 {
211 t.Error("alphanumric has wrong size")
212 }
213 re := regexp.MustCompile(`^[[:alnum:]]+$`)
214 if !re.MatchString(alphanumric) {
215 t.Error("alphanumric contains invalid character")
216 }
217}
218
219func TestBool(t *testing.T) {
220 t.Log("TestBool")

Callers

nothing calls this directly

Calls 1

AlphanumericFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…