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

Function TestRandomStringDigits

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

Source from the content-addressed store, hash-verified

53}
54
55func TestRandomStringDigits(t *testing.T) {
56 t.Log("TestRandomStringDigits")
57
58 if len(StringNumber(2, "-")) != 5 {
59 t.Fatal("Wrong length returned")
60 }
61
62 if len(StringNumber(2, "")) != 4 {
63 t.Fatal("Wrong length returned")
64 }
65
66 if len(StringNumberExt(3, "/", 3)) != 11 {
67 t.Fatal("Wrong length returned")
68 }
69
70 if len(StringNumberExt(3, "", 3)) != 9 {
71 t.Fatal("Wrong length returned")
72 }
73}
74
75func TestFirstName(t *testing.T) {
76 t.Log("TestFirstName")

Callers

nothing calls this directly

Calls 2

StringNumberFunction · 0.85
StringNumberExtFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…