Skip to content

Commit

Permalink
Merge pull request #298 from ijt/master
Browse files Browse the repository at this point in the history
Fix issue 297: TestCounterEncStreamHistogram broken in go1.11.
  • Loading branch information
elazarl authored Jul 12, 2018
2 parents 91d82cc + bbda995 commit a0c9541
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions counterecryptor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import (
"bytes"
"crypto/rsa"
"encoding/binary"
"github.com/elazarl/goproxy"
"io"
"math"
"math/rand"
"testing"

"github.com/elazarl/goproxy"
)

type RandSeedReader struct {
Expand Down Expand Up @@ -82,11 +83,11 @@ func TestCounterEncStreamHistogram(t *testing.T) {
nout := 100 * 1000
out := make([]byte, nout)
io.ReadFull(&c, out)
refhist := make([]int, 256)
refhist := make([]int, 512)
for i := 0; i < nout; i++ {
refhist[rand.Intn(256)]++
}
hist := make([]int, 256)
hist := make([]int, 512)
for _, b := range out {
hist[int(b)]++
}
Expand Down

0 comments on commit a0c9541

Please sign in to comment.