I've written Image::Square to make square images...
One of the tests I've carried out is to visually check that the new square image is taken from the correct part of the original image.
How can I convert that visual test into code?
Should I manually verify the image it is supposed to create, then take a hash of that image and compare the hash from the same process during testing? If I do it this way, I will need to use a hashing module and I'm reluctant to create a dependency that is only used in the tests. Perhaps I need to skip the test if the hashing module isn't installed.
If I do the comparison using a hash, will it work cross-platform or can I expect tests to fail on some OS's?
In reply to Testing image output by Bod
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |