mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 17:44:56 +09:00
Tests/LibGfx: Add test for top-down BMP files
This commit is contained in:
parent
a9208a18ca
commit
d76ad23492
Notes:
sideshowbarker
2024-07-17 05:19:06 +09:00
Author: https://github.com/circl-lastname
Commit: d76ad23492
Pull-request: https://github.com/SerenityOS/serenity/pull/21490
3 changed files with 10 additions and 1 deletions
|
@ -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()));
|
||||
|
||||
|
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
BIN
Tests/LibGfx/test-inputs/bmp/top-down.bmp
Normal file
BIN
Tests/LibGfx/test-inputs/bmp/top-down.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 576 KiB |
Loading…
Add table
Add a link
Reference in a new issue