File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -99,3 +99,21 @@ x = similar(x)
9999recursivefill! (x, true )
100100@test x[1 ] == MVector {10} (ones (10 ))
101101@test x[2 ] == MVector {10} (ones (10 ))
102+
103+ # Test VectorOfArray + recursivefill! + static arrays
104+ @testset " VectorOfArray + recursivefill! + static arrays" begin
105+ Vec3 = SVector{3 , Float64}
106+ x = [randn (Vec3, n) for n ∈ 1 : 4 ] # vector of vectors of static arrays
107+
108+ x_voa = VectorOfArray (x)
109+ @test eltype (x_voa) === Vec3
110+ @test first (x_voa) isa AbstractVector{Vec3}
111+
112+ y_voa = recursivecopy (x_voa)
113+ recursivefill! (y_voa, true )
114+ @test all (y_voa[n] == fill (ones (Vec3), n) for n ∈ 1 : 4 )
115+
116+ y_voa = recursivecopy (x_voa)
117+ recursivefill! (y_voa, ones (Vec3))
118+ @test all (y_voa[n] == fill (ones (Vec3), n) for n ∈ 1 : 4 )
119+ end
You can’t perform that action at this time.
0 commit comments