Skip to content

Commit

Permalink
dump some more bitmaps on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
dk committed Sep 18, 2024
1 parent f0077ac commit 0f94ee1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions t/Object/Shaping.t
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,7 @@ sub test_drawing
$i = $w->image;
$i->type(im::Byte);
$sum1 = $i->sum;
my $data1 = $i;
skip("text drawing on bitmap is not available", 1) unless $sum1;

$z = $w-> text_shape('12', polyfont => 0);
Expand All @@ -637,6 +638,10 @@ sub test_drawing
$i->type(im::Byte);
$sum2 = $i->sum;
is($sum2, $sum1, "glyphs plotting");
if ( $sum2 != $sum1 ) {
dump_bitmap('1', $data1);
dump_bitmap('2', $i);
}

$w-> clear;
$w-> text_out( $z->glyphs, 5, 5 );
Expand All @@ -651,7 +656,6 @@ sub test_drawing
$i = $w->image;
$i->type(im::Byte);
$sum1 = $i->sum;
my $data1 = $i;

$z = $w-> text_shape('12', polyfont => 0, level => ts::Glyphs);
$w-> clear;
Expand All @@ -660,7 +664,7 @@ sub test_drawing
$i->type(im::Byte);
$sum2 = $i->sum;
is($sum2, $sum1, "glyphs plotting 45 degrees");
if ( $sum2 ne $sum1 ) {
if ( $sum2 != $sum1 ) {
dump_bitmap('1', $data1);
dump_bitmap('2', $i);
}
Expand Down

0 comments on commit 0f94ee1

Please sign in to comment.