From 2afa499c662aaaf9c1108f2c1790fe91ca3b03e3 Mon Sep 17 00:00:00 2001 From: TSC21 Date: Sun, 16 Aug 2015 18:29:37 +0100 Subject: [PATCH] test_eigen: correct some issues regarding type casts on POSIX build --- src/systemcmds/tests/test_eigen.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/systemcmds/tests/test_eigen.cpp b/src/systemcmds/tests/test_eigen.cpp index 046eb28cd7..0f71260e5d 100644 --- a/src/systemcmds/tests/test_eigen.cpp +++ b/src/systemcmds/tests/test_eigen.cpp @@ -407,7 +407,7 @@ int test_eigen(int argc, char *argv[]) { for (size_t i = 0; i < 4; i++) { if (!EXPECT_QUATERNION(q_true, q, FLT_EPSILON)) { - printf("%llu: It[%d]: Value of: Quaternion [0.6830, 0.1830, -0.6830, 0.1830]\n", (unsigned long long)hrt_absolute_time(), i); + printf("%llu: It[%d]: Value of: Quaternion [0.6830, 0.1830, -0.6830, 0.1830]\n", (unsigned long long)hrt_absolute_time(), (int)i); printf("Actual: \t[%8.5f, %8.5f, %8.5f, %8.5f]\n", q.w(), q.x(), q.y(), q.z()); printf("Expected: \t[%8.5f, %8.5f, %8.5f, %8.5f]\n", q_true.w(), q_true.x(), q_true.y(), q_true.z()); ++err_num; @@ -430,7 +430,7 @@ int test_eigen(int argc, char *argv[]) { for (size_t i = 0; i < 3; i++) { for (size_t j = 0; j < 3; j++) { if (!EXPECT_NEAR(R_orig(i, j), R(i, j), epsilon_f)) { - printf("(%d, %d) Value of: Quaternion constructor or 'toRotationMatrix'\n", (unsigned long long)hrt_absolute_time(), i, j); + printf("%llu: (%d, %d) Value of: Quaternion constructor or 'toRotationMatrix'\n", (unsigned long long)hrt_absolute_time(), (int)i, (int)j); printf("Actual: \t%8.5f\n", R(i, j)); printf("Expected: \t%8.5f\n", R_orig(i, j)); ++err_num; @@ -461,7 +461,7 @@ int test_eigen(int argc, char *argv[]) { for (size_t i = 0; i < 3; i++) { if (!EXPECT_NEAR(vector_true(i), vector_q(i), FLT_EPSILON)) { - printf("%llu: Value of: Quaternion method 'rotate'\n", (unsigned long long)hrt_absolute_time()); + printf("%llu: It[%d]: Value of: Quaternion method 'rotate'\n", (unsigned long long)hrt_absolute_time(), (int)i); printf("Actual: \t[%8.5f, %8.5f, %8.5f]\n", vector_q(0), vector_q(1), vector_q(2)); printf("Expected: \t[%8.5f, %8.5f, %8.5f]\n", vector_true(0), vector_true(1), vector_true(2)); ++err_num; @@ -476,7 +476,7 @@ int test_eigen(int argc, char *argv[]) { for (size_t i = 0; i < 3; i++) { if (!EXPECT_NEAR(vector_true(i), vector_q(i), epsilon_f)) { - printf("%llu: Value of: Quaternion method 'rotate'\n", (unsigned long long)hrt_absolute_time()); + printf("%llu: It[%d]: Value of: Quaternion method 'rotate'\n", (unsigned long long)hrt_absolute_time(), (int)i); printf("Actual: \t[%8.5f, %8.5f, %8.5f]\n", (double)vector_q(0), (double)vector_q(1), (double)vector_q(2)); printf("Expected: \t[%8.5f, %8.5f, %8.5f]\n", (double)vector_true(0), (double)vector_true(1), (double)vector_true(2)); ++err_num; @@ -491,7 +491,7 @@ int test_eigen(int argc, char *argv[]) { for (size_t i = 0; i < 3; i++) { if (!EXPECT_NEAR(vector_true(i), vector_q(i), epsilon_f)) { - printf("%llu: Value of: Quaternion method 'rotate'\n", (unsigned long long)hrt_absolute_time()); + printf("%llu: It[%d]: Value of: Quaternion method 'rotate'\n", (unsigned long long)hrt_absolute_time(), (int)i); printf("Actual: \t[%8.5f, %8.5f, %8.5f]\n", (double)vector_q(0), (double)vector_q(1), (double)vector_q(2)); printf("Expected: \t[%8.5f, %8.5f, %8.5f]\n", (double)vector_true(0), (double)vector_true(1), (double)vector_true(2)); ++err_num; @@ -506,7 +506,7 @@ int test_eigen(int argc, char *argv[]) { for (size_t i = 0; i < 3; i++) { if (!EXPECT_NEAR(vector_true(i), vector_q(i), epsilon_f)) { - printf("%llu: It[%d]: Value of: Quaternion method 'rotate'\n", (unsigned long long)hrt_absolute_time()); + printf("%llu: It[%d]: Value of: Quaternion method 'rotate'\n", (unsigned long long)hrt_absolute_time(), (int)i); printf("Actual: \t[%8.5f, %8.5f, %8.5f]\n", (double)vector_q(0), (double)vector_q(1), (double)vector_q(2)); printf("Expected: \t[%8.5f, %8.5f, %8.5f]\n", (double)vector_true(0), (double)vector_true(1), (double)vector_true(2)); ++err_num;