Go to the documentation of this file.
40 #include <gtest/gtest.h>
53 ASSERT_EQ(
param,
":ROS_NAMESPACE:parent");
56 TEST(namespaces, localParam)
61 ASSERT_EQ(
param,
":ROS_NAMESPACE:NODE_NAME:local");
66 ASSERT_STREQ(param2.c_str(),
param.c_str());
67 ASSERT_STREQ(param2.c_str(),
":ROS_NAMESPACE:NODE_NAME:local");
70 TEST(namespaces, globalParam)
74 ASSERT_EQ(
param,
":global");
77 TEST(namespaces, otherNamespaceParam)
81 ASSERT_EQ(
param,
":other_namespace:param");
87 ASSERT_EQ(name,
"/ROS_NAMESPACE/NODE_NAME");
89 ASSERT_EQ(nspace,
"/ROS_NAMESPACE");
93 main(
int argc,
char** argv)
95 testing::InitGoogleTest(&argc, argv);
98 return RUN_ALL_TESTS();
const ROSCPP_DECL std::string & getNamespace()
ROSCPP_DECL void init(const M_string &remappings, const std::string &name, uint32_t options=0)
ROSCPP_DECL bool get(const std::string &key, bool &b)
const ROSCPP_DECL std::string & getName()
T param(const std::string ¶m_name, const T &default_val) const
T param(const std::string ¶m_name, const T &default_val)
int main(int argc, char **argv)
test_roscpp
Author(s): Morgan Quigley, Josh Faust, Brian Gerkey, Troy Straszheim, Dirk Thomas
, Jacob Perron
autogenerated on Sat Sep 14 2024 02:59:57