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(lane_departure_checker): add unit test for createVehiclePassingAreas #9548

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kyoichi-sugahara
Copy link
Contributor

Description

add unit test for createVehiclePassingAreas

How was this PR tested?

confirmed test result was all passed.

1: [==========] Running 26 tests from 7 test suites.
1: [----------] Global test environment set-up.
1: [----------] 4 tests from CreateVehiclePassingAreasTest
1: [ RUN      ] CreateVehiclePassingAreasTest.ReturnsEmptyAreaForEmptyInput
1: [       OK ] CreateVehiclePassingAreasTest.ReturnsEmptyAreaForEmptyInput (0 ms)
1: [ RUN      ] CreateVehiclePassingAreasTest.ReturnsSameAreaForSingleFootprint
1: [       OK ] CreateVehiclePassingAreasTest.ReturnsSameAreaForSingleFootprint (0 ms)
1: [ RUN      ] CreateVehiclePassingAreasTest.CreatesValidHullForAdjacentFootprints
1: [       OK ] CreateVehiclePassingAreasTest.CreatesValidHullForAdjacentFootprints (0 ms)
1: [ RUN      ] CreateVehiclePassingAreasTest.HandlesNonAdjacentFootprints
1: [       OK ] CreateVehiclePassingAreasTest.HandlesNonAdjacentFootprints (0 ms)
1: [----------] 4 tests from CreateVehiclePassingAreasTest (0 ms total)

Notes for reviewers

This PR includes refactor PR so please check together with the PR.

Interface changes

None.

Effects on system behavior

None.

@github-actions github-actions bot added the component:control Vehicle control algorithms and mechanisms. (auto-assigned) label Dec 3, 2024
Copy link

github-actions bot commented Dec 3, 2024

Thank you for contributing to the Autoware project!

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

Please ensure:

const std::vector<LinearRing2d> & footprints, const LinearRing2d & hull)
{
for (const auto & footprint : footprints) {
for (size_t i = 0; i < footprint.size() - 1; ++i) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it supposed to be i < footprint.size() - 1 or i < footprint.size()?
If footprint.size() == 0, then we might have an overflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:control Vehicle control algorithms and mechanisms. (auto-assigned)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants