Skip to content

Commit

Permalink
Update tests to allow empty URDF parameter to hardware interface
Browse files Browse the repository at this point in the history
  • Loading branch information
fmauch committed May 11, 2023
1 parent 2f9a554 commit 2f33675
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hardware_interface/test/test_component_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2f33675

Please sign in to comment.