Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1755,7 +1755,7 @@ end

B = reshape(A0, -10:-9, 9:10)
@test isa(B, OffsetArray{Int,2})
@test parent(B) === A0
@test parent(B) == A0
@test axes(B) == IdentityUnitRange.((-10:-9, 9:10))
B = reshape(A, -10:-9, 9:10)
@test isa(B, OffsetArray{Int,2})
Expand Down Expand Up @@ -1786,7 +1786,7 @@ end
# reshape with one Colon for AbstractArrays
B = reshape(A0, -10:-9, :)
@test B isa OffsetArray{Int,2}
@test parent(B) === A0
@test parent(B) == A0
@test no_offset_axes(B, 1) == -10:-9
@test axes(B, 2) == axes(A0, 2)

Expand All @@ -1807,17 +1807,14 @@ end
# pop the parent
B = reshape(A, size(A))
@test B == A0
@test parent(B) === A0
B = reshape(A, (Base.OneTo(2), 2))
@test B == A0
@test parent(B) === A0
B = reshape(A, (2,:))
@test B == A0
@test parent(B) === A0

# julialang/julia #33614
A = OffsetArray(-1:0, (-2,))
@test reshape(A, :) === A
@test reshape(A, :) == A
Arsc = reshape(A, :, 1)
Arss = reshape(A, 2, 1)
@test Arsc[1,1] == Arss[1,1] == -1
Expand Down
Loading