Skip to content

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

Open
mergify[bot] wants to merge 2 commits into
gz-math8from
mergify/bp/gz-math8/pr-813
Open

Line3: increase test coverage (backport #813)#835
mergify[bot] wants to merge 2 commits into
gz-math8from
mergify/bp/gz-math8/pr-813

Conversation

@mergify

@mergify mergify Bot commented Aug 26, 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).

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

# Conflicts:
#	src/python_pybind11/test/Line3_TEST.py
@mergify mergify Bot added the conflicts label Aug 26, 2026
@mergify
mergify Bot requested a review from scpeters as a code owner August 26, 2026 10:46
@mergify

mergify Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

Cherry-pick of 578203f has failed:

On branch mergify/bp/gz-math8/pr-813
Your branch is up to date with 'origin/gz-math8'.

You are currently cherry-picking commit 578203f.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   include/gz/math/Line3.hh
	modified:   src/Line3_TEST.cc

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   src/python_pybind11/test/Line3_TEST.py

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@mergify
mergify Bot requested a review from adityapande-1995 as a code owner August 26, 2026 10:46
@mergify mergify Bot added the conflicts label Aug 26, 2026
@github-actions github-actions Bot added the 🏛️ ionic Gazebo Ionic label Aug 26, 2026
@mergify mergify Bot mentioned this pull request Aug 26, 2026
19 tasks
@github-project-automation github-project-automation Bot moved this from Inbox to In review in Core development Aug 26, 2026
Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
@ahcorde
ahcorde enabled auto-merge (squash) August 26, 2026 11:22
@scpeters
scpeters disabled auto-merge August 26, 2026 11:38
@scpeters

Copy link
Copy Markdown
Member

I'd like to generate backports from #821 since it has the fixed commit attribution and doesn't need the DCO bot warning to be manually ignored

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

3 participants