Fix int overflow on 32 bits systems (#59)
Fix #58
Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
diff --git a/bytesource/bytesource_test.go b/bytesource/bytesource_test.go
index 609cf5e..e1a8f54 100644
--- a/bytesource/bytesource_test.go
+++ b/bytesource/bytesource_test.go
@@ -91,9 +91,9 @@
r := rand.New(New(data))
- got := []int{r.Int(), r.Int(), r.Int(), r.Int(), r.Int()}
+ got := []int64{r.Int63(), r.Int63(), r.Int63(), r.Int63(), r.Int63()}
- want := []int{
+ want := []int64{
3568552425102051206,
3568552489526560135,
3568569467532292485,
diff --git a/fuzz_test.go b/fuzz_test.go
index 6188c2b..d4a9279 100644
--- a/fuzz_test.go
+++ b/fuzz_test.go
@@ -632,10 +632,10 @@
input := []byte{1, 2, 3}
- var got int
+ var got int64
NewFromGoFuzz(input).Fuzz(&got)
- if want := 5563767293437588600; want != got {
+ if want := int64(5563767293437588600); want != got {
t.Errorf("Fuzz(%q) = %d, want: %d", input, got, want)
}
}