From da525ccc433284013e81e09d8fe1b76183e3db4a Mon Sep 17 00:00:00 2001 From: Liav A Date: Fri, 20 Jan 2023 18:40:28 +0200 Subject: [PATCH] Tests/LibGfx: Fix test_not_ico test case We should expect the sniffing method and the initialize method to fail because this test case is testing that the ICO image decoder should not decode random data within it. --- Tests/LibGfx/TestImageDecoder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/LibGfx/TestImageDecoder.cpp b/Tests/LibGfx/TestImageDecoder.cpp index 16ccec27ba..47e66ebff5 100644 --- a/Tests/LibGfx/TestImageDecoder.cpp +++ b/Tests/LibGfx/TestImageDecoder.cpp @@ -58,11 +58,11 @@ TEST_CASE(test_gif) TEST_CASE(test_not_ico) { auto file = Core::MappedFile::map("/res/graphics/buggie.png"sv).release_value(); - EXPECT_EQ(MUST(Gfx::ICOImageDecoderPlugin::sniff({ (u8 const*)file->data(), file->size() })), true); + EXPECT_EQ(MUST(Gfx::ICOImageDecoderPlugin::sniff({ (u8 const*)file->data(), file->size() })), false); auto plugin_decoder_or_error = Gfx::ICOImageDecoderPlugin::create({ (u8 const*)file->data(), file->size() }); EXPECT(!plugin_decoder_or_error.is_error()); auto plugin_decoder = plugin_decoder_or_error.release_value(); - EXPECT_EQ(plugin_decoder->initialize(), true); + EXPECT_EQ(plugin_decoder->initialize(), false); EXPECT(plugin_decoder->frame_count()); EXPECT(!plugin_decoder->is_animated());