]> git.imager.perl.org - imager.git/blob - t/testtools.pl
90150776a5c69c91619f4965ed1337a8d8bc81d3
[imager.git] / t / testtools.pl
1 # this doesn't need a new namespace - I hope
2 use Imager qw(:all);
3
4 sub test_img {
5   my $green=i_color_new(0,255,0,255);
6   my $blue=i_color_new(0,0,255,255);
7   my $red=i_color_new(255,0,0,255);
8   
9   my $img=Imager::ImgRaw::new(150,150,3);
10   
11   i_box_filled($img,70,25,130,125,$green);
12   i_box_filled($img,20,25,80,125,$blue);
13   i_arc($img,75,75,30,0,361,$red);
14   i_conv($img,[0.1, 0.2, 0.4, 0.2, 0.1]);
15
16   $img;
17 }
18
19 sub skip {
20   my ($testnum, $count, $why) = @_;
21   
22   $why = '' unless defined $why;
23
24   print "ok $testnum # skip $why\n" for $testnum ... $testnum+$count-1;
25 }
26
27 1;
28