]> git.imager.perl.org - imager.git/commitdiff
test an uncovered part of the internal hlines object api
authorTony Cook <tony@develop-help.com>
Sat, 25 May 2013 04:57:28 +0000 (14:57 +1000)
committerTony Cook <tony@develop-help.com>
Sat, 25 May 2013 04:57:28 +0000 (14:57 +1000)
t/900-util/060-hlines.t

index 594f010f1d0c019f4e55054a03d31be010e13af8..5a8bf4a32697ec0f103a012089d19c406f277031 100644 (file)
@@ -11,7 +11,7 @@ unless (Imager::Internal::Hlines::testing()) {
   plan skip_all => 'Imager not built to run this test';
 }
 
-plan tests => 15;
+plan tests => 17;
 
 my $hline = Imager::Internal::Hlines::new(0, 100, 0, 100);
 my $base_text = 'start_y: 0 limit_y: 100 start_x: 0 limit_x: 100';
@@ -101,3 +101,11 @@ $base_text
 EOS
 
 undef $hline;
+
+{ # test the image constructor
+  my $im = Imager->new(xsize => 50, ysize => 60);
+  my $hl = Imager::Internal::Hlines::new_img($im->{IMG});
+  ok($hl, "make hlines object from image");
+  is($hl->dump, "start_y: 0 limit_y: 60 start_x: 0 limit_x: 50\n",
+     "check initialized properly");
+}