Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
mcabbott committed Dec 29, 2021
1 parent d2a7871 commit 94827cd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/offsetarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -807,12 +807,13 @@ end
ten = OffsetArray([1,10,100,1000], 10:13)

@test stack(ten) == ten
@test stack(ten .+ nought') == ten .+ nought'
@test stack(x^2 for x in ten) == ten.^2

@test axes(stack(nought for _ in ten)) == (0:2, 10:13)
@test axes(stack([nought for _ in ten])) == (0:2, 10:13)
@test axes(stack(nought for _ in ten; dims=1)) == (10:13, 0:2)
@test axes(stack((x, x^2) for x in nought)) == 1:2, 0:2
@test axes(stack((x, x^2) for x in nought)) == (1:2, 0:2)
@test axes(stack(x -> x[end-1:end], ten for _ in nought, _ in nought)) == (1:2, 0:2, 0:2)
@test axes(stack([ten[end-1:end] for _ in nought, _ in nought])) == (1:2, 0:2, 0:2)
end
Expand Down

0 comments on commit 94827cd

Please sign in to comment.