From 612dfa447a521ea2dec5bdbf49843e245dd8de35 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 18 Dec 2022 03:30:44 +0100 Subject: [PATCH] Log image information earlier in the image unit test Use INFO() before some checks that may already fail to at least show in which test the failures occur. --- tests/image/image.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/image/image.cpp b/tests/image/image.cpp index ee6e06ae66..a6f58e7ed2 100644 --- a/tests/image/image.cpp +++ b/tests/image/image.cpp @@ -949,6 +949,10 @@ void CompareImage(const wxImageHandler& handler, const wxImage& image, return; } + unsigned bitsPerPixel = testPalette ? 8 : (testAlpha ? 32 : 24); + wxINFO_FMT("Compare test '%s (%d-bit)' for saving", + handler.GetExtension(), bitsPerPixel); + wxMemoryInputStream memIn(memOut); REQUIRE(memIn.IsOk()); @@ -956,10 +960,6 @@ void CompareImage(const wxImageHandler& handler, const wxImage& image, REQUIRE(actual.IsOk()); const wxImage *expected = compareTo ? compareTo : ℑ - - unsigned bitsPerPixel = testPalette ? 8 : (testAlpha ? 32 : 24); - wxINFO_FMT("Compare test '%s (%d-bit)' for saving", - handler.GetExtension(), bitsPerPixel); CHECK_THAT(actual, RGBSameAs(*expected)); #if wxUSE_PALETTE