]> git.imager.perl.org - imager-graph.git/commitdiff
loosen up comparisons to handle the rounding change in Imager 0.90
authorTony Cook <tony@develop-help.com>
Fri, 4 May 2012 11:34:50 +0000 (21:34 +1000)
committerTony Cook <tony@develop-help.com>
Fri, 4 May 2012 11:34:50 +0000 (21:34 +1000)
Changes
t/t10pie.t
t/t14bar.t
t/t30many_points.t
t/t31tic_color.t
t/t32series_labels.t
t/t33_long_labels.t
t/t34horizontal_many_points.t
t/t40area.t
t/x50vstyle.t
t/x51hstyle.t

diff --git a/Changes b/Changes
index 0fac0885b9ae9ce51cd9e3c03c91cfee078c229e..4bf4d295da4db966aecb28c90f2356aaa4b4d1ad 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,11 @@
 Revision history for Perl extension Imager::Graph.
 
+Imager-Graph 0.10 - unreleased
+=================
+
+ - loosen up image comparisons - the rounding change in Imager 0.90
+   made small changes to many pixels in fountain fills
+
 Imager-Graph 0.09 - 05 Aug 2010
 =================
 
index d5a99cbe8a39e7f5d7ebe8ad60f0cc0076989776..15f710835a824881dfdd3a259a13dae6a08e6415 100644 (file)
@@ -259,7 +259,7 @@ cmpimg($img6, "testimg/t10_hlegend.png", 550_000);
   my $im = $pie->draw();
 
   ok($im, "made lin_found test using methods");
