Implement equality operator function for C messages.#648
Merged
Conversation
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
Contributor
Author
|
This is actually lacking some tests. I'll add them. |
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
gbiggs
approved these changes
Jan 21, 2022
|
|
||
| TEST(string_functions, equality_comparison) { | ||
| rosidl_runtime_c__String empty_string, foo_string, bar_string; | ||
| EXPECT_TRUE(rosidl_runtime_c__String__init(&empty_string)); |
Member
There was a problem hiding this comment.
These could be asserts to break early if initialisation fails.
Contributor
Author
There was a problem hiding this comment.
My understanding is that no tests in here do that to ensure rosidl_runtime_c__String__fini gets invoked. I could bring in rcpputils::scope_exit though. Thoughts?
Contributor
Author
Contributor
Author
|
Alright, going in! |
nnmm
pushed a commit
to nnmm/rosidl
that referenced
this pull request
Mar 8, 2022
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
nnmm
pushed a commit
to nnmm/rosidl
that referenced
this pull request
Mar 8, 2022
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
hidmic
added a commit
that referenced
this pull request
Apr 25, 2022
* Implement equality operator function for C messages. (#648) Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com> * Implement copy function for C messages (#650) Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com> * Replace rcutils_allocator with the system allocator Signed-off-by: Nikolai Morin <nnmmgit@gmail.com> * Set the output size unconditionally when copying sequences Signed-off-by: Nikolai Morin <nnmmgit@gmail.com> Co-authored-by: Michel Hidalgo <michel@ekumenlabs.com>
hidmic
added a commit
that referenced
this pull request
Apr 25, 2022
* Implement equality operator function for C messages. (#648) Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com> * Implement copy function for C messages (#650) Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com> * Replace rcutils_allocator with the system allocator Signed-off-by: Nikolai Morin <nnmmgit@gmail.com> * Set the output size unconditionally when copying sequences Signed-off-by: Nikolai Morin <nnmmgit@gmail.com> Co-authored-by: Michel Hidalgo <michel@ekumenlabs.com>
87 tasks
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.
Precisely what the title says. While working on typesupport introspection tests, I realized that while
operator==is overloaded for C++ messages, there's no such functionality for C messages. Thus a lot of code would have to be written to compare C messages for equality. This patch amends this.