add test for topic name
This commit is contained in:
parent
fcee889f55
commit
18fbfad116
2 changed files with 2 additions and 0 deletions
|
@ -97,6 +97,7 @@ TEST_F(CLASSNAME(TestPublisherFixture, RMW_IMPLEMENTATION), test_publisher_nomin
|
||||||
rcl_ret_t ret = rcl_publisher_fini(&publisher, this->node_ptr);
|
rcl_ret_t ret = rcl_publisher_fini(&publisher, this->node_ptr);
|
||||||
EXPECT_EQ(RCL_RET_OK, ret) << rcl_get_error_string_safe();
|
EXPECT_EQ(RCL_RET_OK, ret) << rcl_get_error_string_safe();
|
||||||
});
|
});
|
||||||
|
EXPECT_EQ(strcmp(rcl_publisher_get_topic_name(&publisher), topic_name), 0);
|
||||||
std_msgs__msg__Int64 msg;
|
std_msgs__msg__Int64 msg;
|
||||||
std_msgs__msg__Int64__init(&msg);
|
std_msgs__msg__Int64__init(&msg);
|
||||||
msg.data = 42;
|
msg.data = 42;
|
||||||
|
|
|
@ -147,6 +147,7 @@ TEST_F(CLASSNAME(TestSubscriptionFixture, RMW_IMPLEMENTATION), test_subscription
|
||||||
rcl_ret_t ret = rcl_subscription_fini(&subscription, this->node_ptr);
|
rcl_ret_t ret = rcl_subscription_fini(&subscription, this->node_ptr);
|
||||||
EXPECT_EQ(RCL_RET_OK, ret) << rcl_get_error_string_safe();
|
EXPECT_EQ(RCL_RET_OK, ret) << rcl_get_error_string_safe();
|
||||||
});
|
});
|
||||||
|
EXPECT_EQ(strcmp(rcl_subscription_get_topic_name(&subscription), topic), 0);
|
||||||
// TODO(wjwwood): add logic to wait for the connection to be established
|
// TODO(wjwwood): add logic to wait for the connection to be established
|
||||||
// probably using the count_subscriptions busy wait mechanism
|
// probably using the count_subscriptions busy wait mechanism
|
||||||
// until then we will sleep for a short period of time
|
// until then we will sleep for a short period of time
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue