Browse Source

Math: expect minor sRGB monotonicity test failure on Emscripten -O3 build.

The debug output isn't even able to print the difference as it is
differing *very* little.
pull/190/head
Vladimír Vondruš 9 years ago
parent
commit
9de8fb9a67
  1. 10
      src/Magnum/Math/Test/ColorTest.cpp

10
src/Magnum/Math/Test/ColorTest.cpp

@ -634,7 +634,15 @@ void ColorTest::srgbMonotonic() {
Color3 rgb = Color3::fromSrgb(Math::Vector3<UnsignedShort>(testCaseRepeatId() + 1));
CORRADE_COMPARE_AS(rgb, rgbPrevious, Corrade::TestSuite::Compare::Greater);
CORRADE_COMPARE_AS(rgb, Color3(0.0f), Corrade::TestSuite::Compare::GreaterOrEqual);
CORRADE_COMPARE_AS(rgb, Color3(1.0f), Corrade::TestSuite::Compare::LessOrEqual);
{
#ifdef CORRADE_TARGET_EMSCRIPTEN
CORRADE_EXPECT_FAIL_IF(testCaseRepeatId() == 65534 && !!(rgb > Color3(1.0f)),
"Some minor rounding error possibly due to some Esmcripten "
"optimizations. Happens only on larger optimization levels, not "
"on -O1.");
#endif
CORRADE_COMPARE_AS(rgb, Color3(1.0f), Corrade::TestSuite::Compare::LessOrEqual);
}
}
void ColorTest::srgbLiterals() {

Loading…
Cancel
Save