(t *testing.T)
| 51 | } |
| 52 | |
| 53 | func TestRandomString(t *testing.T) { |
| 54 | var testCases = []struct { |
| 55 | name string |
| 56 | whenLength uint8 |
| 57 | expect string |
| 58 | }{ |
| 59 | { |
| 60 | name: "ok, 16", |
| 61 | whenLength: 16, |
| 62 | }, |
| 63 | { |
| 64 | name: "ok, 32", |
| 65 | whenLength: 32, |
| 66 | }, |
| 67 | } |
| 68 | |
| 69 | for _, tc := range testCases { |
| 70 | t.Run(tc.name, func(t *testing.T) { |
| 71 | uid := randomString(tc.whenLength) |
| 72 | assert.Len(t, uid, int(tc.whenLength)) |
| 73 | }) |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | func TestRandomStringBias(t *testing.T) { |
| 78 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…