(t *testing.T)
| 123 | } |
| 124 | |
| 125 | func TestSha1String(t *testing.T) { |
| 126 | t.Parallel() |
| 127 | |
| 128 | for i := 0; i < 20; i++ { |
| 129 | rs, err := cryptorand.Sha1String() |
| 130 | require.NoError(t, err, "unexpected error from String") |
| 131 | require.Equal(t, 40, utf8.RuneCountInString(rs), "expected RuneCountInString to match requested") |
| 132 | t.Logf("value: %v <- random?", rs) |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | func BenchmarkString20(b *testing.B) { |
| 137 | b.SetBytes(20) |
nothing calls this directly
no test coverage detected