From 7b4630932b5c0ae1ebd28cd62548375cc18d83b7 Mon Sep 17 00:00:00 2001 From: Lucas CHOLLET Date: Thu, 6 Jul 2023 23:55:49 -0400 Subject: [PATCH] Tests/LibGfx: Call `ImageDecoder::size()` before `frame()` Reordering these calls allow us to ensure that all encoders are able to return the size of the image before they are requested to decode the whole bitmap. --- Tests/LibGfx/TestImageDecoder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/LibGfx/TestImageDecoder.cpp b/Tests/LibGfx/TestImageDecoder.cpp index aef92fed24..6fad158f03 100644 --- a/Tests/LibGfx/TestImageDecoder.cpp +++ b/Tests/LibGfx/TestImageDecoder.cpp @@ -42,8 +42,8 @@ static Gfx::ImageFrameDescriptor expect_single_frame(Gfx::ImageDecoderPlugin& pl static Gfx::ImageFrameDescriptor expect_single_frame_of_size(Gfx::ImageDecoderPlugin& plugin_decoder, Gfx::IntSize size) { - auto frame = expect_single_frame(plugin_decoder); EXPECT_EQ(plugin_decoder.size(), size); + auto frame = expect_single_frame(plugin_decoder); EXPECT_EQ(frame.image->size(), size); return frame; }