summaryrefslogtreecommitdiff
path: root/Tests/LibGfx
AgeCommit message (Collapse)Author
2022-02-01Everywhere: Fully qualify font names by including their slopethankyouverycool
Fixes typefaces of the same weight but different slopes being incorrectly returned for each other by FontDatabase.
2021-11-23LibCore+AK: Move MappedFile from AK to LibCoreAndreas Kling
MappedFile is strictly a userspace thing, so it doesn't belong in AK (which is supposed to be user/kernel agnostic.)
2021-11-21LibGfx: Make ImageDecoderPlugin::frame() return ErrorOr<>Andreas Kling
This is a first step towards better error propagation from image codecs.
2021-11-11Tests/LibGfx: Actually test image decoders in TestImageDecoderAndreas Kling
We were passing raw Gfx::Bitmap objects into the various image decoders instead of encoded image data. This made all of them fail, but the test expectations were set up in a way that aligned with this outcome. With this patch, we now test the codecs for real. Except ICO, since we don't have an ICO file handy. That's a FIXME.
2021-11-08LibGfx: Use ErrorOr<T> for Bitmap::try_create()Andreas Kling
Another one that was used in a fajillion places.
2021-09-19Tests: Conform font tests to new font formatthankyouverycool
2021-09-02Tests: Remove all file(GLOB) from CMakeLists in TestsAndrew Kaster
Using a file(GLOB) to find all the test files in a directory is an easy hack to get things started, but has some drawbacks. Namely, if you add a test, it won't be found again without re-running CMake. `ninja` seems to do this automatically, but it would be nice to one day stop seeing it rechecking our globbed directories.
2021-07-21LibGfx: Use "try_" prefix for static factory functionsAndreas Kling
Also mark them as [[nodiscard]].
2021-07-06Tests: Set a default font in BenchmarkGfxPainter to prevent crashesAndrew Kaster
After the changes to LibGfx to make default font management handled in WindowServer instead of each GUI application to allow for global font broadcasts, the two LibGfx tests broke. The non-benchmark was fixed in 8f96d2, but the benchmark was left in the dust because nobody really runs it manually :^(
2021-05-21Tests: Remove default font tests from LibGfx/TestFontHandlingAndreas Kling
The system default font functions now rely on communication with WindowServer and so we can't really test them here.
2021-05-20LibGfx: Remove Gfx::FontDatabase::default_bold_fixed_width_font()Andreas Kling
Ask for a bold_variant() of the default_fixed_width_font() instead.
2021-05-20LibGfx: Remove Gfx::FontDatabase::default_bold_font()Andreas Kling
Instead use default_font().bold_variant() in cases where we want a bold variant of the default font. :^)
2021-05-06Tests: Establish root Tests directory, move Userland/Tests thereBrian Gianforcaro
With the goal of centralizing all tests in the system, this is a first step to establish a Tests sub-tree. It will contain all of the unit tests and test harnesses for the various components in the system.