Fix std::string construction. (#636)

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
This commit is contained in:
Michel Hidalgo 2020-04-27 17:34:17 -03:00 committed by GitHub
parent 2f76cdc9e4
commit f5702e41a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -556,7 +556,7 @@ TEST_F(CLASSNAME(TestSubscriptionFixture, RMW_IMPLEMENTATION), test_subscription
ASSERT_EQ(RCL_RET_OK, ret) << rcl_get_error_string().str; ASSERT_EQ(RCL_RET_OK, ret) << rcl_get_error_string().str;
ASSERT_EQ( ASSERT_EQ(
std::string(test_string), std::string(test_string),
std::string(*msg_loaned->string_value.data, msg_loaned->string_value.size)); std::string(msg_loaned->string_value.data, msg_loaned->string_value.size));
} else { } else {
ret = rcl_take(&subscription, &msg, nullptr, nullptr); ret = rcl_take(&subscription, &msg, nullptr, nullptr);
ASSERT_EQ(RCL_RET_OK, ret) << rcl_get_error_string().str; ASSERT_EQ(RCL_RET_OK, ret) << rcl_get_error_string().str;