Subject: | GD-SVG-0.27 does not pass tests 17 and 28 |
Using Solaris 9 with Perl 5.8.5 gcc 64BITALL with GD-2.30.
Test 17 is "ok($image->filledArc(10, 20, 20, 40, 100, 360, $black),'filledArc (open) ok');".
This test expects a true value, but a filledArc with these parameters
tries to draw a pie shape by recursively calling itself twice as:
$self->filledArc(10, 20, 20, 40, 100, 280, $black); # first semicircle
$self->filledArc(10, 20, 20, 40, 280, 360, $black); # the rest
Each of these calls returns a value which is not used. The composite
does not return a value, resulting in undefined which is false. The
POD does not indicate that a return value is returned. Either the test
is wrong or the code should return a value and the POD should be updated.
I don't know what value should be returned in this case.
Test 28 is: "$polygon->offset(10, 10) > 0,'polygon offset ok');".
The polygon is offset by the requested amount, but the number of points
affected is not returned as the GD::SVG POD indicates. However $polygon
is a GD::SVG::Polygon, which inherits the offset method from from
GD::Polygon (part of GD). The offset method in GD::Polygon does not
return a value and the GD::Polygon POD does not indicate that it should.
It would be trivial to add "return $size;" to the end of the offset
method inside GD::Polygon, but that is not there at present.