test: increase nebula_core_common unit coverage#425
Open
mojomex wants to merge 9 commits intotier4:mainfrom
Open
test: increase nebula_core_common unit coverage#425mojomex wants to merge 9 commits intotier4:mainfrom
mojomex wants to merge 9 commits intotier4:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #425 +/- ##
==========================================
+ Coverage 39.72% 48.73% +9.01%
==========================================
Files 128 165 +37
Lines 10018 13365 +3347
Branches 4977 6962 +1985
==========================================
+ Hits 3980 6514 +2534
- Misses 5443 5476 +33
- Partials 595 1375 +780
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
283aa5f to
cac9401
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Type
Related Links
Description
This PR increases coverage of
nebula_core_commonand adds focused unit tests for vendor-independent helpers.Main additions:
ReturnType,ReturnMode,SensorModel, andStatusring_buffer,bitfield,expected,rate_limiter,stopwatch,errno, and string conversion utilitiesget_bitfield()acrossuint8_t,uint16_t, anduint32_tSmall code fixes discovered while adding coverage:
Pandar128E3Xhandling in core sensor-model conversion helpersCAN_CONNECTION_ERRORbranch in status streamingbitfieldexplicitly require unsigned integral storage and simplify mask constructionerrnobuffer to avoid the compiler warning treated as an errorReview Procedure
nebula_commontests, check that round-trip/default-case coverage reflects the public conversion helpers without overfitting stream formatting.bitfieldcontract and the added edge-case coverage for full-width extraction.nebula_common.hpp,nebula_status.hpp,bitfield.hpp, anderrno.hppthat were exposed by the added tests.Remarks
Verification used while preparing this PR:
source /opt/ros/humble/setup.bash && colcon build --packages-select nebula_core_common --symlink-install --mixin debug compile-commands coverage-gccsource /opt/ros/humble/setup.bash && colcon test --packages-select nebula_core_common --event-handlers console_direct+The repo-wide
build-test-cov.shrun succeeds through coverage generation after splitting the vendor-specific work into follow-up PRs, but there is still an unrelated existing failure innebula_core_hw_interfaces(TestTcp.TestConnectTimeout) that is not addressed here.Pre-Review Checklist for the PR Author
PR Author should check the checkboxes below when creating the PR.
Checklist for the PR Reviewer
Reviewers should check the checkboxes below before approval.
Post-Review Checklist for the PR Author
PR Author should check the checkboxes below before merging.
CI Checks