From 4edc0edce3b931b3feae474150da6962731597b9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 20:28:44 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- include/mc_rtc/gui/Arrow.h | 4 ++-- tests/test_mc_rbdyn.cpp | 24 +++++++++++++----------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/include/mc_rtc/gui/Arrow.h b/include/mc_rtc/gui/Arrow.h index 92e8f4a711..15c9f52fce 100644 --- a/include/mc_rtc/gui/Arrow.h +++ b/include/mc_rtc/gui/Arrow.h @@ -38,7 +38,7 @@ struct ArrowROImpl : public Element } /** Invalid element */ - ArrowROImpl(){}; + ArrowROImpl() {}; constexpr static size_t write_size() { return Element::write_size() + 3 + ArrowConfig::write_size(); } @@ -72,7 +72,7 @@ struct ArrowImpl : public ArrowROImpl } /** Invalid element */ - ArrowImpl(){}; + ArrowImpl() {}; void write(mc_rtc::MessagePackBuilder & builder) { ArrowROImpl::write(builder, false); } diff --git a/tests/test_mc_rbdyn.cpp b/tests/test_mc_rbdyn.cpp index c0ca6427e3..00d97b48eb 100644 --- a/tests/test_mc_rbdyn.cpp +++ b/tests/test_mc_rbdyn.cpp @@ -101,11 +101,13 @@ BOOST_AUTO_TEST_CASE(TestRobotPosWVelWAccW) auto checkVelocity = [](const sva::MotionVecd & actual, const sva::MotionVecd & refVal) { - BOOST_CHECK_MESSAGE(actual.vector().isApprox(refVal.vector()), - "Error in Robot::velW" << "\nExpected:" << "\nangular:" << refVal.angular().transpose() - << "\nlinear :" << refVal.linear().transpose() - << "\nGot:" << "\nangular:" << actual.angular().transpose() - << "\nlinear :" << actual.linear().transpose()); + BOOST_CHECK_MESSAGE(actual.vector().isApprox(refVal.vector()), "Error in Robot::velW" + << "\nExpected:" + << "\nangular:" << refVal.angular().transpose() + << "\nlinear :" << refVal.linear().transpose() + << "\nGot:" + << "\nangular:" << actual.angular().transpose() + << "\nlinear :" << actual.linear().transpose()); }; for(int i = 0; i < 100; ++i) @@ -151,9 +153,9 @@ BOOST_AUTO_TEST_CASE(TestRobotZMPSimple) auto zmpIdeal = X_0_ls.translation(); auto zmpComputed = robot.zmp(sensorNames, Eigen::Vector3d::Zero(), {0., 0., 1.}); - BOOST_CHECK_MESSAGE(zmpComputed.isApprox(zmpIdeal, 1e-10), - "Error in Robot::zmp computation with leftFootRatio=" << "\nExpected: " << zmpIdeal.transpose() - << "\nGot: " << zmpComputed.transpose()); + BOOST_CHECK_MESSAGE(zmpComputed.isApprox(zmpIdeal, 1e-10), "Error in Robot::zmp computation with leftFootRatio=" + << "\nExpected: " << zmpIdeal.transpose() + << "\nGot: " << zmpComputed.transpose()); } { @@ -167,9 +169,9 @@ BOOST_AUTO_TEST_CASE(TestRobotZMPSimple) auto zmpIdeal = X_0_rs.translation(); auto zmpComputed = robot.zmp(sensorNames, Eigen::Vector3d::Zero(), {0., 0., 1.}); - BOOST_CHECK_MESSAGE(zmpComputed.isApprox(zmpIdeal, 1e-10), - "Error in Robot::zmp computation with leftFootRatio=" << "\nExpected: " << zmpIdeal.transpose() - << "\nGot: " << zmpComputed.transpose()); + BOOST_CHECK_MESSAGE(zmpComputed.isApprox(zmpIdeal, 1e-10), "Error in Robot::zmp computation with leftFootRatio=" + << "\nExpected: " << zmpIdeal.transpose() + << "\nGot: " << zmpComputed.transpose()); } { // checks that zmp throws if used with null force