Skip to content

Commit f3db760

Browse files
committed
Fix i/o show tests.
1 parent fbe5db8 commit f3db760

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/testsuite/io.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@ function test_io(AT)
22
@testset "input/output" begin
33
@testset "showing" begin
44
io = IOBuffer()
5-
A = AT([1])
5+
A = AT(Int64[1])
66

77
show(io, MIME("text/plain"), A)
88
seekstart(io)
99
@test String(take!(io)) == "1-element $AT{Int64,1}:\n 1"
1010

1111
show(io, MIME("text/plain"), A')
1212
seekstart(io)
13-
@test String(take!(io)) == "1×1 LinearAlgebra.Adjoint{Int64,$AT{Int64,1}}:\n 1"
13+
msg = String(take!(io)) # the printing of Adjoint depends on global state
14+
@test msg == "1×1 Adjoint{Int64,$AT{Int64,1}}:\n 1" ||
15+
msg == "1×1 LinearAlgebra.Adjoint{Int64,$AT{Int64,1}}:\n 1"
1416
end
1517
end
1618
end

0 commit comments

Comments
 (0)