diff --git a/Project.toml b/Project.toml index 92cb70c6..8e146038 100644 --- a/Project.toml +++ b/Project.toml @@ -27,6 +27,7 @@ UnsafeArrays = "1" julia = "1.3" [extras] +BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" NBInclude = "0db19996-df87-5ea3-a455-e3a50d440464" @@ -35,4 +36,4 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["ForwardDiff", "NBInclude", "LinearAlgebra", "Test", "Random", "Pkg"] +test = ["BenchmarkTools", "ForwardDiff", "NBInclude", "LinearAlgebra", "Test", "Random", "Pkg"] diff --git a/test/runtests.jl b/test/runtests.jl index b4098601..da1d03dd 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -14,6 +14,7 @@ import ForwardDiff import LightXML using RigidBodyDynamics: ModifiedRodriguesParam +using BenchmarkTools: @ballocated include("test_exports.jl") include("test_graph.jl") diff --git a/test/test_mechanism_algorithms.jl b/test/test_mechanism_algorithms.jl index 2466d87c..a92a04f1 100644 --- a/test/test_mechanism_algorithms.jl +++ b/test/test_mechanism_algorithms.jl @@ -374,14 +374,7 @@ 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 + @test(@ballocated(point_jacobian!($J_point, $x, $p, $point)) == 0) J = geometric_jacobian(x, p) T = Twist(J, velocity(x)) point_in_world = transform(x, point, root_frame(mechanism))