mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:07:45 +00:00
Tests: Propagate errors with TRY_OR_FAIL()
where possible
This commit is contained in:
parent
532f2b644c
commit
3ffa2a39bc
1 changed files with 3 additions and 3 deletions
|
@ -16,7 +16,7 @@ BENCHMARK_CASE(diagonal_lines)
|
||||||
int const run_count = 50;
|
int const run_count = 50;
|
||||||
int const bitmap_size = 2000;
|
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);
|
Gfx::Painter painter(bitmap);
|
||||||
|
|
||||||
for (int run = 0; run < run_count; run++) {
|
for (int run = 0; run < run_count; run++) {
|
||||||
|
@ -32,7 +32,7 @@ BENCHMARK_CASE(fill)
|
||||||
int const run_count = 1000;
|
int const run_count = 1000;
|
||||||
int const bitmap_size = 2000;
|
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);
|
Gfx::Painter painter(bitmap);
|
||||||
|
|
||||||
for (int run = 0; run < run_count; run++) {
|
for (int run = 0; run < run_count; run++) {
|
||||||
|
@ -45,7 +45,7 @@ BENCHMARK_CASE(fill_with_gradient)
|
||||||
int const run_count = 50;
|
int const run_count = 50;
|
||||||
int const bitmap_size = 2000;
|
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);
|
Gfx::Painter painter(bitmap);
|
||||||
|
|
||||||
for (int run = 0; run < run_count; run++) {
|
for (int run = 0; run < run_count; run++) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue