Skip to content

Commit 6f376ee

Browse files
committed
fix showing test for 32bit target
1 parent c6dd4a6 commit 6f376ee

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/testsuite/io.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,19 @@ function test_io(AT)
1212

1313
show(io, A)
1414
seekstart(io)
15-
@test String(take!(io)) == "[1]"
15+
msg = String(take!(io)) # result of e.g. `print` differs on 32bit and 64bit machines
16+
# due to different definition of `Int` type
17+
# print([1]) shows as [1] on 64bit but Int64[1] on 32bit
18+
@test msg == "[1]" || msg == "Int64[1]"
1619

1720
show(io, MIME("text/plain"), B)
1821
seekstart(io)
1922
@test String(take!(io)) == "2×2 $AT{Int64,2}:\n 1 2\n 3 4"
2023

2124
show(io, B)
2225
seekstart(io)
23-
@test String(take!(io)) == "[1 2; 3 4]"
26+
msg = String(take!(io))
27+
@test msg == "[1 2; 3 4]" || msg == "Int64[1 2; 3 4]"
2428

2529
show(io, MIME("text/plain"), A')
2630
seekstart(io)

0 commit comments

Comments
 (0)