-  cmpimg($im, "testimg/t10_lin_fount.png", 180_00);
+  cmpimg($im, "testimg/t10_lin_fount.png", 180_000);
 }
 
 {
index 7216fb93ff5d6b2676cdc77d8e14f4fa37e91d71..ebf1443a84c331a534a8ff54927c8a0a42cd490b 100644 (file)
@@ -43,7 +43,7 @@ my @labels = qw(alpha beta gamma delta epsilon phi gi);
   ok($img1, "drawing bar chart");
 
   $img1->write(file=>'testout/t14_bar.ppm') or die "Can't save img1: ".$img1->errstr."\n";
-  cmpimg($img1, 'testimg/t14_bar.ppm', 1);
+  cmpimg($img1, 'testimg/t14_bar.ppm', 80_000);
 }
 
 { # alternative interfaces
@@ -58,7 +58,7 @@ my @labels = qw(alpha beta gamma delta epsilon phi gi);
   ok($img1, "drawing bar chart");
 
   $img1->write(file=>'testout/t14_bar2.ppm') or die "Can't save img1: ".$img1->errstr."\n";
-  cmpimg($img1, 'testimg/t14_bar.ppm', 1);
+  cmpimg($img1, 'testimg/t14_bar.ppm', 80_000);
 }
 
 unless (is(@warned, 0, "should be no warnings")) {
index 91f4d540b68144d7d82228916f9b7b3b32dd0be2..0ee74766ce8d4bba63eea230bd06080cc8cbcaef 100644 (file)
@@ -41,7 +41,7 @@ my $img1 = $line->draw();
 ok($img1, "drawing line chart");
 
 $img1->write(file=>'testout/t30_points.ppm') or die "Can't save img1: ".$img1->errstr."\n";
-cmpimg($img1, 'testimg/t30_points.ppm', 1);
+cmpimg($img1, 'testimg/t30_points.ppm', 40_000);
 
 unless (is(@warned, 0, "should be no warnings")) {
   diag($_) for @warned;
index 8ae6022a48630458d78f330e59ebe648266de507..09abf6c16a84b3d4affe4786bce003b6c8480e4e 100644 (file)
@@ -48,10 +48,10 @@ $img1->write(file=>'testout/t31tic_color.ppm') or die "Can't save img1: ".$img1-
 
 eval { require Chart::Math::Axis; };
 if ($@) {
-    cmpimg($img1, 'testimg/t31tic_color.ppm', 100);
+    cmpimg($img1, 'testimg/t31tic_color.ppm', 100_000);
 }
 else {
-    cmpimg($img1, 'testimg/t31tic_color_CMA.ppm', 100);
+    cmpimg($img1, 'testimg/t31tic_color_CMA.ppm', 100_000);
 }
 
 unless (is(@warned, 0, "should be no warnings")) {
index bb8ff61170f5d600b0cf383211e0019f1817a08f..e22e2a240a09adfa9da4ce437cb9c21bae22a103 100644 (file)
@@ -43,7 +43,7 @@ my $img1 = $line->draw();
 ok($img1, "drawing line chart");
 
 $img1->write(file=>'testout/t32_series.ppm') or die "Can't save img1: ".$img1->errstr."\n";
-cmpimg($img1, 'testimg/t32_series.ppm', 1);
+cmpimg($img1, 'testimg/t32_series.ppm', 80_000);
 
 unless (is(@warned, 0, "should be no warnings")) {
   diag($_) for @warned;
index 0c447171d710065c77cddf92ef7fd64b65817415..712bec5f962411b1019e435653175f230195be9c 100644 (file)
@@ -36,7 +36,7 @@ $graph->set_labels(['AWWWWWWWWWWWWWWA', 'AWWWWWWWWWWWWWWWWWWWWWWWWWWWWWA']);
 
 my $img = $graph->draw() || warn $graph->error;
 
-cmpimg($img, 'testimg/t33_long_labels.ppm', 200);
+cmpimg($img, 'testimg/t33_long_labels.ppm', 200_000);
 $img->write(file=>'testout/t33_long_labels.ppm') or die "Can't save img1: ".$img->errstr."\n";
 
 unless (is(@warned, 0, "should be no warnings")) {
index 26311e4adc026be0df27c46332f8e2445164dbe8..149aeec7271913ced5501452ffc5fc0d92cf6b45 100644 (file)
@@ -39,7 +39,7 @@ my $img1 = $bar->draw();
 ok($img1, "drawing bar chart");
 
 $img1->write(file=>'testout/t34_points.ppm') or die "Can't save img1: ".$img1->errstr."\n";
-cmpimg($img1, 'testimg/t34_points.ppm', 1);
+cmpimg($img1, 'testimg/t34_points.ppm', 80_000);
 
 unless (is(@warned, 0, "should be no warnings")) {
   diag($_) for @warned;
index c7af2630c30ae187222024814ee5d7f083a86ac3..0dcc0bf3d3eaa06323003c41e3ab966ebe0e50d0 100644 (file)
@@ -68,7 +68,7 @@ plan tests => 8;
   ok($img1->write(file => "testout/t40area1.ppm"),
      "save to testout");
 
-  cmpimg($img1, "testimg/t40area1.png");
+  cmpimg($img1, "testimg/t40area1.png", 100_000);
 }
 
 {
@@ -92,7 +92,7 @@ plan tests => 8;
   ok($img2->write(file => "testout/t40area2.ppm"),
      "save to file");
 
-  cmpimg($img2, "testimg/t40area2.png");
+  cmpimg($img2, "testimg/t40area2.png", 80_000);
 }
 
 END {
index e238697597e2d34d7b1b88d73f6b35987ef7e273..fb46a217be7ef62eb9e60e0f807d9e6e6ea27b32 100644 (file)
@@ -53,7 +53,7 @@ print "# Font type: ",ref $font,"\n";
     ok($img1->write(file => "testout/x50line_def.ppm"),
        "save to testout");
 
-    cmpimg($img1, "xtestimg/x50line_def.png");
+    cmpimg($img1, "xtestimg/x50line_def.png", 60_000);
   }
 
   { # no outline
@@ -73,7 +73,7 @@ print "# Font type: ",ref $font,"\n";
     ok($img2->write(file => "testout/x50line_noout.ppm"),
        "save to testout");
 
-    cmpimg($img2, "xtestimg/x50line_noout.png");
+    cmpimg($img2, "xtestimg/x50line_noout.png", 60_000);
 
     my $img3 = $vert->draw
       (
@@ -129,7 +129,7 @@ print "# Font type: ",ref $font,"\n";
     ok($img6, "make chart with dashed outline of graph area");
     ok($img6->write(file => "testout/x50line_dashout.ppm"),
        "save it");
-    cmpimg($img6, "xtestimg/x50line_dashout.png");
+    cmpimg($img6, "xtestimg/x50line_dashout.png", 80_000);
   }
 
   { # no outline, styled fill
@@ -148,7 +148,7 @@ print "# Font type: ",ref $font,"\n";
     ok($img7, "made the image");
     ok($img7->write(file => "testout/x50line_fill.ppm"),
        "save it");
-    cmpimg($img7, "xtestimg/x50line_fill.png");
+    cmpimg($img7, "xtestimg/x50line_fill.png", 80_000);
   }
 
   { # gridlines
@@ -164,7 +164,7 @@ print "# Font type: ",ref $font,"\n";
     ok($img8, "made the gridline image");
     ok($img8->write(file => "testout/x50line_grid.ppm"),
        "save it");
-    cmpimg($img8, "xtestimg/x50line_grid.png");
+    cmpimg($img8, "xtestimg/x50line_grid.png", 60_000);
 
     # default horizontal gridlines
     my $imgb = $vert->draw
@@ -178,7 +178,7 @@ print "# Font type: ",ref $font,"\n";
     ok($imgb, "made the gridline image");
     ok($imgb->write(file => "testout/x50line_griddef.ppm"),
        "save it");
-    cmpimg($imgb, "xtestimg/x50line_griddef.png");
+    cmpimg($imgb, "xtestimg/x50line_griddef.png", 60_000);
 
   }
 
@@ -204,7 +204,7 @@ print "# Font type: ",ref $font,"\n";
     ok($img9, "made the gridline image (set by methods)");
     ok($img9->write(file => "testout/x50line_gridm.ppm"),
        "save it");
-    cmpimg($img9, "xtestimg/x50line_grid.png");
+    cmpimg($img9, "xtestimg/x50line_grid.png", 60_000);
   }
 }
 
index d1f103f455f01d78666aadfa75836f22f06cea7b..cee81ce2d36d6232642ec3b65280acdedc8cb7e3 100644 (file)
@@ -53,7 +53,7 @@ print "# Font type: ",ref $font,"\n";
     ok($img1->write(file => "testout/x51col_def.ppm"),
        "save to testout");
 
-    cmpimg($img1, "xtestimg/x51col_def.png");
+    cmpimg($img1, "xtestimg/x51col_def.png", 80_000);
   }
 
   { # no outline
@@ -73,7 +73,7 @@ print "# Font type: ",ref $font,"\n";
     ok($img2->write(file => "testout/x51col_noout.ppm"),
        "save to testout");
 
-    cmpimg($img2, "xtestimg/x51col_noout.png");
+    cmpimg($img2, "xtestimg/x51col_noout.png", 80_000);
   }
 
   {
@@ -107,7 +107,7 @@ print "# Font type: ",ref $font,"\n";
     ok($img6, "make chart with dashed outline of graph area");
     ok($img6->write(file => "testout/x51col_dashout.ppm"),
        "save it");
-    cmpimg($img6, "xtestimg/x51col_dashout.png");
+    cmpimg($img6, "xtestimg/x51col_dashout.png", 80_000);
   }
 
   { # no outline, styled fill
@@ -126,7 +126,7 @@ print "# Font type: ",ref $font,"\n";
     ok($img7, "made the image");
     ok($img7->write(file => "testout/x51col_fill.ppm"),
        "save it");
-    cmpimg($img7, "xtestimg/x51col_fill.png");
+    cmpimg($img7, "xtestimg/x51col_fill.png", 120_000);
   }
 
   { # gridlines
@@ -142,7 +142,7 @@ print "# Font type: ",ref $font,"\n";
     ok($img8, "made the gridline image");
     ok($img8->write(file => "testout/x51col_grid.ppm"),
        "save it");
-    cmpimg($img8, "xtestimg/x51col_grid.png");
+    cmpimg($img8, "xtestimg/x51col_grid.png", 80_000);
   }
 
   { # gridlines (set by method)
@@ -167,7 +167,7 @@ print "# Font type: ",ref $font,"\n";
     ok($img9, "made the gridline image (set by methods)");
     ok($img9->write(file => "testout/x51col_gridm.ppm"),
        "save it");
-    cmpimg($img9, "xtestimg/x51col_grid.png");
+    cmpimg($img9, "xtestimg/x51col_grid.png", 80_000);
   }
 }