Skip to content

Commit 5c0742b

Browse files
Update utils_test.jl
1 parent 07aac5e commit 5c0742b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/utils_test.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,13 @@ recursivefill!(x, true)
113113
recursivefill!(y_voa, ones(Vec3))
114114
@test all(y_voa[:, n] == fill(ones(Vec3), n) for n in 1:4)
115115
end
116+
117+
@testset "VectorOfArray recursivecopy!" begin
118+
u1 = VectorOfArray([fill(2, MVector{2, Float64}), ones(MVector{2, Float64})])
119+
u2 = VectorOfArray([fill(4, MVector{2, Float64}), 2 .* ones(MVector{2, Float64})])
120+
recursivecopy!(u1,u2)
121+
@test u1.u[1] == [4.0,4.0]
122+
@test u1.u[2] == [2.0,2.0]
123+
@test u1.u[1] isa MVector
124+
@test u1.u[2] isa MVector
125+
end

0 commit comments

Comments
 (0)