Skip to content

Commit 357183c

Browse files
authored
Add test linting to wait_set and fix issues. (ros2#346)
Signed-off-by: Allison Thackston <[email protected]>
1 parent 91a6150 commit 357183c

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

rclcpp/wait_set/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,10 @@ install(TARGETS
7878
wait_set_composed
7979
DESTINATION lib/${PROJECT_NAME}
8080
)
81+
82+
if(BUILD_TESTING)
83+
find_package(ament_lint_auto REQUIRED)
84+
ament_lint_auto_find_test_dependencies()
85+
endif()
86+
8187
ament_package()

rclcpp/wait_set/include/wait_set/random_talker.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class RandomTalker : public rclcpp::Node
3131
pub2_(this->create_publisher<std_msgs::msg::String>("topicB", 10)),
3232
pub3_(this->create_publisher<std_msgs::msg::String>("topicC", 10)),
3333
rand_engine_(static_cast<std::default_random_engine::result_type>(
34-
std::abs(std::chrono::system_clock::now().time_since_epoch().count())
34+
std::abs(std::chrono::system_clock::now().time_since_epoch().count())
3535
))
3636
{
3737
publish_functions_.emplace_back(

rclcpp/wait_set/package.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
<exec_depend>rclcpp_components</exec_depend>
2222
<exec_depend>std_msgs</exec_depend>
2323

24+
<test_depend>ament_lint_auto</test_depend>
25+
<test_depend>ament_lint_common</test_depend>
26+
2427
<export>
2528
<build_type>ament_cmake</build_type>
2629
</export>

0 commit comments

Comments
 (0)