Skip to content

Commit

Permalink
Add regression test for subnamespace on node
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Hofstaetter <markus.hofstaetter@ait.ac.at>
  • Loading branch information
devrite committed May 7, 2021
1 parent 08a4836 commit ee5c9a0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rclcpp/test/rclcpp/test_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@ TEST_F(TestNode, get_name_and_namespace) {
}

TEST_F(TestNode, subnode_get_name_and_namespace) {
{
auto node = std::make_shared<rclcpp::Node>("my_node", "ns");
EXPECT_STREQ("", node->get_sub_namespace().c_str());
EXPECT_STREQ("/ns", node->get_effective_namespace().c_str());
}
{
auto node = std::make_shared<rclcpp::Node>("my_node", "ns");
auto subnode = node->create_sub_node("sub_ns");
Expand Down

0 comments on commit ee5c9a0

Please sign in to comment.