Skip to content

Commit

Permalink
Division exception depends on integer size
Browse files Browse the repository at this point in the history
  • Loading branch information
eschnett committed Feb 25, 2016
1 parent 4d3713d commit fb3baad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/intfuncs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
@test gcd(typemax(Int), 1) == 1
@test gcd(-typemax(Int), 1) == 1
@test gcd(typemin(Int), 1) == 1
@test_throws InexactError gcd(typemin(Int), typemin(Int))
divex = sizeof(Int) == 4 ? OverflowError : InexactError
@test_throws divex gcd(typemin(Int), typemin(Int))

@test lcm(2, 3) == 6
@test lcm(4, 6) == 12
Expand Down

0 comments on commit fb3baad

Please sign in to comment.