diff --git a/doc/snippets/debugtools-compareimage.ansi b/doc/snippets/debugtools-compareimage.ansi index 4fdb2e88f..f66d928c8 100644 --- a/doc/snippets/debugtools-compareimage.ansi +++ b/doc/snippets/debugtools-compareimage.ansi @@ -1,7 +1,7 @@ Starting ProcessingTest with 1 test cases...  FAIL [1] process() at …/debugtools-compareimage.cpp on line 77 Images actual and expected have max delta above threshold, actual 189 - but at most 170 expected. Mean delta 13.5776 is below threshold 96. + but at most 170 expected. Mean delta 13.5776 is within threshold 96. Delta image: | | | | diff --git a/src/Magnum/DebugTools/CompareImage.cpp b/src/Magnum/DebugTools/CompareImage.cpp index 1b8f23382..34f9b64c6 100644 --- a/src/Magnum/DebugTools/CompareImage.cpp +++ b/src/Magnum/DebugTools/CompareImage.cpp @@ -611,12 +611,12 @@ void ImageComparatorBase::printMessage(TestSuite::ComparisonStatusFlags, Debug& else if(_state->result == Result::AboveMaxThreshold) out << "max delta above threshold, actual" << _state->max << "but at most" << _state->maxThreshold - << "expected. Mean delta" << _state->mean << "is below threshold" + << "expected. Mean delta" << _state->mean << "is within threshold" << _state->meanThreshold << Debug::nospace << "."; else if(_state->result == Result::AboveMeanThreshold) out << "mean delta above threshold, actual" << _state->mean << "but at most" << _state->meanThreshold - << "expected. Max delta" << _state->max << "is below threshold" + << "expected. Max delta" << _state->max << "is within threshold" << _state->maxThreshold << Debug::nospace << "."; else CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */ diff --git a/src/Magnum/DebugTools/Test/CompareImageTest.cpp b/src/Magnum/DebugTools/Test/CompareImageTest.cpp index 4d6029b0f..998a61245 100644 --- a/src/Magnum/DebugTools/Test/CompareImageTest.cpp +++ b/src/Magnum/DebugTools/Test/CompareImageTest.cpp @@ -588,7 +588,7 @@ void CompareImageTest::compareAboveMaxThreshold() { } CORRADE_COMPARE(out.str(), - "Images a and b have max delta above threshold, actual 39 but at most 30 expected. Mean delta 18.5 is below threshold 20. Delta image:\n" + "Images a and b have max delta above threshold, actual 39 but at most 30 expected. Mean delta 18.5 is within threshold 20. Delta image:\n" " |?M|\n" " Pixels above max/mean threshold:\n" " [1,1] #abcd85, expected #abcdfa (Δ = 39)\n"); @@ -607,7 +607,7 @@ void CompareImageTest::compareAboveMeanThreshold() { } CORRADE_COMPARE(out.str(), - "Images a and b have mean delta above threshold, actual 18.5 but at most 18 expected. Max delta 39 is below threshold 50. Delta image:\n" + "Images a and b have mean delta above threshold, actual 18.5 but at most 18 expected. Max delta 39 is within threshold 50. Delta image:\n" " |?M|\n" " Pixels above max/mean threshold:\n" " [1,1] #abcd85, expected #abcdfa (Δ = 39)\n" @@ -684,7 +684,7 @@ void CompareImageTest::compareSpecialsMeanOnly() { NaNs. This is *not* a libc++ thing, tho -- libc++ on Linux prints signed NaNs. */ #if defined(CORRADE_TARGET_APPLE) || defined(CORRADE_TARGET_ANDROID) || defined(CORRADE_TARGET_EMSCRIPTEN) || 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 below threshold 15. Delta image:\n" + "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" @@ -697,7 +697,7 @@ void CompareImageTest::compareSpecialsMeanOnly() { /* MSVC prints -nan(ind) instead of ±nan. But only sometimes. */ #elif defined(CORRADE_TARGET_WINDOWS) && defined(_MSC_VER) 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 below threshold 15. Delta image:\n" + "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" " Pixels above max/mean threshold:\n" " [5,0] Vector(-inf), expected Vector(inf) (Δ = inf)\n" @@ -710,7 +710,7 @@ void CompareImageTest::compareSpecialsMeanOnly() { /* Linux */ #else 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 below threshold 15. Delta image:\n" + "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"