From bbec741383a730d612f9cd5691a7b88ec471c324 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sat, 4 Apr 2015 12:07:22 +0200 Subject: [PATCH] Eigen: Simplify tests --- src/systemcmds/tests/test_eigen.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/systemcmds/tests/test_eigen.cpp b/src/systemcmds/tests/test_eigen.cpp index fb05777875..068e07c388 100644 --- a/src/systemcmds/tests/test_eigen.cpp +++ b/src/systemcmds/tests/test_eigen.cpp @@ -63,14 +63,14 @@ static constexpr size_t OPERATOR_ITERATIONS = 60000; for (size_t j = 0; j < OPERATOR_ITERATIONS; j++) { \ _op; \ } \ - printf(_title ": %.6fus", static_cast(hrt_absolute_time() - t0) / OPERATOR_ITERATIONS); \ + printf(_title ": %.6fus\n", static_cast(hrt_absolute_time() - t0) / OPERATOR_ITERATIONS); \ } #define VERIFY_OP(_title, _op, __OP_TEST__) \ { \ _op; \ if(!(__OP_TEST__)) { \ - printf(_title " Failed! ("#__OP_TEST__")"); \ + printf(_title " Failed! ("#__OP_TEST__")\n"); \ } \ } @@ -174,6 +174,7 @@ int test_eigen(int argc, char *argv[]) Eigen::Vector4f v(0.0f, 0.0f, 0.0f, 0.0f); Eigen::Vector4f v1(1.0f, 2.0f, 0.0f, -1.0f); Eigen::Vector4f v2(1.0f, -1.0f, 2.0f, 0.0f); + Eigen::Vector4f vres; float data[4] = {1.0f, 2.0f, 3.0f, 4.0f}; TEST_OP("Constructor Vector<4>()", Eigen::Vector4f v3); TEST_OP("Constructor Vector<4>(Vector<4>)", Eigen::Vector4f v3(v1)); @@ -182,8 +183,8 @@ int test_eigen(int argc, char *argv[]) TEST_OP("Vector<4> = Vector<4>", v = v1); TEST_OP("Vector<4> + Vector<4>", v + v1); TEST_OP("Vector<4> - Vector<4>", v - v1); - TEST_OP("Vector<4> += Vector<4>", v += v1); - TEST_OP("Vector<4> -= Vector<4>", v -= v1); + //TEST_OP("Vector<4> += Vector<4>", v += v1); + //TEST_OP("Vector<4> -= Vector<4>", v -= v1); TEST_OP("Vector<4> dot Vector<4>", v.dot(v1)); }