-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Unit tests for Path2D class #66927
Unit tests for Path2D class #66927
Conversation
Have you seen #66425? |
Nope, thanks for pointing it out. I was working on this off of issue #43440 and didn't see anyone mention Path2d since 2020 so I thought I'd take care of it. I'm new to contributing so not sure what to do at this point. |
Provided you have the time, I would suggest looking at #66425, combining the test cases of both PRs and adding @MatthewTave as a co-author since according to their last comment they might be busy currently and won't be able to work on their PR. |
Updated PR with tests from PR #66425 authored by @MatthewTave. |
Thanks for updating your PR so quickly! There are just two things left to do: Please squash your commits into a single one as described here. Furthermore, please don't mention a PR in your commit message since that thread will be spammed whenever you forcepush. You can add @MatthewTave as a co-author to your single commit by following the steps here. |
74ad4b4
to
55f4414
Compare
Sorry that I have to annoy you again, but there should be an empty line between the first line of the commit message and the line with the co-author mention, otherwise the contribution won't count for the co-author (for whatever reason). You can check whether it has worked by looking at the "Commits" tab of this PR, there should be two profile pictures displayed on your commit. |
b73c9f1
to
a93973d
Compare
Ok, I think that should do it. Took me a sec to figure out the co author syntax. It actually wasn't the empty line, the email has to be within brackets, which isn't shown in the official github co-author help site. Thanks for the help. |
a93973d
to
64b66fd
Compare
Co-authored-by: Matthew-Tave <[email protected]>
64b66fd
to
92a466c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall, there are still test cases missing which actually test the functionality of Path2D, but as a start I think this is fine.
CHECK_MESSAGE(test_path->get_curve() != curve1, | ||
"After rewrite, second curve should be in class"); | ||
CHECK_MESSAGE(test_path->get_curve() == curve2, | ||
"After rewrite, second curve should be in class"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wordings seems a bit off to me, but that's also used in the Path3D tests, so I think we can change that later.
Thanks! |
Unit tests for the
Path2D
class. This follows pretty closely to the Path3D tests that already exist, testing to be sure the path is initialized correctly and that theCurve
of the path is set correctly under various conditions.