From b3cd8cdd47107a1bfc362450838d408a0eb0442a Mon Sep 17 00:00:00 2001 From: mronian Date: Mon, 14 Mar 2016 00:53:28 +0530 Subject: [PATCH] Adds test for widemul, div, rem in int.jl --- test/int.jl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/int.jl b/test/int.jl index a62cde0bda4b0..95bc4f6acacfa 100644 --- a/test/int.jl +++ b/test/int.jl @@ -176,6 +176,14 @@ end @test widemul(false, 3) == 0 @test widemul(3, true) == widemul(true, 3) == 3 +let i=Int64(2)^63-1, k=widemul(i,i) + @test widemul(i,i)==85070591730234615847396907784232501249 + j=div(k,2) + @test div(k,j)==2 + j=div(k,5) + @test rem(k,j)==4 +end + # issue #3596 @test Int128(1)<<0 == 1 @test repr(Int128(1)<<1) == "2"