From e5056e59de15a19ae4b6c7cabfe1f4fe6a31d86d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dr=2E=20Denis=20=C5=A0togl?= Date: Thu, 1 Feb 2024 20:42:38 +0100 Subject: [PATCH] Revert changes on RM tests. --- hardware_interface_testing/test/test_resource_manager.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hardware_interface_testing/test/test_resource_manager.cpp b/hardware_interface_testing/test/test_resource_manager.cpp index d21b4f26ae..4bb9e0c5fe 100644 --- a/hardware_interface_testing/test/test_resource_manager.cpp +++ b/hardware_interface_testing/test/test_resource_manager.cpp @@ -106,7 +106,9 @@ TEST_F(ResourceManagerTest, test_unitilizable_hardware_validation) // If the the hardware can not be initialized and load_urdf tried to validate the interfaces a // runtime exception is thrown TestableResourceManager rm; - EXPECT_FALSE(rm.load_urdf(ros2_control_test_assets::minimal_unitilizable_robot_urdf, true)); + ASSERT_THROW( + rm.load_urdf(ros2_control_test_assets::minimal_unitilizable_robot_urdf, true), + std::runtime_error); } TEST_F(ResourceManagerTest, test_unitilizable_hardware_no_validation) @@ -114,7 +116,7 @@ TEST_F(ResourceManagerTest, test_unitilizable_hardware_no_validation) // If the the hardware can not be initialized and load_urdf didn't try to validate the interfaces, // the interface should not show up TestableResourceManager rm; - EXPECT_TRUE(rm.load_urdf(ros2_control_test_assets::minimal_unitilizable_robot_urdf, false)); + EXPECT_NO_THROW(rm.load_urdf(ros2_control_test_assets::minimal_unitilizable_robot_urdf, false)); // test actuator EXPECT_FALSE(rm.state_interface_exists("joint1/position"));