-
Notifications
You must be signed in to change notification settings - Fork 51
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
Expose cdr #267
Expose cdr #267
Conversation
test_communication/CMakeLists.txt
Outdated
macro(serialize) | ||
set(serialize_target_name "test_serialize${target}${target_suffix}") | ||
ament_add_gtest( | ||
${serialize_target_name} test/test_message_serialization.cpp |
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.
recommend indenting the arguments to ament_add_gtest()
TEST_F(CLASSNAME(TestMessageSerialization, RMW_IMPLEMENTATION), raw_callback) { | ||
size_t counter = 0; | ||
|
||
auto raw_callback = [&counter](const std::shared_ptr<rmw_message_raw_t> raw_msg) { |
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.
It looks like this test will pass if raw_callback
is never called. Maybe add EXPECT_GT(counter, 0u)
after the loop at the bottom?
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.
done in f6400e0
|
||
auto ret = RMW_RET_OK; | ||
ret = | ||
rmw_serialize(&bounded_array_nested_msg_c, message_c_typesupport, &raw_message_c); |
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.
It looks like this call would fit on the line above
EXPECT_EQ(RMW_RET_OK, ret); | ||
|
||
print_raw_buffer(raw_message_c, "raw message c"); | ||
print_raw_buffer(raw_message_cpp, "raw message cpp"); |
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.
Are raw_message_c.buffer
and raw_message_cpp.buffer
expected to be identical?
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.
I believe this might be RMW implementation dependent.
* raw->serialized * use size_t
This change might be the reason for the recently failing build: https://ci.ros2.org/job/ci_osx/3897/ |
but the static typesuppport branch has conflicts. Most likely due to my merge. |
Connects to ros2/demos#185