Skip to content

Commit

Permalink
Fix @allocated test on 1.5.
Browse files Browse the repository at this point in the history
Wrapping the `@allocated` call in `@test` seems to be triggering an allocation.
  • Loading branch information
tkoolen committed Feb 2, 2021
1 parent be68984 commit 5e83fa9
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions test/test_mechanism_algorithms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -374,14 +374,8 @@ end
@test_throws ArgumentError point_jacobian!(J_point, x, p, transform(x, point, default_frame(base)))
end
point_jacobian!(J_point, x, p, point)
let x = x
if VERSION < v"1.5-"
@test @allocated(point_jacobian!(J_point, x, p, point)) == 0
else
# https://github.com/JuliaRobotics/RigidBodyDynamics.jl/issues/590
@test_broken @allocated(point_jacobian!(J_point, x, p, point)) == 0
end
end
allocs = @allocated(point_jacobian!(J_point, x, p, point)) == 0
@test allocs == 0
J = geometric_jacobian(x, p)
T = Twist(J, velocity(x))
point_in_world = transform(x, point, root_frame(mechanism))
Expand Down

0 comments on commit 5e83fa9

Please sign in to comment.