MCPcopy Create free account
hub / github.com/PickNikRobotics/rviz_visual_tools / testVector

Method testVector

tests/rvt_test.cpp:97–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95 }
96
97 bool testVector(const std::string& id, const std::vector<double>& expect,
98 const std::vector<double>& actual)
99 {
100 EXPECT_EQ(expect.size(), actual.size()) << id << " Unequal vector sizes";
101
102 static const double EPSILON = 0.000001;
103 for (std::size_t i = 0; i < expect.size(); ++i)
104 {
105 EXPECT_GT(EPSILON, fabs(expect[i] - actual[i]))
106 << "Section " << id << ", Element " << i << ", Expect: " << expect[i]
107 << ", Actual: " << actual[i];
108 }
109
110 return true;
111 }
112
113 // A shared node handle
114 // ros::NodeHandle nh_;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected