Skip to content

Commit 0a9695f

Browse files
committed
Added reshape tests for Section arrays
1 parent 10f7ad9 commit 0a9695f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/runtests.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -852,6 +852,14 @@ using FillArrays
852852
G = rand(length(radii))
853853
outs = Outputs.(Np, Tp, a, ap, u, v, phi, alpha, W, cl, cd, cn, ct, F, G)
854854

855+
@testset "reshape" begin
856+
sections_rs = reshape(sections, 1, :, 1)
857+
@test sections_rs[1, 2, 1].r sections[2].r
858+
@test sections_rs[1, 3, 1].chord sections[3].chord
859+
@test sections_rs[1, 5, 1].theta sections[5].theta
860+
@test sections_rs[1, 9, 1].af == sections[9].af
861+
end
862+
855863
@testset "OffsetArrays" begin
856864
sections_oa = OffsetArray(sections, 0:length(sections)-1)
857865
@test sections[1].r sections_oa[0].r

0 commit comments

Comments
 (0)