summaryrefslogtreecommitdiff
path: root/libgo/go/testing/quick/quick_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/testing/quick/quick_test.go')
-rw-r--r--libgo/go/testing/quick/quick_test.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/libgo/go/testing/quick/quick_test.go b/libgo/go/testing/quick/quick_test.go
index fe443592f87..4246cd1d3ba 100644
--- a/libgo/go/testing/quick/quick_test.go
+++ b/libgo/go/testing/quick/quick_test.go
@@ -307,3 +307,21 @@ func TestNonZeroSliceAndMap(t *testing.T) {
t.Fatal(err)
}
}
+
+func TestInt64(t *testing.T) {
+ var lo, hi int64
+ f := func(x int64) bool {
+ if x < lo {
+ lo = x
+ }
+ if x > hi {
+ hi = x
+ }
+ return true
+ }
+ cfg := &Config{MaxCount: 100000}
+ Check(f, cfg)
+ if uint64(lo)>>62 == 0 || uint64(hi)>>62 == 0 {
+ t.Errorf("int64 returned range %#016x,%#016x; does not look like full range", lo, hi)
+ }
+}