Skip to content

Conversation

@bjin2364
Copy link

Changes

  • something that's slightly been bothering me are the gmock test deps, when none of the unit tests are using gmock. This PR updates the dependencies so they're gtest

Testing

  • passing unit tests

Notes

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.33%. Comparing base (69bd9a3) to head (1beb22f).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #460      +/-   ##
==========================================
+ Coverage   85.25%   85.33%   +0.08%     
==========================================
  Files          17       17              
  Lines        1397     1398       +1     
  Branches      132      132              
==========================================
+ Hits         1191     1193       +2     
+ Misses        120      119       -1     
  Partials       86       86              
Flag Coverage Δ
unittests 85.33% <100.00%> (+0.08%) ⬆️

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

Files with missing lines Coverage Δ
realtime_tools/test/lock_free_queue_tests.cpp 94.04% <ø> (+0.59%) ⬆️
realtime_tools/test/realtime_buffer_tests.cpp 100.00% <ø> (ø)
realtime_tools/test/realtime_mutex_tests.cpp 100.00% <ø> (ø)
realtime_tools/test/realtime_publisher_tests.cpp 92.85% <ø> (ø)
...e_tools/test/realtime_server_goal_handle_tests.cpp 92.80% <ø> (ø)
...time_tools/test/realtime_thread_safe_box_tests.cpp 98.82% <100.00%> (+0.01%) ⬆️
...ealtime_tools/test/test_async_function_handler.cpp 100.00% <ø> (ø)
realtime_tools/test/thread_priority_tests.cpp 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@christophfroehlich
Copy link
Member

we use gmock per default in all our repositories. I haven't compared it, but the argument of @bmagyar is that the failure messages are more descriptive.

@bjin2364
Copy link
Author

the argument of @bmagyar is that the failure messages are more descriptive.

Interesting... for my own education, what would be an example of this case? My understanding is unless we're making calls to gmock-specific API, then the outcome is exactly the same as if we depended directly on gtest.

@christophfroehlich
Copy link
Member

maybe this was only a decision for simplicity to have the same all over the place, and use gmock matchers where they make sense like testing::AllOf

@bjin2364
Copy link
Author

bjin2364 commented Nov 23, 2025

From my experience so far, the issue with defaulting to gmock is:

I think developers can always include gmock later when they need a feature from it, but I can close this PR if this goes against a preferred convention

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants