(t *testing.T)
| 15 | } |
| 16 | |
| 17 | func TestRandomString(t *testing.T) { |
| 18 | var testCases = []struct { |
| 19 | name string |
| 20 | whenLength uint8 |
| 21 | expect string |
| 22 | }{ |
| 23 | { |
| 24 | name: "ok, 16", |
| 25 | whenLength: 16, |
| 26 | }, |
| 27 | { |
| 28 | name: "ok, 32", |
| 29 | whenLength: 32, |
| 30 | }, |
| 31 | } |
| 32 | |
| 33 | for _, tc := range testCases { |
| 34 | t.Run(tc.name, func(t *testing.T) { |
| 35 | uid := String(tc.whenLength, Alphabetic) |
| 36 | assert.Len(t, uid, int(tc.whenLength)) |
| 37 | }) |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | func TestRandomStringBias(t *testing.T) { |
| 42 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…