Skip to content

Commit

Permalink
Add regression test for node:__ns remapping
Browse files Browse the repository at this point in the history
  • Loading branch information
dhood authored and Kevin Allen committed Jul 13, 2018
1 parent 0ed0581 commit 1eac0e1
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions rcl/test/rcl/test_remap_integration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,3 +288,18 @@ TEST_F(CLASSNAME(TestRemapIntegrationFixture, RMW_IMPLEMENTATION), remap_relativ

EXPECT_EQ(RCL_RET_OK, rcl_node_fini(&node));
}

TEST_F(CLASSNAME(TestRemapIntegrationFixture, RMW_IMPLEMENTATION), remap_using_node_rules) {
int argc;
char ** argv;
SCOPE_GLOBAL_ARGS(
argc, argv, "process_name", "original_name:__ns:=/new_ns");

rcl_node_t node = rcl_get_zero_initialized_node();
rcl_node_options_t default_options = rcl_node_get_default_options();
ASSERT_EQ(RCL_RET_OK, rcl_node_init(&node, "original_name", "", &default_options));

{ // Node namespace gets remapped
EXPECT_STREQ("/new_ns", rcl_node_get_namespace(&node));
}
}

0 comments on commit 1eac0e1

Please sign in to comment.