3 #include <gtest/gtest.h> 9 void isEqualTest(
const std_msgs::String& exp,
const std_msgs::String& res)
11 EXPECT_EQ(exp.data, res.data);
14 void isEqualTest(
const std_msgs::Header& exp,
const std_msgs::Header& res)
16 EXPECT_EQ(exp.seq, res.seq);
17 EXPECT_EQ(exp.stamp, res.stamp);
18 EXPECT_EQ(exp.frame_id, res.frame_id);
21 void isEqualTest(
const geometry_msgs::Point& exp,
const geometry_msgs::Point& res)
23 EXPECT_DOUBLE_EQ(exp.x, res.x);
24 EXPECT_DOUBLE_EQ(exp.y, res.y);
25 EXPECT_DOUBLE_EQ(exp.z, res.z);
28 void isEqualTest(
const geometry_msgs::Quaternion& exp,
const geometry_msgs::Quaternion& res)
30 EXPECT_DOUBLE_EQ(exp.x, res.x);
31 EXPECT_DOUBLE_EQ(exp.y, res.y);
32 EXPECT_DOUBLE_EQ(exp.z, res.z);
33 EXPECT_DOUBLE_EQ(exp.w, res.w);
36 void isEqualTest(
const geometry_msgs::Pose& exp,
const geometry_msgs::Pose& res)
42 void isEqualTest(
const msgs::Foot& exp,
const msgs::Foot& res)
45 EXPECT_EQ(exp.foot_index, res.foot_index);
49 void isEqualTest(
const msgs::Feet& exp,
const msgs::Feet& res)
56 void isEqualTest(
const msgs::Step& exp,
const msgs::Step& res)
60 EXPECT_EQ(exp.step_index, res.step_index);
61 EXPECT_FLOAT_EQ(exp.cost, res.cost);
62 EXPECT_FLOAT_EQ(exp.risk, res.risk);
63 EXPECT_EQ(exp.valid, res.valid);
64 EXPECT_EQ(exp.colliding, res.colliding);
65 EXPECT_EQ(exp.locked, res.locked);
66 EXPECT_EQ(exp.modified, res.modified);
67 EXPECT_FLOAT_EQ(exp.sway_duration, res.sway_duration);
68 EXPECT_FLOAT_EQ(exp.step_duration, res.step_duration);
69 EXPECT_FLOAT_EQ(exp.swing_height, res.swing_height);
72 void isEqualTest(
const msgs::StepPlan& exp,
const msgs::StepPlan& res)
75 isEqualTest(exp.parameter_set_name, res.parameter_set_name);
79 ASSERT_EQ(exp.steps.size(), res.steps.size());
80 for (
size_t i = 0; i < exp.steps.size(); i++)
83 EXPECT_EQ(exp.mode, res.mode);
88 msgs::StepPlan exp_steps;
91 msgs::StepPlan res_steps;