Commit 68627a16 authored by Jan Mercl's avatar Jan Mercl

ntdfa: Fix 32b systems constant overflow III.

parent 5979962b
......@@ -32,6 +32,9 @@ var caller = func(s string, va ...interface{}) {
fmt.Println()
}
var aaa0 = int64(0xaaaaaaaa)
var aaa = int(aaa0)
func isNil(p interface{}) bool {
switch x := p.(type) {
case *x:
......@@ -203,7 +206,7 @@ func TestSetGet0(t *testing.T) {
func TestSetGet1(t *testing.T) {
const N = 90000
for _, x := range []int{0, -1, 0x55555555, 0xaaaaaaa, 314159265} {
for _, x := range []int{0, -1, 0x55555555, aaa, 314159265} {
r := TreeNew(cmp)
set := r.Set
a := make([]int, N)
......@@ -299,7 +302,7 @@ func BenchmarkGetRnd(b *testing.B) {
func TestSetGet2(t *testing.T) {
const N = 70000
for _, x := range []int{0, -1, 0x55555555, 0xaaaaaaa, 314159265} {
for _, x := range []int{0, -1, 0x55555555, aaa, 314159265} {
r := TreeNew(cmp)
set := r.Set
a := make([]int, N)
......@@ -458,7 +461,7 @@ func TestDelete0(t *testing.T) {
func TestDelete1(t *testing.T) {
const N = 100000
for _, x := range []int{0, -1, 0x55555555, 0xaaaaaaa, 314159265} {
for _, x := range []int{0, -1, 0x55555555, aaa, 314159265} {
r := TreeNew(cmp)
set := r.Set
a := make([]int, N)
......@@ -513,7 +516,7 @@ func BenchmarkDelRnd(b *testing.B) {
func TestDelete2(t *testing.T) {
const N = 80000
for _, x := range []int{0, -1, 0x55555555, 0xaaaaaaa, 314159265} {
for _, x := range []int{0, -1, 0x55555555, aaa, 314159265} {
r := TreeNew(cmp)
set := r.Set
a := make([]int, N)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment