1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 09:37:34 +00:00

Tests: Add regression tests for fixed OSS-Fuzz test cases

This commit is contained in:
Tim Ledbetter 2023-10-21 23:22:32 +01:00 committed by Andreas Kling
parent c62dded5cc
commit cb16c217b8
18 changed files with 119 additions and 0 deletions

View file

@ -258,3 +258,16 @@ TEST_CASE(to_lab)
EXPECT_APPROXIMATE_LAB(lab_from_sRGB(0, 255, 255), expected[6]);
EXPECT_APPROXIMATE_LAB(lab_from_sRGB(255, 255, 255), expected[7]);
}
TEST_CASE(malformed_profile)
{
Array test_inputs = {
TEST_INPUT("icc/oss-fuzz-testcase-60281.icc"sv)
};
for (auto test_input : test_inputs) {
auto file = MUST(Core::MappedFile::map(test_input));
auto profile_or_error = Gfx::ICC::Profile::try_load_from_externally_owned_memory(file->bytes());
EXPECT(profile_or_error.is_error());
}
}