Skip to content

Commit a5ed335

Browse files
committed
added tests to the passthrough controller
1 parent d42ccc1 commit a5ed335

7 files changed

+438
-4
lines changed

passthrough_controller/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ if(BUILD_TESTING)
5959
controller_manager
6060
ros2_control_test_assets
6161
)
62+
63+
ament_add_gmock(test_passthrough_controller
64+
test/test_passthrough_controller.cpp
65+
)
66+
target_link_libraries(test_passthrough_controller
67+
passthrough_controller
68+
)
6269
endif()
6370

6471
install(

passthrough_controller/passthrough_controller.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
A simple demo of chainable controllers. It passes commands through without change.
77
</description>
88
</class>
9-
</library>
9+
</library>

passthrough_controller/src/passthrough_controller.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
namespace passthrough_controller
1818
{
1919

20-
} // namespace passthrough_controller
20+
} // namespace passthrough_controller
2121

2222
#include "pluginlib/class_list_macros.hpp"
2323

passthrough_controller/src/passthrough_controller_parameters.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ passthrough_controller:
44
default_value: [],
55
description: "Names of the interfaces to be forwarded",
66
}
7-

passthrough_controller/test/test_load_controller.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ TEST(TestLoadPidController, load_controller)
3434
ros2_control_test_assets::minimal_robot_urdf),
3535
executor, "test_controller_manager");
3636

37-
ASSERT_NO_THROW(cm.load_controller("test_passthrough_controller", "passthrough_controller/PassthroughController"));
37+
ASSERT_NO_THROW(cm.load_controller(
38+
"test_passthrough_controller", "passthrough_controller/PassthroughController"));
3839

3940
rclcpp::shutdown();
4041
}

0 commit comments

Comments
 (0)