20 #include <gtest/gtest.h> 27 const robot_state::RobotState& actual,
30 if(expected.getVariableCount() != actual.getVariableCount())
32 return ::testing::AssertionFailure() <<
"Both states have different number of Variables";
35 for(
size_t i = 0; i < actual.getVariableCount(); ++i)
40 if (std::fabs(expected.getVariablePosition(i) - actual.getVariablePosition(i)) > epsilon)
42 std::stringstream msg;
43 msg << expected.getVariableNames().at(i) <<
" position - expected: " 44 << expected.getVariablePosition(i) <<
" actual: " << actual.getVariablePosition(i);
46 return ::testing::AssertionFailure() << msg.str();
50 return ::testing::AssertionSuccess();
55 #endif // CENTERAUXILIARY_H
::testing::AssertionResult isAtExpectedPosition(const robot_state::RobotState &expected, const robot_state::RobotState &actual, const double epsilon)