From 83bda8bbe6b6f1fa4c01743f8d3445cccf13f0f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 18 Mar 2013 20:17:39 +0100 Subject: [PATCH] Math: fixed test for denormalize(). Amazing what single forgotten literal can do. --- src/Math/Functions.h | 1 - src/Math/Test/FunctionsTest.cpp | 8 ++------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Math/Functions.h b/src/Math/Functions.h index d324983a5..9d25668f6 100644 --- a/src/Math/Functions.h +++ b/src/Math/Functions.h @@ -289,7 +289,6 @@ integral type. range is undefined. @see normalize() -@todo Fix test for UnsignedLong */ #ifdef DOXYGEN_GENERATING_OUTPUT template inline Integral denormalize(const FloatingPoint& value); diff --git a/src/Math/Test/FunctionsTest.cpp b/src/Math/Test/FunctionsTest.cpp index ed32bb73e..6fd0b63d7 100644 --- a/src/Math/Test/FunctionsTest.cpp +++ b/src/Math/Test/FunctionsTest.cpp @@ -187,12 +187,8 @@ void FunctionsTest::denormalizeUnsigned() { CORRADE_COMPARE(Math::denormalize(0.0), 0); CORRADE_COMPARE(Math::denormalize(1.0), std::numeric_limits::max()); - CORRADE_COMPARE(Math::denormalize(0.0), 0); - { - CORRADE_EXPECT_FAIL("Wrong result with GCC and non-optimized code."); - CORRADE_VERIFY(false); - //CORRADE_COMPARE(Math::denormalize(1.0), std::numeric_limits::max()); - } + CORRADE_COMPARE(Math::denormalize(0.0l), 0); + CORRADE_COMPARE(Math::denormalize(1.0l), std::numeric_limits::max()); #endif CORRADE_COMPARE(Math::denormalize(0.33f), 21626);