From 0d99f4cde1e3cc44ff0628c352fe3c67f91d23e3 Mon Sep 17 00:00:00 2001 From: bramtayl Date: Mon, 20 Jan 2020 03:33:05 -0500 Subject: [PATCH] Missing rational tests (#34443) --- test/rational.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/rational.jl b/test/rational.jl index 52f502b4178a6..52deb31047d67 100644 --- a/test/rational.jl +++ b/test/rational.jl @@ -34,6 +34,7 @@ using Test @test_throws InexactError rationalize(Int, NaN) # issue 32569 @test_throws ArgumentError 1 // typemin(Int) + @test_throws ArgumentError 0 // 0 @test -2 // typemin(Int) == -1 // (typemin(Int) >> 1) @test 2 // typemin(Int) == 1 // (typemin(Int) >> 1) @@ -394,6 +395,7 @@ end @test gcdx(1//2, 1//0) == (1//0, 0, 1) @test gcdx(1//0, 1//0) == (1//0, 1, 1) @test gcdx(1//0, 0//1) == (1//0, 1, 0) + @test gcdx(0//1, 0//1) == (0//1, 1, 0) @test gcdx(1//3, 2) == (1//3, 1, 0) @test lcm(1//3, 1) == 1//1