Skip to content

Commit 6fa3b00

Browse files
authored
Merge pull request #70 from JuliaArrays/teh/show1.2
Fix breakage of `summary` tests on 1.2
2 parents e53faf8 + a417201 commit 6fa3b00

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/runtests.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,10 @@ end
392392
@test unsafe_sum(a) == 0
393393

394394
a = OffsetArray([1 2; 3 4], -1:0, 5:6)
395-
@test summary(a) == "OffsetArray(::Array{$(Int),2}, -1:0, 5:6) with eltype $(Int) with indices -1:0×5:6"
396-
@test summary(view(a, :, 5)) == "view(OffsetArray(::Array{$(Int),2}, -1:0, 5:6), :, 5) with eltype $(Int) with indices -1:0"
395+
shownsz = VERSION >= v"1.2.0-DEV.229" ? Base.dims2string(size(a))*' ' : ""
396+
@test summary(a) == "$(shownsz)OffsetArray(::Array{$(Int),2}, -1:0, 5:6) with eltype $(Int) with indices -1:0×5:6"
397+
shownsz = VERSION >= v"1.2.0-DEV.229" ? Base.dims2string(size(view(a, :, 5)))*' ' : ""
398+
@test summary(view(a, :, 5)) == "$(shownsz)view(OffsetArray(::Array{$(Int),2}, -1:0, 5:6), :, 5) with eltype $(Int) with indices -1:0"
397399
a = OffsetArray(reshape([1]))
398400
@test summary(a) == "0-dimensional OffsetArray(::Array{$(Int),0}) with eltype $(Int)"
399401

0 commit comments

Comments
 (0)