Repository navigation
use string_array_t from c_utilities package - #118
Conversation
| @@ -112,13 +106,7 @@ RCL_WARN_UNUSED | |||
| rcl_ret_t | |||
| rcl_get_node_names( | |||
There was a problem hiding this comment.
While you're here, please add some documentation for this function.
| ret = rcl_destroy_node_names(&node_names); | ||
| EXPECT_EQ(RCL_RET_OK, ret) << rcl_get_error_string_safe(); | ||
| } | ||
|
|
There was a problem hiding this comment.
Do these tests not need to stay? And maybe be extended to actually check the contents of the node names listed? Or is that tested elsewhere (maybe system tests)?
There was a problem hiding this comment.
I'll removed them because of duplication.
The create and fini functions are covered in this one: https://github.com/ros2/c_utilities/blob/master/test/test_string_array.cpp
The semantics of get_node_names is covered here:
https://github.com/ros2/rcl/blob/master/rcl/test/rcl/test_get_node_names.cpp
Are we missing any tests on that?
There was a problem hiding this comment.
Oh ok, I didn't notice the other tests in the file. Looks good, sorry for the noise.
wjwwood
left a comment
There was a problem hiding this comment.
lgtm, other than a comment.
I touched up the docs in 462587b, @Karsten1987 please have a look at that and see if it is right.
| EXPECT_EQ(0, strcmp(node1_name, node_names.data[0])); | ||
| EXPECT_EQ(0, strcmp(node2_name, node_names.data[1])); | ||
|
|
||
| utilities_string_array_fini(&node_names); |
There was a problem hiding this comment.
This has a return code, I think you ought to check it. It's related to my comment about this function needing the "warn unused" attribute applied to it.
* Make the TOPIC and NAMESPACE macros unsigned. This is more correct; they can never be negative, as that doesn't make any sense. This also fixes some warnings on mismatched types that get thrown up when adding -Wall -Wextra to the flags, which this commit also does. Signed-off-by: Chris Lalancette <[email protected]> * Add -Wpedantic to the flags. This also required one more small fix. Signed-off-by: Chris Lalancette <[email protected]>
connects to ros2/rmw#100