From 27dad83dbc330bc38b405224ad229690ba745806 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 20 Jul 2012 16:54:35 +0200 Subject: [PATCH] Don't pretend we are working with floats when they are doubles. --- src/Math/Test/MathTypeTraitsTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Math/Test/MathTypeTraitsTest.cpp b/src/Math/Test/MathTypeTraitsTest.cpp index 126a36186..d2d787f9c 100644 --- a/src/Math/Test/MathTypeTraitsTest.cpp +++ b/src/Math/Test/MathTypeTraitsTest.cpp @@ -46,8 +46,8 @@ template void MathTypeTraitsTest::_equalsIntegral() { } template void MathTypeTraitsTest::_equalsFloatingPoint() { - QVERIFY(MathTypeTraits::equals(1.0f+MathTypeTraits::epsilon()/2, 1.0f)); - QVERIFY(!MathTypeTraits::equals(1.0f+MathTypeTraits::epsilon()*2, 1.0f)); + QVERIFY(MathTypeTraits::equals(T(1)+MathTypeTraits::epsilon()/T(2), T(1))); + QVERIFY(!MathTypeTraits::equals(T(1)+MathTypeTraits::epsilon()*T(2), T(1))); QEXPECT_FAIL(0, "Comparing to infinity is broken", Continue); QVERIFY(MathTypeTraits::equals(std::numeric_limits::infinity(),