]> git.imager.perl.org - imager.git/blobdiff - lib/Imager/Test.pm
fix an embarassing typo
[imager.git] / lib / Imager / Test.pm
index 586a937a7848cba786cd0e4916b491da1f0fe07f..836b4093470b35f0b9bebf39125573705e0f9d76 100644 (file)
@@ -7,7 +7,7 @@ use vars qw(@ISA @EXPORT_OK $VERSION);
 use Carp qw(croak carp);
 use Config;
 
-$VERSION = "1.001";
+$VERSION = "1.004";
 
 @ISA = qw(Exporter);
 @EXPORT_OK = 
@@ -572,14 +572,22 @@ sub image_bounds_checks {
   my $black = Imager::Color->new(0, 0, 0);
   require Imager::Color::Float;
   my $blackf = Imager::Color::Float->new(0, 0, 0);
-  $builder->ok(!$im->setpixel(x => -1, y => 0, color => $black), 'bounds check set (-1, 0)');
-  $builder->ok(!$im->setpixel(x => 10, y => 0, color => $black), 'bounds check set (10, 0)');
-  $builder->ok(!$im->setpixel(x => 0, y => -1, color => $black), 'bounds check set (0, -1)');
-  $builder->ok(!$im->setpixel(x => 0, y => 10, color => $black), 'bounds check set (0, 10)');
-  $builder->ok(!$im->setpixel(x => -1, y => 0, color => $blackf), 'bounds check set (-1, 0) float');
-  $builder->ok(!$im->setpixel(x => 10, y => 0, color => $blackf), 'bounds check set (10, 0) float');
-  $builder->ok(!$im->setpixel(x => 0, y => -1, color => $blackf), 'bounds check set (0, -1) float');
-  $builder->ok(!$im->setpixel(x => 0, y => 10, color => $blackf), 'bounds check set (0, 10) float');
+  $builder->ok($im->setpixel(x => -1, y => 0, color => $black) == 0,
+              'bounds check set (-1, 0)');
+  $builder->ok($im->setpixel(x => 10, y => 0, color => $black) == 0,
+              'bounds check set (10, 0)');
+  $builder->ok($im->setpixel(x => 0, y => -1, color => $black) == 0,
+              'bounds check set (0, -1)');
+  $builder->ok($im->setpixel(x => 0, y => 10, color => $black) == 0,
+              'bounds check set (0, 10)');
+  $builder->ok($im->setpixel(x => -1, y => 0, color => $blackf) == 0,
+              'bounds check set (-1, 0) float');
+  $builder->ok($im->setpixel(x => 10, y => 0, color => $blackf) == 0,
+              'bounds check set (10, 0) float');
+  $builder->ok($im->setpixel(x => 0, y => -1, color => $blackf) == 0,
+              'bounds check set (0, -1) float');
+  $builder->ok($im->setpixel(x => 0, y => 10, color => $blackf) == 0,
+              'bounds check set (0, 10) float');
 }
 
 sub test_colorf_gpix {
@@ -753,8 +761,10 @@ sub std_font_tests {
  SKIP:
   { # check magic is handled correctly
     # https://rt.cpan.org/Ticket/Display.html?id=83438
-    skip("no native UTF8 support in this version of perl", 10
+    skip("no native UTF8 support in this version of perl", 11
       unless $] >= 5.006;
+    skip("overloading handling of magic is broken in this version of perl", 11)
+      unless $] >= 5.008;
     Imager->log("utf8 magic tests\n");
     my $over = bless {}, "Imager::Test::OverUtf8";
     my $text = "A".chr(0x2010)."A";
@@ -966,7 +976,7 @@ four.
 =item is_image_similar($im1, $im2, $maxdiff, $comment)
 
 Tests if the 2 images have similar content.  Both images must be
-defined, have the same width, height and channels.  The cum of the
+defined, have the same width, height and channels.  The sum of the
 squares of the differences of each sample are calculated and must be
 less than or equal to I<$maxdiff> for the test to pass.  The color
 comparison is done at 8-bits per pixel.  The color representation such