Skip to content

Commit

Permalink
tests: check for encoding success in 'encode.cc' (#1362)
Browse files Browse the repository at this point in the history
  • Loading branch information
farindk committed Nov 7, 2024
1 parent caec52f commit 994dbe5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion tests/encode.cc
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ static void test_ispe_size(heif_compression_format compression,
options->image_orientation = orientation;

heif_image_handle* handle;
heif_context_encode_image(ctx, img, enc, options, &handle);
heif_error err = heif_context_encode_image(ctx, img, enc, options, &handle);
UNSCOPED_INFO("heif_context_encode_image: " << err.message);
REQUIRE(err.code == heif_error_Ok);

int ispe_width = heif_image_handle_get_ispe_width(handle);
int ispe_height = heif_image_handle_get_ispe_height(handle);
Expand Down
2 changes: 1 addition & 1 deletion tests/extended_type.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ TEST_CASE("make extended type") {
heif_image_handle *output_image_handle;

err = heif_context_encode_image(ctx, input_image, encoder, nullptr, &output_image_handle);
INFO("error message: " << err.message);
UNSCOPED_INFO("heif_context_encode_image: " << err.message);
REQUIRE(err.code == heif_error_Ok);

heif_item_id itemId;
Expand Down

0 comments on commit 994dbe5

Please sign in to comment.