On 7/16/2015 4:39 AM, Rikki Cattermole wrote:
I do not believe this issue has been raised yet.
But for std.experimental.image (or at least to my intention) I will be needing a
test suite for e.g. PNG file format loader/exporter.
To my knowledge we currently only support unittests for Phobos. What I need
structure wise is similar to dmd's testsuite.
I do not know nor want to get into setting this up.
For example the PNG file format it should really be tested using separate
programs to compare against load/export/load for the files[0].
This is quite crucial to ensure the correctness of the loader/exporter. It will
help prevent and detect many bugs.
So, would anybody like to get a head start on it?
[0] http://www.schaik.com/pngsuite/
I haven't looked at your code, but for an image file reader, the D way is to
separate file handling code from image handling code. This means that the image
code can be tested not by handing it a file name, but handing it the data that
can be inlined in a D source code file.
This makes testing much more straightforward.