Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 892bcd5 commit a77d5b6Copy full SHA for a77d5b6
cryptorand/errors_test.go
@@ -54,13 +54,13 @@ func TestRandError(t *testing.T) {
54
require.ErrorIs(t, err, io.ErrShortBuffer, "expected Int error")
55
})
56
57
- t.Run("Intn", func(t *testing.T) {
+ t.Run("Intn_32bit", func(t *testing.T) {
58
_, err := cryptorand.Intn(100)
59
require.ErrorIs(t, err, io.ErrShortBuffer, "expected Intn error")
60
61
62
63
- _, err := cryptorand.Intn(int(1 << 32))
+ t.Run("Intn_64bit", func(t *testing.T) {
+ _, err := cryptorand.Intn(int(1 << 35))
64
65
66
@@ -81,6 +81,6 @@ func TestRandError(t *testing.T) {
81
82
t.Run("StringCharset", func(t *testing.T) {
83
_, err := cryptorand.HexString(10)
84
- require.ErrorIs(t, err, io.ErrShortBuffer, "expected Bool error")
+ require.ErrorIs(t, err, io.ErrShortBuffer, "expected HexString error")
85
86
}
0 commit comments