Browse Source

Math: fixed test for denormalize<UnsignedLong, long double>().

Amazing what single forgotten literal can do.
pull/278/head
Vladimír Vondruš 13 years ago
parent
commit
83bda8bbe6
  1. 1
      src/Math/Functions.h
  2. 8
      src/Math/Test/FunctionsTest.cpp

1
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<class Integral, class FloatingPoint> inline Integral denormalize(const FloatingPoint& value);

8
src/Math/Test/FunctionsTest.cpp

@ -187,12 +187,8 @@ void FunctionsTest::denormalizeUnsigned() {
CORRADE_COMPARE(Math::denormalize<UnsignedInt>(0.0), 0);
CORRADE_COMPARE(Math::denormalize<UnsignedInt>(1.0), std::numeric_limits<UnsignedInt>::max());
CORRADE_COMPARE(Math::denormalize<UnsignedLong>(0.0), 0);
{
CORRADE_EXPECT_FAIL("Wrong result with GCC and non-optimized code.");
CORRADE_VERIFY(false);
//CORRADE_COMPARE(Math::denormalize<UnsignedLong>(1.0), std::numeric_limits<UnsignedLong>::max());
}
CORRADE_COMPARE(Math::denormalize<UnsignedLong>(0.0l), 0);
CORRADE_COMPARE(Math::denormalize<UnsignedLong>(1.0l), std::numeric_limits<UnsignedLong>::max());
#endif
CORRADE_COMPARE(Math::denormalize<UnsignedShort>(0.33f), 21626);

Loading…
Cancel
Save