diff --git a/test/euler.jl b/test/euler.jl index be2d4e72df881..590002df1adc2 100644 --- a/test/euler.jl +++ b/test/euler.jl @@ -67,7 +67,7 @@ end @test euler9(1000) == 31875000 #10: 142913828922 -@test sum(primes(2000000)) == 142913828922 +@test sum(int64(primes(2000000))) == 142913828922 #11: 70600674 function euler11(grid,n) diff --git a/test/mod2pi.jl b/test/mod2pi.jl index caed52089c68d..d0b1b0eac8f0f 100644 --- a/test/mod2pi.jl +++ b/test/mod2pi.jl @@ -190,5 +190,5 @@ testModPi() @test_approx_eq mod2pi(int32(355)) 3.1416227979431572 @test_approx_eq mod2pi(355.0) 3.1416227979431572 @test_approx_eq mod2pi(355.0f0) 3.1416228f0 -@test mod2pi(2^60) == mod2pi(2.0^60) -@test_throws mod2pi(2^60-1) +@test mod2pi(int64(2)^60) == mod2pi(2.0^60) +@test_throws mod2pi(int64(2)^60-1) diff --git a/test/ranges.jl b/test/ranges.jl index 731b5bea2fbc7..e896cf3714ea9 100644 --- a/test/ranges.jl +++ b/test/ranges.jl @@ -102,4 +102,4 @@ r = (-4*int64(maxintfloat(is(Int,Int32) ? Float32 : Float64))):5 @test_throws (0:2:10)[7:7] # avoiding intermediate overflow (#5065) -@test length(1:4:typemax(Int64)) == 2305843009213693952 +@test length(1:4:typemax(Int)) == div(typemax(Int),4) + 1