Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gripper] Add test for effort gripper controller #769

Conversation

chama1176
Copy link
Contributor

Add test for effort gripper controller.

Fix #764

GripperController uses template parameters, so I used type-parameterized tests.
https://github.com/google/googletest/blob/main/docs/advanced.md#type-parameterized-tests
https://en.cppreference.com/w/cpp/types/integral_constant

@codecov-commenter
Copy link

Codecov Report

Merging #769 (3226ad2) into master (e7f9962) will decrease coverage by 4.90%.
Report is 365 commits behind head on master.
The diff coverage is 25.91%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #769      +/-   ##
==========================================
- Coverage   35.78%   30.88%   -4.90%     
==========================================
  Files         189        7     -182     
  Lines       17570      832   -16738     
  Branches    11592      505   -11087     
==========================================
- Hits         6287      257    -6030     
+ Misses        994      133     -861     
+ Partials    10289      442    -9847     
Flag Coverage Δ
unittests 30.88% <25.91%> (-4.90%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
...ontroller/test/test_load_diff_drive_controller.cpp 11.11% <0.00%> (ø)
...ive_controller/test/test_diff_drive_controller.cpp 12.66% <7.81%> (ø)
diff_drive_controller/src/odometry.cpp 42.16% <11.11%> (ø)
diff_drive_controller/src/speed_limiter.cpp 46.55% <11.11%> (ø)
...iff_drive_controller/src/diff_drive_controller.cpp 47.13% <46.94%> (ø)
...de/diff_drive_controller/diff_drive_controller.hpp 100.00% <100.00%> (ø)
...troller/include/diff_drive_controller/odometry.hpp 100.00% <100.00%> (ø)

... and 189 files with indirect coverage changes

📢 Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ros-controls).

Copy link
Member

@bmagyar bmagyar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

I used gmock for many years but never came across typed tests, you learn something new every day! This is very elegant and clean, thanks!

@bmagyar bmagyar merged commit fb46a77 into ros-controls:master Sep 8, 2023
14 checks passed
@chama1176 chama1176 deleted the feature/add-test-for-effort-gripper-controller branch September 8, 2023 07:48
@bmagyar bmagyar added the backport-humble This label should be used by maintaines only! Label triggers PR backport to ROS2 humble. label Nov 27, 2023
mergify bot pushed a commit that referenced this pull request Nov 27, 2023
bmagyar pushed a commit that referenced this pull request Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-humble This label should be used by maintaines only! Label triggers PR backport to ROS2 humble.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[gripper] Add tests for effort interface
3 participants