From 8bd416ceb21a390f3cace5cfcef2d8cc47339e59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20=C5=A0togl?= Date: Wed, 14 Jun 2023 21:35:49 +0200 Subject: [PATCH] Adding output to test so they would not fail. --- hardware_interface/test/test_components/test_system.cpp | 3 +++ hardware_interface/test/test_resource_manager.cpp | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/hardware_interface/test/test_components/test_system.cpp b/hardware_interface/test/test_components/test_system.cpp index 73659ca506..f198e057da 100644 --- a/hardware_interface/test/test_components/test_system.cpp +++ b/hardware_interface/test/test_components/test_system.cpp @@ -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; @@ -54,6 +56,7 @@ class TestSystem : public SystemInterface std::vector export_command_interfaces() override { + RCUTILS_LOG_INFO_NAMED("test_system", "Exporting configuration interfaces."); std::vector command_interfaces; for (auto i = 0u; i < info_.joints.size(); ++i) { diff --git a/hardware_interface/test/test_resource_manager.cpp b/hardware_interface/test/test_resource_manager.cpp index f2f81fbd80..12cc597dc7 100644 --- a/hardware_interface/test/test_resource_manager.cpp +++ b/hardware_interface/test/test_resource_manager.cpp @@ -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 { @@ -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(