From 2f33675d01a45624906174fd368e4ddf3ab548be Mon Sep 17 00:00:00 2001 From: Felix Exner Date: Thu, 11 May 2023 14:55:31 +0200 Subject: [PATCH] Update tests to allow empty URDF parameter to hardware interface --- hardware_interface/test/test_component_parser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hardware_interface/test/test_component_parser.cpp b/hardware_interface/test/test_component_parser.cpp index 97d4a77d21..e5e851d387 100644 --- a/hardware_interface/test/test_component_parser.cpp +++ b/hardware_interface/test/test_component_parser.cpp @@ -100,14 +100,14 @@ TEST_F(TestComponentParser, component_interface_type_empty_throws_error) ASSERT_THROW(parse_control_resources_from_urdf(broken_urdf_string), std::runtime_error); } -TEST_F(TestComponentParser, parameter_empty_throws_error) +TEST_F(TestComponentParser, parameter_empty_throws_no_error) { const std::string broken_urdf_string = std::string(ros2_control_test_assets::urdf_head) + ros2_control_test_assets::invalid_urdf_ros2_control_parameter_empty + ros2_control_test_assets::urdf_tail; - ASSERT_THROW(parse_control_resources_from_urdf(broken_urdf_string), std::runtime_error); + ASSERT_NO_THROW(parse_control_resources_from_urdf(broken_urdf_string)); } TEST_F(TestComponentParser, successfully_parse_valid_urdf_system_one_interface)