Skip to content

Commit

Permalink
Address peer review comments.
Browse files Browse the repository at this point in the history
Signed-off-by: Michel Hidalgo <[email protected]>
  • Loading branch information
hidmic committed May 19, 2020
1 parent b029a31 commit 47693f9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rmw_fastrtps_shared_cpp/test/test_names.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ TEST(NamespaceTest, get_prefix) {
EXPECT_EQ("", _get_ros_prefix_if_exists("not/a_ros_prefix"));
for (const auto & prefix : _get_all_ros_prefixes()) {
EXPECT_EQ("", _get_ros_prefix_if_exists(prefix + "_should_not_match"));
EXPECT_EQ("", _get_ros_prefix_if_exists("this/should_not_match/" + prefix));
EXPECT_EQ("", _get_ros_prefix_if_exists("th/is_should_not_match/" + prefix));
EXPECT_EQ(prefix, _get_ros_prefix_if_exists(prefix + "/should_match"));
}
}
Expand All @@ -37,8 +37,8 @@ TEST(NamespaceTest, strip_prefix) {
prefix + "should_not_be_stripped",
_strip_ros_prefix_if_exists(prefix + "should_not_be_stripped"));
EXPECT_EQ(
"this/should_not_be_stripped/" + prefix,
_strip_ros_prefix_if_exists("this/should_not_be_stripped/" + prefix));
"th/is_should_not_be_stripped/" + prefix,
_strip_ros_prefix_if_exists("th/is_should_not_be_stripped/" + prefix));
EXPECT_EQ("/should_be_stripped", _strip_ros_prefix_if_exists(prefix + "/should_be_stripped"));
}
}
Expand All @@ -54,7 +54,7 @@ TEST(NamespaceTest, resolve_prefix) {
EXPECT_EQ(
"", _resolve_prefix("some_ros_prefix_test", "some_ros_prefix"));
EXPECT_EQ(
"", _resolve_prefix("another_ros_prefix/test/some_ros_prefix", "some_ros_prefix"));
"", _resolve_prefix("this_ros_prefix/test/some_ros_prefix", "some_ros_prefix"));
}

TEST(NamespaceTest, name_mangling) {
Expand Down

0 comments on commit 47693f9

Please sign in to comment.