From 2b9478f4302c22f642301f7488e66e0e8fb1f9a4 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Wed, 1 Feb 2017 22:42:36 -0800 Subject: [PATCH] AP_Math: tests: make both arguments double libraries/AP_Math/tests/test_math.cpp.3.o: In function `MathTest_IsEqual_Test::TestBody()': test_math.cpp:(.text._ZN21MathTest_IsEqual_Test8TestBodyEv+0x1a0): undefined reference to `std::enable_if::type>::value, bool>::type is_equal(float, double)' collect2: error: ld returned 1 exit status --- libraries/AP_Math/tests/test_math.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_Math/tests/test_math.cpp b/libraries/AP_Math/tests/test_math.cpp index 8912f5fcd1..32be7c2de0 100644 --- a/libraries/AP_Math/tests/test_math.cpp +++ b/libraries/AP_Math/tests/test_math.cpp @@ -84,7 +84,7 @@ TEST(MathTest, IsEqual) EXPECT_TRUE(is_equal(1.f, (float)(1.f - DBL_EPSILON))); // false because the common type is double - EXPECT_FALSE(is_equal(1., 1. + 2 * std::numeric_limits::epsilon())); + EXPECT_FALSE(is_equal(double(1.), 1 + 2 * std::numeric_limits::epsilon())); // true because the common type is float EXPECT_TRUE(is_equal(1.f, (float)(1. + std::numeric_limits::epsilon())));