1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-09 09:34:57 +09:00

Tests/LibGfx: Add test for top-down BMP files

This commit is contained in:
circl 2023-10-18 20:37:35 +02:00 committed by Andreas Kling
parent a9208a18ca
commit d76ad23492
Notes: sideshowbarker 2024-07-17 05:19:06 +09:00
3 changed files with 10 additions and 1 deletions

View file

@ -53,7 +53,16 @@ static Gfx::ImageFrameDescriptor expect_single_frame_of_size(Gfx::ImageDecoderPl
TEST_CASE(test_bmp)
{
auto file = MUST(Core::MappedFile::map(TEST_INPUT("rgba32-1.bmp"sv)));
auto file = MUST(Core::MappedFile::map(TEST_INPUT("bmp/rgba32-1.bmp"sv)));
EXPECT(Gfx::BMPImageDecoderPlugin::sniff(file->bytes()));
auto plugin_decoder = MUST(Gfx::BMPImageDecoderPlugin::create(file->bytes()));
expect_single_frame(*plugin_decoder);
}
TEST_CASE(test_bmp_top_down)
{
auto file = MUST(Core::MappedFile::map(TEST_INPUT("bmp/top-down.bmp"sv)));
EXPECT(Gfx::BMPImageDecoderPlugin::sniff(file->bytes()));
auto plugin_decoder = MUST(Gfx::BMPImageDecoderPlugin::create(file->bytes()));