Skip to content

Commit

Permalink
Update interface_tests.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas authored Dec 21, 2023
1 parent 8854baa commit 472a606
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/interface_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ function f(u1,u2,u3)
u3 .= u1 .+ u2
end
f(u1,u2,u3)
@test@allocated f(u1,u2,u3) == 0
@test @allocated f(u1,u2,u3) == 0

yy = [2.0 1.0; 2.0 1.0]
zz = x .+ yy
Expand All @@ -143,3 +143,9 @@ zz = x .+ yy
z = VectorOfArray([zeros(SVector{2, Float64}), zeros(SVector{2, Float64})])
z .= zz
@test z == VectorOfArray([fill(4, SVector{2, Float64}), fill(2, SVector{2, Float64})])

function f!(z,zz)
z .= zz
end
f!(z,zz)
@test @allocated f!(z,zz) == 0

0 comments on commit 472a606

Please sign in to comment.