Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3-chunker
Commits
620aaba5
Commit
620aaba5
authored
Jun 03, 2015
by
rht
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Swap all 'crypto/rand' rng in tests with 'math/rand'
parent
1cfd9abd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
splitting_test.go
splitting_test.go
+3
-2
No files found.
splitting_test.go
View file @
620aaba5
...
...
@@ -2,14 +2,15 @@ package chunk
import
(
"bytes"
"crypto/rand"
"io"
"testing"
u
"github.com/ipfs/go-ipfs/util"
)
func
randBuf
(
t
*
testing
.
T
,
size
int
)
[]
byte
{
buf
:=
make
([]
byte
,
size
)
if
_
,
err
:=
r
and
.
Read
(
buf
);
err
!=
nil
{
if
_
,
err
:=
u
.
NewTimeSeededR
and
()
.
Read
(
buf
);
err
!=
nil
{
t
.
Fatal
(
"failed to read enough randomness"
)
}
return
buf
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment