Skip to content

Commit

Permalink
Improve test readability
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Perez <jjperez@ekumenlabs.com>
  • Loading branch information
Blast545 committed Sep 14, 2020
1 parent 2c9b77e commit 82d7ae7
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions rclcpp/test/rclcpp/test_type_support.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,14 @@ class TestTypeSupport : public ::testing::Test
{
rcl_service_t service_handle = rcl_get_zero_initialized_service();
rcl_service_options_t service_options = rcl_service_get_default_options();
auto node_handle = node->get_node_base_interface()->get_rcl_node_handle();
rcl_ret_t ret = rcl_service_init(
&service_handle,
node->get_node_base_interface()->get_rcl_node_handle(),
ts, "base_node_service", &service_options);
&service_handle, node_handle, ts, "base_node_service", &service_options);
if (ret != RCL_RET_OK) {
return ::testing::AssertionFailure()
<< "Failed rcl_service_init with error string: " << rcl_get_error_string().str;
}
EXPECT_EQ(
RCL_RET_OK, rcl_service_fini(
&service_handle,
node->get_node_base_interface()->get_rcl_node_handle()));
ret = rcl_service_fini(&service_handle, node_handle);
if (ret != RCL_RET_OK) {
return ::testing::AssertionFailure()
<< "Failed rcl_service_fini with error string: " << rcl_get_error_string().str;
Expand Down

0 comments on commit 82d7ae7

Please sign in to comment.