32 #include <gtest/gtest.h> 36 TEST(Mcl3DlCompat, ParamRename)
45 mcl_3dl_compat::paramRename<double>(nh,
"param1_new",
"param1");
46 mcl_3dl_compat::paramRename<double>(nh,
"param2_new",
"param2");
48 ASSERT_TRUE(nh.hasParam(
"param1_new"));
49 ASSERT_TRUE(nh.hasParam(
"param2_new"));
50 ASSERT_TRUE(nh.hasParam(
"param3_new"));
55 nh.getParam(
"param1_new", param1);
56 nh.getParam(
"param2_new", param2);
57 nh.getParam(
"param3_new", param3);
60 ASSERT_EQ(param1, 1.0);
62 ASSERT_EQ(param2, 3.0);
64 ASSERT_EQ(param3, 4.0);
67 int main(
int argc,
char** argv)
69 testing::InitGoogleTest(&argc, argv);
70 ros::init(argc, argv,
"test_mcl_3dl_compat");
72 return RUN_ALL_TESTS();
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
TEST(Mcl3DlCompat, ParamRename)
int main(int argc, char **argv)
void setParam(const std::string &key, const XmlRpc::XmlRpcValue &v) const