From ae7685c34c85a751c9da405ec321ad67f7e27232 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Wed, 11 Dec 2024 11:29:11 -0800 Subject: [PATCH] Update mass expectation in auto-inertial tests The mass is no longer explicitly set in these Link tests, so replace the not-equals expectation with an expectation of what the mass should be. Signed-off-by: Steve Peters --- python/test/pyLink_TEST.py | 2 +- src/Link_TEST.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/test/pyLink_TEST.py b/python/test/pyLink_TEST.py index 7ea7c9341..55b96dc81 100644 --- a/python/test/pyLink_TEST.py +++ b/python/test/pyLink_TEST.py @@ -521,7 +521,7 @@ def test_inertial_values_given_with_auto_set_to_true(self): root.resolve_auto_inertials(errors, sdfParserConfig) self.assertEqual(len(errors), 0) - self.assertNotEqual(4.0, link.inertial().mass_matrix().mass()) + self.assertEqual(2.0, link.inertial().mass_matrix().mass()) self.assertEqual(Pose3d.ZERO, link.inertial().pose()) self.assertEqual(Vector3d(0.33333, 0.33333, 0.33333), link.inertial().mass_matrix().diagonal_moments()) diff --git a/src/Link_TEST.cc b/src/Link_TEST.cc index cb6b0a9e2..8d216da51 100644 --- a/src/Link_TEST.cc +++ b/src/Link_TEST.cc @@ -766,7 +766,7 @@ TEST(DOMLink, InertialValuesGivenWithAutoSetToTrue) root.ResolveAutoInertials(errors, sdfParserConfig); EXPECT_TRUE(errors.empty()); - EXPECT_NE(4.0, link->Inertial().MassMatrix().Mass()); + EXPECT_EQ(2.0, link->Inertial().MassMatrix().Mass()); EXPECT_EQ(gz::math::Pose3d::Zero, link->Inertial().Pose()); EXPECT_EQ(gz::math::Vector3d(0.33333, 0.33333, 0.33333), link->Inertial().MassMatrix().DiagonalMoments());