Add construction tests for Vector2, Vector3, Vector4, Quaternion, and Pose#172
Merged
chapulina merged 2 commits intogazebosim:ign-math6from Oct 26, 2020
Merged
Conversation
ahcorde
approved these changes
Oct 26, 2020
chapulina
approved these changes
Oct 26, 2020
Contributor
chapulina
left a comment
There was a problem hiding this comment.
The error reported in the issue comes from the fact that the operation is a copy assignment to unique_ptr, and not a move assignment.
Thanks for checking and for the tests. You're right, I checked that the example tests work by changing
ptr2 = ptr1;
to
ptr2 = std::move(ptr1);
… Pose Closes gazebosim#76 Signed-off-by: Nick Lamprianidis <nlamprian@gmail.com>
4d9d5ca to
7d2c15c
Compare
Contributor
Author
|
Should these tests be replicated for the rest of the classes? |
Contributor
That would be great if you're up for it. Hopefully you won't find any classes that aren't movable. And having the tests in place will make sure we don't break this usage in the future. But when it comes to #76, I think this is enough to address those concerns, so we can close it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The classes are already moveable. The error reported in the issue comes from the fact that the operation is a copy assignment to unique_ptr, and not a move assignment.
Closes #76
Signed-off-by: Nick Lamprianidis nlamprian@gmail.com