Skip to content

Commit

Permalink
Use let block to measure allocations accurately.
Browse files Browse the repository at this point in the history
  • Loading branch information
tkoolen committed Aug 2, 2018
1 parent 489604c commit 9cd427a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/test_mechanism_algorithms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,9 @@ end
@test_throws ArgumentError point_jacobian!(J_point, x, p, transform(x, point, default_frame(base)))
end
point_jacobian!(J_point, x, p, point)
@test @allocated(point_jacobian!(J_point, x, p, point)) == 0
let x = x
@test @allocated(point_jacobian!(J_point, x, p, point)) == 0
end
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 9cd427a

Please sign in to comment.