mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:07:47 +00:00
Tests: Add simple .tvg decoding test
yak.tvg is the Twemoji bison we all know and love.
This commit is contained in:
parent
dfcd7b3ca5
commit
c04e0494df
2 changed files with 11 additions and 0 deletions
|
@ -17,6 +17,7 @@
|
|||
#include <LibGfx/ImageFormats/PNGLoader.h>
|
||||
#include <LibGfx/ImageFormats/PPMLoader.h>
|
||||
#include <LibGfx/ImageFormats/TGALoader.h>
|
||||
#include <LibGfx/ImageFormats/TinyVGLoader.h>
|
||||
#include <LibGfx/ImageFormats/WebPLoader.h>
|
||||
#include <LibTest/TestCase.h>
|
||||
#include <stdio.h>
|
||||
|
@ -559,3 +560,13 @@ TEST_CASE(test_webp_extended_lossless_animated)
|
|||
EXPECT_EQ(frame.image->get_pixel(500, 0), (frame_index == 2 || frame_index == 6) ? Gfx::Color::Black : Gfx::Color(255, 255, 255, 0));
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE(test_tvg)
|
||||
{
|
||||
auto file = MUST(Core::MappedFile::map(TEST_INPUT("tvg/yak.tvg"sv)));
|
||||
EXPECT(Gfx::TinyVGImageDecoderPlugin::sniff(file->bytes()));
|
||||
auto plugin_decoder = MUST(Gfx::TinyVGImageDecoderPlugin::create(file->bytes()));
|
||||
MUST(plugin_decoder->initialize());
|
||||
|
||||
expect_single_frame_of_size(*plugin_decoder, { 1024, 1024 });
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue