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

test(autoware_geography_utils): add lanelet2_projector test #128

Merged
merged 2 commits into from
Dec 18, 2024

Conversation

youtalk
Copy link
Member

@youtalk youtalk commented Dec 17, 2024

Description

This adds lanelet2_projector test.

Related links

Parent Issue:

  • Link

How was this PR tested?

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

Signed-off-by: Yutaka Kondo <[email protected]>
@youtalk youtalk self-assigned this Dec 17, 2024
Copy link

github-actions bot commented Dec 17, 2024

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

Copy link

codecov bot commented Dec 17, 2024

Codecov Report

Attention: Patch coverage is 84.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 79.18%. Comparing base (051d227) to head (6c78597).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...e_geography_utils/test/test_lanelet2_projector.cpp 84.00% 0 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #128      +/-   ##
==========================================
+ Coverage   73.25%   79.18%   +5.93%     
==========================================
  Files          10       11       +1     
  Lines         172      197      +25     
  Branches       68       75       +7     
==========================================
+ Hits          126      156      +30     
+ Misses         19       11       -8     
- Partials       27       30       +3     
Flag Coverage Δ *Carryforward flag
differential 83.33% <84.00%> (?)
total 73.25% <ø> (ø) Carriedforward from 051d227

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@youtalk youtalk marked this pull request as ready for review December 17, 2024 12:43
Copy link
Contributor

@SakodaShintaro SakodaShintaro left a comment

Choose a reason for hiding this comment

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

From my understanding, get_lanelet2_projector is used in project_forward

std::unique_ptr<lanelet::Projector> projector = get_lanelet2_projector(projector_info);

and project_forward is already tested in

autoware::geography_utils::project_forward(geo_point, projector_info);

So, to some extent, get_lanelet2_projector is indirectly tested.

However, it is still okay to test it explicitly.

@youtalk
Copy link
Member Author

youtalk commented Dec 18, 2024

Since it is a unit test, I believe it is best to write tests for each smallest unit.

@youtalk youtalk merged commit c1eb46a into main Dec 18, 2024
36 of 37 checks passed
@youtalk youtalk deleted the add-test-lanelet2-projector-test branch December 18, 2024 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants