From 9cd427a416003b3e252e8d8952e0f8a2a00fbffe Mon Sep 17 00:00:00 2001 From: Twan Koolen Date: Thu, 2 Aug 2018 14:44:09 -0400 Subject: [PATCH] Use let block to measure allocations accurately. --- test/test_mechanism_algorithms.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/test_mechanism_algorithms.jl b/test/test_mechanism_algorithms.jl index d84cb29c..0192fc2c 100644 --- a/test/test_mechanism_algorithms.jl +++ b/test/test_mechanism_algorithms.jl @@ -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))