Skip to content

Commit

Permalink
Update utils_test.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas authored Dec 20, 2023
1 parent 07aac5e commit 5c0742b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/utils_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,13 @@ recursivefill!(x, true)
recursivefill!(y_voa, ones(Vec3))
@test all(y_voa[:, n] == fill(ones(Vec3), n) for n in 1:4)
end

@testset "VectorOfArray recursivecopy!" begin
u1 = VectorOfArray([fill(2, MVector{2, Float64}), ones(MVector{2, Float64})])
u2 = VectorOfArray([fill(4, MVector{2, Float64}), 2 .* ones(MVector{2, Float64})])
recursivecopy!(u1,u2)
@test u1.u[1] == [4.0,4.0]
@test u1.u[2] == [2.0,2.0]
@test u1.u[1] isa MVector
@test u1.u[2] isa MVector
end

0 comments on commit 5c0742b

Please sign in to comment.