Skip to content

Commit 6dd6adb

Browse files
KenoKristofferC
authored andcommitted
Add tests for mixed-integer-type lcm/gcd (#34425)
As pointed out in #30512
1 parent 81689a7 commit 6dd6adb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/intfuncs.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ using Random
3737
@test_throws OverflowError lcm(typemin(T), typemin(T))
3838
@test_throws OverflowError lcm(typemax(T), T(2))
3939
end
40+
@test lcm(0x5, 3) == 15
41+
@test gcd(0xf, 20) == 5
4042
end
4143
@testset "gcd/lcm for arrays" begin
4244
for T in (Int32, Int64)

0 commit comments

Comments
 (0)