5 #include <gtest/gtest.h> 29 swri::param(pnh,
"used_bool_var_2", bool_var,
true);
33 ASSERT_EQ(4, unused.size());
34 ASSERT_EQ(ns +
"/unused_bool_var", unused[0]);
35 ASSERT_EQ(ns +
"/unused_dbl_var", unused[1]);
36 ASSERT_EQ(ns +
"/unused_int_var", unused[2]);
37 ASSERT_EQ(ns +
"/unused_str_var", unused[3]);
40 int main(
int argc,
char **argv)
43 testing::InitGoogleTest(&argc, argv);
44 return RUN_ALL_TESTS();
static std::vector< std::string > getUnusedParamKeys(ros::NodeHandle const &n)
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
TEST(ParamTests, getUnusedParamKeys)
static void param(const ros::NodeHandle &nh, const std::string &name, int &variable, const int default_value)
const std::string & getNamespace() const
static bool getParam(const ros::NodeHandle &nh, const std::string &name, int &variable)
int main(int argc, char **argv)