From 37f826c85c4ce52ea7da7935794d16c4f369c123 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 26 Feb 2022 20:24:11 +0100 Subject: [PATCH] DebugTools: use Debug instead of Error for testing comparator output. Otherwise unrelated error messages such as file read failures would get included, making the tests fail. The Debug output on the other hand isn't used for any internal reporting. --- src/Magnum/DebugTools/Test/CompareImageTest.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Magnum/DebugTools/Test/CompareImageTest.cpp b/src/Magnum/DebugTools/Test/CompareImageTest.cpp index 98f887fc6..b0a40c828 100644 --- a/src/Magnum/DebugTools/Test/CompareImageTest.cpp +++ b/src/Magnum/DebugTools/Test/CompareImageTest.cpp @@ -591,8 +591,8 @@ void CompareImageTest::compareDifferentSize() { TestSuite::ComparisonStatusFlags flags = compare(a, b); /* No diagnostic as we don't have any expected filename */ CORRADE_COMPARE(flags, TestSuite::ComparisonStatusFlag::Failed); - Error e(&out); - compare.printMessage(flags, e, "a", "b"); + Debug d{&out}; + compare.printMessage(flags, d, "a", "b"); } CORRADE_COMPARE(out.str(), "Images a and b have different size, actual Vector(3, 4) but Vector(3, 5) expected.\n"); @@ -610,8 +610,8 @@ void CompareImageTest::compareDifferentFormat() { TestSuite::ComparisonStatusFlags flags = compare(a, b); /* No diagnostic as we don't have any expected filename */ CORRADE_COMPARE(flags, TestSuite::ComparisonStatusFlag::Failed); - Error e(&out); - compare.printMessage(flags, e, "a", "b"); + Debug d{&out}; + compare.printMessage(flags, d, "a", "b"); } CORRADE_COMPARE(out.str(), "Images a and b have different format, actual PixelFormat::RGBA32F but PixelFormat::RGB32F expected.\n");