Debian Codegraph @

t/100-base/801-tr18561b.t

raw
1 #!perl -w
2 # variant on the code that produces 18561
3 # the old _color() code could return floating colors in some cases
4 # but in most cases the caller couldn't handle it
5 use strict;
6 use Test::More tests => 1;
7 eval {
8 use Imager;
9 use Imager::Color::Float; # prevent the actual 18561 crash
10 my $i = Imager->new(
11 xsize => 50,
12 ysize => 50,
13 );
14 $i->line(x1 => 0, y1 => 0, x2 => 99, y2=>99, color => [ 0, 0, 0 ]);
15 };
16 ok(!$@, "shouldn't crash")
17 or print "# $@\n";