8 #include <gtest/gtest.h> 9 #include <boost/foreach.hpp> 19 std::pair<std::string, std::string> item;
20 BOOST_FOREACH(item, map)
22 if (value == item.second)
31 TEST(SrArmFinder, no_hand_no_arm_finder_test)
58 TEST(SrArmFinder, one_hand_no_arm_finder_test)
85 TEST(SrArmFinder, no_hand_one_arm_finder_test)
102 std::string no_hand_one_arm_description;
103 ros::param::get(
"no_hand_one_arm_description", no_hand_one_arm_description);
118 ASSERT_GT(arm_finder.
get_joints().count(
"la"), 0);
121 TEST(SrArmFinder, one_hand_two_arms_finder_test)
138 std::string right_hand_two_arms;
160 ASSERT_EQ(arm_finder.
get_joints().count(
"ra"), 1);
161 ASSERT_EQ(arm_finder.
get_joints()[
"ra"].size(), 1);
166 ASSERT_EQ(arm_finder.
get_joints().count(
"la"), 1);
167 ASSERT_EQ(arm_finder.
get_joints()[
"la"].size(), 1);
170 TEST(SrArmFinder, two_hands_one_arm_finder_test)
187 std::string two_hands_left_arm;
209 ASSERT_EQ(arm_finder.
get_joints().count(
"la"), 1);
210 ASSERT_EQ(arm_finder.
get_joints()[
"la"].size(), 1);
213 int main(
int argc,
char **argv)
215 ros::init(argc, argv,
"test_arm_finder");
217 testing::InitGoogleTest(&argc, argv);
218 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()