Skip to content

Commit 024b454

Browse files
committed
add test: show matrix of Union{Int, Rational{Int}}
1 parent 6264b0b commit 024b454

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/rational.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,8 @@ end
255255
@test sprint(show, rational2) == "-1//2"
256256
@test sprint(show, -2//2) == "-1//1"
257257
@test sprint(show, [-2//2,]) == "Rational{Int64}[-1]"
258+
@test sprint(show, MIME"text/plain"(), Union{Int, Rational{Int}}[7 3//6; 6//3 2]) ==
259+
"2×2 Matrix{Union{Rational{Int64}, Int64}}:\n 7 1//2\n 2//1 2"
258260
let
259261
io1 = IOBuffer()
260262
write(io1, rational1)

0 commit comments

Comments
 (0)