|
|
|
|
@ -720,23 +720,8 @@ void CompareImageTest::compareSpecials() {
|
|
|
|
|
compare.printMessage(flags, d, "a", "b"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* Apple platforms, Android and MinGW32 don't print signed NaNs. This is
|
|
|
|
|
*not* a libc++ thing, tho -- libc++ on Linux prints signed NaNs. It used |
|
|
|
|
to be with Emscripten too, but since 1.38.44 works the same as Linux. */ |
|
|
|
|
#if defined(CORRADE_TARGET_APPLE) || defined(CORRADE_TARGET_ANDROID) || defined(CORRADE_TARGET_MINGW) |
|
|
|
|
CORRADE_COMPARE(out.str(), |
|
|
|
|
"Images a and b have both max and mean delta above threshold, actual 3.1/nan but at most 1.5/0.5 expected. Delta image:\n" |
|
|
|
|
" |MMMM M ,M|\n" |
|
|
|
|
" Pixels above max/mean threshold:\n" |
|
|
|
|
" [5,0] Vector(-inf), expected Vector(inf) (Δ = inf)\n" |
|
|
|
|
" [3,0] Vector(0.3), expected Vector(nan) (Δ = nan)\n" |
|
|
|
|
" [2,0] Vector(nan), expected Vector(0.3) (Δ = nan)\n" |
|
|
|
|
" [1,0] Vector(0.3), expected Vector(-inf) (Δ = inf)\n" |
|
|
|
|
" [0,0] Vector(inf), expected Vector(1) (Δ = inf)\n" |
|
|
|
|
" [8,0] Vector(3), expected Vector(-0.1) (Δ = 3.1)\n"); |
|
|
|
|
|
|
|
|
|
/* clang-cl prints -nan(ind) instead of ±nan, but differently than MSVC */ |
|
|
|
|
#elif defined(CORRADE_TARGET_CLANG_CL) |
|
|
|
|
#ifdef CORRADE_TARGET_CLANG_CL |
|
|
|
|
CORRADE_COMPARE(out.str(), |
|
|
|
|
"Images a and b have both max and mean delta above threshold, actual 3.1/-nan(ind) but at most 1.5/0.5 expected. Delta image:\n" |
|
|
|
|
" |MMMM M ,M|\n" |
|
|
|
|
@ -789,8 +774,11 @@ void CompareImageTest::compareSpecials() {
|
|
|
|
|
" [8,0] Vector(3), expected Vector(-0.1) (Δ = 3.1)\n"); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
/* Linux, Emscripten. Somehow, a Release build sometimes gives a positive
|
|
|
|
|
NaN, so test for both. */ |
|
|
|
|
/* Linux, Emscripten, Android. Somehow, a Release build sometimes gives a
|
|
|
|
|
positive NaN, so test for both; Android randomly differs between the |
|
|
|
|
two. Apple platforms and MinGW32 don't print signed NaNs, but it doesn't |
|
|
|
|
make sense to have yet another branch for those so they're handled here |
|
|
|
|
as well. */ |
|
|
|
|
#else |
|
|
|
|
constexpr const char* expectedPositive = |
|
|
|
|
"Images a and b have both max and mean delta above threshold, actual 3.1/nan but at most 1.5/0.5 expected. Delta image:\n" |
|
|
|
|
@ -829,23 +817,8 @@ void CompareImageTest::compareSpecialsMeanOnly() {
|
|
|
|
|
compare.printMessage(flags, d, "a", "b"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* Apple platforms, Android and MinGW32 don't print signed NaNs. This is
|
|
|
|
|
*not* a libc++ thing, tho -- libc++ on Linux prints signed NaNs. It used |
|
|
|
|
to be with Emscripten too, but since 1.38.44 works the same as Linux. */ |
|
|
|
|
#if defined(CORRADE_TARGET_APPLE) || defined(CORRADE_TARGET_ANDROID) || defined(__MINGW32__) |
|
|
|
|
CORRADE_COMPARE(out.str(), |
|
|
|
|
"Images a and b have mean delta above threshold, actual nan but at most 0.5 expected. Max delta 3.1 is within threshold 15. Delta image:\n" |
|
|
|
|
" |MMMM M ,M|\n" |
|
|
|
|
" Pixels above max/mean threshold:\n" |
|
|
|
|
" [5,0] Vector(-inf), expected Vector(inf) (Δ = inf)\n" |
|
|
|
|
" [3,0] Vector(0.3), expected Vector(nan) (Δ = nan)\n" |
|
|
|
|
" [2,0] Vector(nan), expected Vector(0.3) (Δ = nan)\n" |
|
|
|
|
" [1,0] Vector(0.3), expected Vector(-inf) (Δ = inf)\n" |
|
|
|
|
" [0,0] Vector(inf), expected Vector(1) (Δ = inf)\n" |
|
|
|
|
" [8,0] Vector(3), expected Vector(-0.1) (Δ = 3.1)\n"); |
|
|
|
|
|
|
|
|
|
/* clang-cl prints -nan(ind) instead of ±nan, but differently than MSVC */ |
|
|
|
|
#elif defined(CORRADE_TARGET_CLANG_CL) |
|
|
|
|
#ifdef CORRADE_TARGET_CLANG_CL |
|
|
|
|
CORRADE_COMPARE(out.str(), |
|
|
|
|
"Images a and b have mean delta above threshold, actual -nan(ind) but at most 0.5 expected. Max delta 3.1 is within threshold 15. Delta image:\n" |
|
|
|
|
" |MMMM M ,M|\n" |
|
|
|
|
@ -898,8 +871,11 @@ void CompareImageTest::compareSpecialsMeanOnly() {
|
|
|
|
|
" [8,0] Vector(3), expected Vector(-0.1) (Δ = 3.1)\n"); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
/* Linux, Emscripten. Somehow, a Release build sometimes gives a positive
|
|
|
|
|
NaN, so test for both. */ |
|
|
|
|
/* Linux, Emscripten, Android. Somehow, a Release build sometimes gives a
|
|
|
|
|
positive NaN, so test for both; Android randomly differs between the |
|
|
|
|
two. Apple platforms and MinGW32 don't print signed NaNs, but it doesn't |
|
|
|
|
make sense to have yet another branch for those so they're handled here |
|
|
|
|
as well. */ |
|
|
|
|
#else |
|
|
|
|
constexpr const char* expectedPositive = |
|
|
|
|
"Images a and b have mean delta above threshold, actual nan but at most 0.5 expected. Max delta 3.1 is within threshold 15. Delta image:\n" |
|
|
|
|
|