Skip to content

Line3: increase test coverage (backport #813) - #821

Merged
ahcorde merged 3 commits into
gz-math9from
mergify/bp/gz-math9/pr-813
Aug 26, 2026
Merged

Line3: increase test coverage (backport #813)#821
ahcorde merged 3 commits into
gz-math9from
mergify/bp/gz-math9/pr-813

Conversation

@mergify

@mergify mergify Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

🦟 Bug fix

Improve test coverage of the Line3 class, similar to #807

Summary

This increases test coverage based on suggestions from Gemini and uses static_cast<T> where needed to fix windows C4244 compiler warnings.

Summary of test coverage improvements

  1. Default Constructor: Tested Line3() initialization.
  2. Set Overload: Added tests for Set(const Vector3<T>&, const Vector3<T>&).
  3. Intersect Edge Cases: Added tests for parallel non-overlapping line segments, parallel overlapping segments, and non-intersecting skew lines.
  4. Template Types: Added test cases for Line3i (int) and Line3f (float).

Backport Policy

  • This is safe to backport to the following versions:
    • Jetty
    • Ionic
    • Harmonic
    • Fortress
  • This should not be backported
  • I am not sure
  • Other (fill in yourself)

Checklist

  • Signed all commits for DCO
  • Added a screen capture or video to the PR description that demonstrates the fix (as needed)
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • Updated Bazel files (if adding new files). Created an issue otherwise.
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers
  • Was GenAI used to generate this PR? If so, make sure to add "Assisted-by" to your commits. (See this policy for more info.)

Assisted-by: Gemini 3.6 Flash

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by and Generated-by messages.

Backports: If this is a backport, please use Rebase and Merge instead.


This is an automatic backport of pull request #813 done by [Mergify](https://mergify.com).

@github-actions github-actions Bot added the 🪵 jetty Gazebo Jetty label Aug 22, 2026
@mergify mergify Bot mentioned this pull request Aug 22, 2026
19 tasks
@github-project-automation github-project-automation Bot moved this from Inbox to In review in Core development Aug 24, 2026
@scpeters
scpeters marked this pull request as draft August 24, 2026 16:34
@scpeters

Copy link
Copy Markdown
Member

there is an issue with the DCO due to the mangled name and email in https://github.com/gazebosim/gz-math/commit/578203f7bde5091a15b04f597c64ddf179929bf0.patch

From: Steve Peters ahcorde@gmail.com

I will amend and force-push

* Line3: increase test coverage

1. Default Constructor: Tested Line3() initialization.
2. Added tests for Set(const Vector3<T>&, const Vector3<T>&).
3. Intersect Edge Cases: parallel non-overlapping line segments,
   parallel overlapping segments, and non-intersecting skew lines.
4. Template Types: Added test cases for Line3i (int) and Line3f (float).

Assisted-by: Gemini 3.6 Flash

Signed-off-by: Steve Peters <scpeters@intrinsic.ai>

* Line3: fix conversion warnings with static_cast<T>

Assisted-by: Gemini 3.6 Flash

Signed-off-by: Steve Peters <scpeters@intrinsic.ai>

---------

Signed-off-by: Steve Peters <scpeters@intrinsic.ai>
(cherry picked from commit 578203f)
@scpeters
scpeters force-pushed the mergify/bp/gz-math9/pr-813 branch from afac575 to 0e36e71 Compare August 24, 2026 21:07
@scpeters

Copy link
Copy Markdown
Member

I will amend and force-push

done in 0e36e71

confirm by inspecting https://github.com/gazebosim/gz-math/commit/0e36e71067b80334175d0fc068b1286593e68aca.patch

From: Steve Peters scpeters@intrinsic.ai

@scpeters
scpeters marked this pull request as ready for review August 25, 2026 21:01
@ahcorde
ahcorde enabled auto-merge (squash) August 26, 2026 10:44
@ahcorde
ahcorde merged commit 1044cd5 into gz-math9 Aug 26, 2026
15 checks passed
@ahcorde
ahcorde deleted the mergify/bp/gz-math9/pr-813 branch August 26, 2026 13:33
@github-project-automation github-project-automation Bot moved this from In review to Done in Core development Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🪵 jetty Gazebo Jetty

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants