24 #include <gtest/gtest.h> 25 #include <boost/foreach.hpp> 35 std::pair<std::string, std::string> item;
36 BOOST_FOREACH(item, map)
38 if (value == item.second)
47 TEST(SrArmFinder, no_hand_no_arm_finder_test)
74 TEST(SrArmFinder, one_hand_no_arm_finder_test)
101 TEST(SrArmFinder, no_hand_one_arm_finder_test)
118 std::string no_hand_one_arm_description;
119 ros::param::get(
"no_hand_one_arm_description", no_hand_one_arm_description);
134 ASSERT_GT(arm_finder.
get_joints().count(
"la"), 0);
137 TEST(SrArmFinder, one_hand_two_arms_finder_test)
154 std::string right_hand_two_arms;
176 ASSERT_EQ(arm_finder.
get_joints().count(
"ra"), 1);
177 ASSERT_EQ(arm_finder.
get_joints()[
"ra"].size(), 1);
182 ASSERT_EQ(arm_finder.
get_joints().count(
"la"), 1);
183 ASSERT_EQ(arm_finder.
get_joints()[
"la"].size(), 1);
186 TEST(SrArmFinder, two_hands_one_arm_finder_test)
203 std::string two_hands_left_arm;
225 ASSERT_EQ(arm_finder.
get_joints().count(
"la"), 1);
226 ASSERT_EQ(arm_finder.
get_joints()[
"la"].size(), 1);
229 int main(
int argc,
char **argv)
231 ros::init(argc, argv,
"test_arm_finder");
233 testing::InitGoogleTest(&argc, argv);
234 return RUN_ALL_TESTS();
std::map< std::string, std::string > joint_prefix_
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
void ASSERT_MAP_HAS_VALUE(const std::map< std::string, std::string > &map, const std::string &value)
ArmConfig get_arm_parameters()
ROSCPP_DECL void set(const std::string &key, const XmlRpc::XmlRpcValue &v)
ROSCPP_DECL bool get(const std::string &key, std::string &s)
int main(int argc, char **argv)
TEST(SrArmFinder, no_hand_no_arm_finder_test)
ROSCPP_DECL bool has(const std::string &key)
ROSCPP_DECL bool del(const std::string &key)
std::map< std::string, std::string > mapping_
std::map< std::string, std::vector< std::string > > get_joints()