Skip to content

Commit

Permalink
Adding output to test so they would not fail.
Browse files Browse the repository at this point in the history
  • Loading branch information
destogl authored and bmagyar committed Aug 14, 2023
1 parent 2309703 commit d89e9f7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions hardware_interface/test/test_components/test_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#include "hardware_interface/system_interface.hpp"
#include "hardware_interface/types/hardware_interface_type_values.hpp"

#include "rcutils/logging_macros.h"

using hardware_interface::CommandInterface;
using hardware_interface::return_type;
using hardware_interface::StateInterface;
Expand Down Expand Up @@ -54,6 +56,7 @@ class TestSystem : public SystemInterface

std::vector<CommandInterface> export_command_interfaces() override
{
RCUTILS_LOG_INFO_NAMED("test_system", "Exporting configuration interfaces.");
std::vector<CommandInterface> command_interfaces;
for (auto i = 0u; i < info_.joints.size(); ++i)
{
Expand Down
6 changes: 5 additions & 1 deletion hardware_interface/test/test_resource_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ TEST_F(ResourceManagerTest, initialization_with_urdf_manual_validation)
EXPECT_TRUE(rm.command_interface_exists("joint3/velocity"));
}

TEST_F(ResourceManagerTest, initialization_with_wrong_urdf)
TEST_F(ResourceManagerTest, when_missing_state_keys_expect_hw_initialization_fails)
{
// missing state keys
{
Expand All @@ -187,6 +187,10 @@ TEST_F(ResourceManagerTest, initialization_with_wrong_urdf)
ros2_control_test_assets::minimal_robot_missing_state_keys_urdf),
std::exception);
}
}

TEST_F(ResourceManagerTest, when_missing_command_keys_expect_hw_initialization_fails)
{
// missing command keys
{
EXPECT_THROW(
Expand Down

0 comments on commit d89e9f7

Please sign in to comment.