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(virtual_traffic_light): add unit tests for utils #9107

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

kosuke55
Copy link
Contributor

@kosuke55 kosuke55 commented Oct 17, 2024

Description

add unit tests for utils

image

image

Related links

Parent Issue:

  • Link

How was this PR tested?

unit test

5: [==========] Running 9 tests from 1 test suite.
5: [----------] Global test environment set-up.
5: [----------] 9 tests from VirtualTrafficLightTest
5: [ RUN      ] VirtualTrafficLightTest.CreateKeyValue
5: [       OK ] VirtualTrafficLightTest.CreateKeyValue (0 ms)
5: [ RUN      ] VirtualTrafficLightTest.ToAutowarePoints
5: [       OK ] VirtualTrafficLightTest.ToAutowarePoints (0 ms)
5: [ RUN      ] VirtualTrafficLightTest.CalcCenter
5: [       OK ] VirtualTrafficLightTest.CalcCenter (0 ms)
5: [ RUN      ] VirtualTrafficLightTest.CalcHeadPose
5: [       OK ] VirtualTrafficLightTest.CalcHeadPose (0 ms)
5: [ RUN      ] VirtualTrafficLightTest.ConvertToGeomPoint
5: [       OK ] VirtualTrafficLightTest.ConvertToGeomPoint (0 ms)
5: [ RUN      ] VirtualTrafficLightTest.InsertStopVelocityFromStart
5: [       OK ] VirtualTrafficLightTest.InsertStopVelocityFromStart (0 ms)
5: [ RUN      ] VirtualTrafficLightTest.InsertStopVelocityAtCollision
5: ----- insert stop velocity at first point -----
5: ----- insert stop velocity at middle point -----
5: ----- insert stop velocity at last -----
5: ----- insert stop velocity at middle point with offset 0.01 -----
5: ----- insert stop velocity at middle point with offset 0.4 -----
5: ----- insert stop velocity at middle point with offset 1.0 -----
5: [       OK ] VirtualTrafficLightTest.InsertStopVelocityAtCollision (1 ms)
5: [ RUN      ] VirtualTrafficLightTest.insertStopVelocityAtCollision
5: ----- insert stop velocity at first point -----
5: ----- insert stop velocity at middle point -----
5: ----- insert stop velocity at last -----
5: ----- insert stop velocity at middle point with 0.5 offset -----
5: ----- insert stop velocity at middle point with -0.5 offset -----
5: [       OK ] VirtualTrafficLightTest.insertStopVelocityAtCollision (0 ms)
5: [ RUN      ] VirtualTrafficLightTest.FindLastCollisionBeforeEndLine
5: ----- find first collision point -----
5: ----- find middle collision point -----
5: ----- find middle collision point -----
5: ----- find collision point with multi target lines -----
5: [       OK ] VirtualTrafficLightTest.FindLastCollisionBeforeEndLine (0 ms)
5: [----------] 9 tests from VirtualTrafficLightTest (1 ms total)
5:
5: [----------] Global test environment tear-down
5: [==========] 9 tests from 1 test suite ran. (1 ms total)
5: [  PASSED  ] 9 tests.
5: libgcov profiling error:/home/kosuke55/pilot-auto/build/autoware_behavior_velocity_virtual_traffic_light_module/CMakeFiles/test_autoware_behavior_velocity_virtual_traffic_light_module.dir/test/test_utils.cpp.gcda:overwriting an existing profile data with a different timestamp
5: -- run_test.py: return code 0
5: -- run_test.py: inject classname prefix into gtest result file '/home/kosuke55/pilot-auto/build/autoware_behavior_velocity_virtual_traffic_light_module/test_results/autoware_behavior_velocity_virtual_traffic_light_module/test_autoware_behavior_velocity_virtual_traffic_light_module.gtest.xml'
5: -- run_test.py: verify result file '/home/kosuke55/pilot-auto/build/autoware_behavior_velocity_virtual_traffic_light_module/test_results/autoware_behavior_velocity_virtual_traffic_light_module/test_autoware_behavior_velocity_virtual_traffic_light_module.gtest.xml'
5/5 Test #5: test_autoware_behavior_velocity_virtual_traffic_light_module ...   Passed    0.16 sec

100% tests passed, 0 tests failed out of 5

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Oct 17, 2024
Copy link

github-actions bot commented Oct 17, 2024

Thank you for contributing to the Autoware project!

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

Please ensure:

Signed-off-by: kosuke55 <kosuke.tnp@gmail.com>
@kosuke55 kosuke55 changed the title Test/vtl test(virtual_traffic_light): add unit tests for utils Oct 24, 2024
@kosuke55 kosuke55 added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Oct 24, 2024
Copy link

codecov bot commented Oct 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 28.50%. Comparing base (3711683) to head (3d046e3).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9107      +/-   ##
==========================================
+ Coverage   28.47%   28.50%   +0.03%     
==========================================
  Files        1306     1311       +5     
  Lines      101071   101122      +51     
  Branches    39226    39228       +2     
==========================================
+ Hits        28776    28827      +51     
+ Misses      69472    69468       -4     
- Partials     2823     2827       +4     
Flag Coverage Δ *Carryforward flag
differential 17.86% <ø> (?)
total 28.47% <ø> (ø) Carriedforward from 3711683

*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.

@kosuke55 kosuke55 merged commit bca5be3 into autowarefoundation:main Oct 24, 2024
47 of 50 checks passed
@kosuke55 kosuke55 deleted the test/vtl branch October 24, 2024 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:planning Route planning, decision-making, and navigation. (auto-assigned) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants