My tests have a if (!GD_BUNDLED) {}, which as I understand should cause the 
test to be skipped in the event non-bundled GD is being used. The bundled gd 
will always fail and that is NOT an assumption, the external gd has bugs that 
were fixed in bundled gd these are known so it is pointless to make the tests 
work with bundled gd, we'd just get pointless bug reports about something 
that we do not have control over. MD5 hashes may be unreliable because float 
calculations tend to give slightly different results depending on a platform 
due to rounding issues. I'll will try to test this on a SunOS box later on 
and see if that is indeed the case. Perhaps a filesize check would be 
appropriate, something that would compare the generated image size and see if 
it is within the reasonable bounds (+- 10 bytes) of the expected image.

Ilia

On December 5, 2002 06:05 am, Marcus Börger wrote:
> Hi Ilia,
>
> when testing conversion to gd2 you do not test for gd2 existance
> (imagegd2() function)
> instead you assume that the tests fail if one uses an external gd lib (what
> makes the
> function check needless of cause). But why is that so? And why not print
> out an error
> then? Maybe we direct the users to use the internal lib then and receive
> less bug reports.
>
> What i really didlike with your tests is that you simply verify that there
> is an output by
> checking that there is no error. I miss a check for the output here. For
> example yesturday
> i experimented with rle gifs and was glad when i got no more errors and
> warnings. But then
> when looking at the generated images i saw they contained bullshit.
> Therefore i suggest
> you generate an md5 hash from the output and verify that, too.
>
> Why is there 'jpegxxx' and jpgxxx'?
> What about png2jpg, png2xpm and jpeg2xpm?
>
> Last but not least it would have liked it more if the names were different:
> 'conv_'<format1>'2'<format2>'.phpt'.
> or
> 'gd_'<format1>'2'<format2>'.phpt'.
>
> regards
> marcus
>
> At 22:04 04.12.2002, Ilia Alshanetsky wrote:
> >iliaa           Wed Dec  4 16:04:07 2002 EDT
> >
> >   Added files:
> >     /php4/ext/gd/tests  conv_test.gif conv_test.jpeg conv_test.png
> >                         conv_test.xpm gif2gd.phpt gif2jpg.phpt
> >                         gif2png.phpt jpeg2png.phpt jpg2gd.phpt
> >                         png2gd.phpt xpm2gd.phpt xpm2jpg.phpt
> >                         xpm2png.phpt
> >   Log:
> >   Added GD image conversion tests.
> >
> >
> >--
> >PHP CVS Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to