diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2015-04-04 12:07:22 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2015-04-04 12:07:22 +0200 |
commit | bbec741383a730d612f9cd5691a7b88ec471c324 (patch) | |
tree | 5ba717be67c1cf3ea2f91bdb0e45bb0d07a82bf7 /src/systemcmds/tests/test_eigen.cpp | |
parent | 81a0ac5d71cc6752d3bf7fca905d4a3366650036 (diff) | |
download | px4-firmware-bbec741383a730d612f9cd5691a7b88ec471c324.tar.gz px4-firmware-bbec741383a730d612f9cd5691a7b88ec471c324.tar.bz2 px4-firmware-bbec741383a730d612f9cd5691a7b88ec471c324.zip |
Eigen: Simplify tests
Diffstat (limited to 'src/systemcmds/tests/test_eigen.cpp')
-rw-r--r-- | src/systemcmds/tests/test_eigen.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/systemcmds/tests/test_eigen.cpp b/src/systemcmds/tests/test_eigen.cpp index fb0577787..068e07c38 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<double>(hrt_absolute_time() - t0) / OPERATOR_ITERATIONS); \ + printf(_title ": %.6fus\n", static_cast<double>(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)); } |