Testable assertion for std::vector<Vector3> ?
Issue #218
new
If I write
std::vector<Vector3> expected;
std::vector<Vector3> actual;
EXPECT(assert_equal(expected, actual)); // error: ‘const class Eigen::Matrix<double, 3, 1>’ has no member named ‘equals’, 'print'
It does not work.
Instead,
int n = 100;
std::vector<Vector> expected(n, Vector3());
std::vector<Vector> actual(n, Vector3());
EXPECT(assert_equal(expected, actual));
This does. What's the correct way to fix this?
Comments (1)
-
reporter - Log in to comment
Actually the issue lies in testing an object of Vector2, Vector3, etc; and does not have anything to do with std::vector itself. i.e.
Adding 10 different assert_equals in Vector.h for each Vector2, Vector3, ... etc seems like a hack. Is there an elegant way to do this?