mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
Tests: Propagate errors with TRY_OR_FAIL()
where possible
This commit is contained in:
parent
532f2b644c
commit
3ffa2a39bc
Notes:
sideshowbarker
2024-07-17 06:00:02 +09:00
Author: https://github.com/tcl3 Commit: https://github.com/SerenityOS/serenity/commit/3ffa2a39bc Pull-request: https://github.com/SerenityOS/serenity/pull/23114 Reviewed-by: https://github.com/trflynn89
1 changed files with 3 additions and 3 deletions
|
@ -16,7 +16,7 @@ BENCHMARK_CASE(diagonal_lines)
|
|||
int const run_count = 50;
|
||||
int const bitmap_size = 2000;
|
||||
|
||||
auto bitmap = Gfx::Bitmap::create(Gfx::BitmapFormat::BGRx8888, { bitmap_size, bitmap_size }).release_value_but_fixme_should_propagate_errors();
|
||||
auto bitmap = TRY_OR_FAIL(Gfx::Bitmap::create(Gfx::BitmapFormat::BGRx8888, { bitmap_size, bitmap_size }));
|
||||
Gfx::Painter painter(bitmap);
|
||||
|
||||
for (int run = 0; run < run_count; run++) {
|
||||
|
@ -32,7 +32,7 @@ BENCHMARK_CASE(fill)
|
|||
int const run_count = 1000;
|
||||
int const bitmap_size = 2000;
|
||||
|
||||
auto bitmap = Gfx::Bitmap::create(Gfx::BitmapFormat::BGRx8888, { bitmap_size, bitmap_size }).release_value_but_fixme_should_propagate_errors();
|
||||
auto bitmap = TRY_OR_FAIL(Gfx::Bitmap::create(Gfx::BitmapFormat::BGRx8888, { bitmap_size, bitmap_size }));
|
||||
Gfx::Painter painter(bitmap);
|
||||
|
||||
for (int run = 0; run < run_count; run++) {
|
||||
|
@ -45,7 +45,7 @@ BENCHMARK_CASE(fill_with_gradient)
|
|||
int const run_count = 50;
|
||||
int const bitmap_size = 2000;
|
||||
|
||||
auto bitmap = Gfx::Bitmap::create(Gfx::BitmapFormat::BGRx8888, { bitmap_size, bitmap_size }).release_value_but_fixme_should_propagate_errors();
|
||||
auto bitmap = TRY_OR_FAIL(Gfx::Bitmap::create(Gfx::BitmapFormat::BGRx8888, { bitmap_size, bitmap_size }));
|
||||
Gfx::Painter painter(bitmap);
|
||||
|
||||
for (int run = 0; run < run_count; run++) {
|
||||
|
|
Loading…
Reference in a new issue