31 #include <gtest/gtest.h> 36 #define PRINT(cmd) printf(#cmd"\n"); cmd; printf("\n"); 38 TEST(SearchParamTest, search_test_A)
45 EXPECT_TRUE(nh.
getParam(
"A", result));
46 EXPECT_STREQ(
"right one!", result.c_str());
49 std::string full_name;
51 EXPECT_STREQ(
"/A", full_name.c_str());
52 EXPECT_TRUE(nh.
getParam(full_name, result));
53 EXPECT_STREQ(
"right one!", result.c_str());
56 int main(
int argc,
char** argv)
58 testing::InitGoogleTest(&argc, argv);
59 ros::init(argc, argv,
"search_param_tester");
62 return RUN_ALL_TESTS();
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
ROSCPP_DECL void set(const std::string &key, const XmlRpc::XmlRpcValue &v)
TEST(SearchParamTest, search_test_A)
bool searchParam(const std::string &key, std::string &result) const
bool getParam(const std::string &key, std::string &s) const
int main(int argc, char **argv)