From b5ad365e390d69a456b29cc7e93cba31a04b9c93 Mon Sep 17 00:00:00 2001 From: Tyler Weaver Date: Mon, 4 Dec 2023 11:08:28 -0700 Subject: [PATCH] apply changes from review Signed-off-by: Tyler Weaver --- moveit_core/exceptions/src/exceptions.cpp | 5 +++-- .../robot_trajectory/test/test_robot_trajectory.cpp | 12 +++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/moveit_core/exceptions/src/exceptions.cpp b/moveit_core/exceptions/src/exceptions.cpp index ca0087bd9ee..05cc9bc7ae6 100644 --- a/moveit_core/exceptions/src/exceptions.cpp +++ b/moveit_core/exceptions/src/exceptions.cpp @@ -45,11 +45,12 @@ namespace moveit ConstructException::ConstructException(const std::string& what_arg) : std::runtime_error(what_arg) { - RCLCPP_ERROR(getLogger("exception"), "Error during construction of object: %s\nException thrown.", what_arg.c_str()); + RCLCPP_ERROR(getLogger("moveit_exception"), "Error during construction of object: %s\nException thrown.", + what_arg.c_str()); } Exception::Exception(const std::string& what_arg) : std::runtime_error(what_arg) { - RCLCPP_ERROR(getLogger("exception"), "%s\nException thrown.", what_arg.c_str()); + RCLCPP_ERROR(getLogger("moveit_exception"), "%s\nException thrown.", what_arg.c_str()); } } // namespace moveit diff --git a/moveit_core/robot_trajectory/test/test_robot_trajectory.cpp b/moveit_core/robot_trajectory/test/test_robot_trajectory.cpp index e663924c34b..4a22a813ce3 100644 --- a/moveit_core/robot_trajectory/test/test_robot_trajectory.cpp +++ b/moveit_core/robot_trajectory/test/test_robot_trajectory.cpp @@ -63,8 +63,6 @@ class RobotTrajectoryTestFixture : public testing::Test void TearDown() override { - robot_model_.reset(); - robot_state_.reset(); } void initTestTrajectory(robot_trajectory::RobotTrajectoryPtr& trajectory) @@ -339,19 +337,19 @@ class OneRobot : public testing::Test trajectory = std::make_shared(robot_model_, arm_jmg_name_); - ASSERT_EQ(trajectory->getGroupName(), arm_jmg_name_) << "Generated trajectory group name does not match"; - ASSERT_TRUE(trajectory->empty()) << "Generated trajectory not empty"; + EXPECT_EQ(trajectory->getGroupName(), arm_jmg_name_) << "Generated trajectory group name does not match"; + EXPECT_TRUE(trajectory->empty()) << "Generated trajectory not empty"; double duration_from_previous = 0.1; std::size_t waypoint_count = 5; for (std::size_t ix = 0; ix < waypoint_count; ++ix) trajectory->addSuffixWayPoint(*robot_state_, duration_from_previous); // Quick check that getDuration is working correctly - ASSERT_EQ(trajectory->getDuration(), duration_from_previous * waypoint_count) + EXPECT_EQ(trajectory->getDuration(), duration_from_previous * waypoint_count) << "Generated trajectory duration incorrect"; - ASSERT_EQ(waypoint_count, trajectory->getWayPointDurations().size()) + EXPECT_EQ(waypoint_count, trajectory->getWayPointDurations().size()) << "Generated trajectory has the wrong number of waypoints"; - ASSERT_EQ(waypoint_count, trajectory->size()); + EXPECT_EQ(waypoint_count, trajectory->size()); } protected: