mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:27:35 +00:00
Tests/LibGfx: Test we can decode everything in TinyVG
This tests that we can successfully parse the "everything" TVG files, which make use of every feature in TinyVG. Test files taken from https://github.com/TinyVG/examples (MIT).
This commit is contained in:
parent
cf05da131f
commit
d2766bd5fe
3 changed files with 17 additions and 0 deletions
|
@ -590,3 +590,20 @@ TEST_CASE(test_tvg)
|
|||
|
||||
expect_single_frame_of_size(*plugin_decoder, { 1024, 1024 });
|
||||
}
|
||||
|
||||
TEST_CASE(test_everything_tvg)
|
||||
{
|
||||
Array file_names {
|
||||
TEST_INPUT("tvg/everything.tvg"sv),
|
||||
TEST_INPUT("tvg/everything-32.tvg"sv)
|
||||
};
|
||||
|
||||
for (auto file_name : file_names) {
|
||||
auto file = MUST(Core::MappedFile::map(file_name));
|
||||
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, { 400, 768 });
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue